Package net.minecraft.block
Class ComparatorBlock
- All Implemented Interfaces:
ITileEntityProvider
,IItemProvider
,IForgeBlock
,IForgeRegistryEntry<Block>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.RenderSideCacheKey
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.Properties
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Fields inherited from class net.minecraft.block.RedstoneDiodeBlock
POWERED, SHAPE
Fields inherited from class net.minecraft.block.HorizontalBlock
FACING
Fields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinition
Fields inherited from class net.minecraft.block.AbstractBlock
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate int
calculateOutputSignal
(World p_176460_1_, BlockPos p_176460_2_, BlockState p_176460_3_) protected void
checkTickOnNeighbor
(World p_176398_1_, BlockPos p_176398_2_, BlockState p_176398_3_) protected void
createBlockStateDefinition
(StateContainer.Builder<Block, BlockState> p_206840_1_) protected int
getDelay
(BlockState p_196346_1_) protected int
getInputSignal
(World p_176397_1_, BlockPos p_176397_2_, BlockState p_176397_3_) private ItemFrameEntity
getItemFrame
(World p_176461_1_, Direction p_176461_2_, BlockPos p_176461_3_) protected int
getOutputSignal
(IBlockReader p_176408_1_, BlockPos p_176408_2_, BlockState p_176408_3_) boolean
getWeakChanges
(BlockState state, IWorldReader world, BlockPos pos) If this block should be notified of weak changes.newBlockEntity
(IBlockReader p_196283_1_) void
onNeighborChange
(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) Called when a tile entity on a side of this block changes is created or is destroyed.private void
refreshOutputState
(World p_176462_1_, BlockPos p_176462_2_, BlockState p_176462_3_) protected boolean
shouldTurnOn
(World p_176404_1_, BlockPos p_176404_2_, BlockState p_176404_3_) void
tick
(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) boolean
triggerEvent
(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) use
(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) Methods inherited from class net.minecraft.block.RedstoneDiodeBlock
canSurvive, getAlternateSignal, getAlternateSignalAt, getDirectSignal, getShape, getSignal, getStateForPlacement, isAlternateInput, isDiode, isLocked, isSignalSource, neighborChanged, onPlace, onRemove, setPlacedBy, shouldPrioritize, updateNeighborsInFront
Methods inherited from class net.minecraft.block.HorizontalBlock
mirror, rotate
Methods inherited from class net.minecraft.block.Block
animateTick, appendHoverText, asBlock, asItem, box, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, fallOn, fillItemCategory, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getHarvestLevel, getHarvestTool, getId, getJumpFactor, getName, getSoundType, getSpeedFactor, getStateDefinition, getTags, handleRain, hasDynamicShape, is, is, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, stateById, stepOn, toString, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded
Methods inherited from class net.minecraft.block.AbstractBlock
attack, canBeReplaced, canBeReplaced, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getVisualShape, hasAnalogOutputSignal, isAir, isEntityBlock, isPathfindable, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, updateIndirectNeighbourShapes, updateShape, useShapeForLightOcclusion
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addDestroyEffects, addHitEffects, addLandingEffects, addRunningEffects, canBeReplacedByLeaves, canBeReplacedByLogs, canConnectRedstone, canCreatureSpawn, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, catchFire, collisionExtendsVertically, createTileEntity, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getBedSpawnPosition, getBlock, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFogColor, getLightValue, getPickBlock, getRespawnPosition, getSlipperiness, getSoundType, getStateAtViewpoint, getToolModifiedState, hasTileEntity, isAir, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isToolEffective, makesOpenTrapdoorAboveClimbable, observedNeighborChange, onBlockExploded, onPlantGrow, removedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay
-
Field Details
-
MODE
-
-
Constructor Details
-
ComparatorBlock
-
-
Method Details
-
getDelay
- Specified by:
getDelay
in classRedstoneDiodeBlock
-
getOutputSignal
protected int getOutputSignal(IBlockReader p_176408_1_, BlockPos p_176408_2_, BlockState p_176408_3_) - Overrides:
getOutputSignal
in classRedstoneDiodeBlock
-
calculateOutputSignal
-
shouldTurnOn
- Overrides:
shouldTurnOn
in classRedstoneDiodeBlock
-
getInputSignal
- Overrides:
getInputSignal
in classRedstoneDiodeBlock
-
getItemFrame
@Nullable private ItemFrameEntity getItemFrame(World p_176461_1_, Direction p_176461_2_, BlockPos p_176461_3_) -
use
public ActionResultType use(BlockState p_225533_1_, World p_225533_2_, BlockPos p_225533_3_, PlayerEntity p_225533_4_, Hand p_225533_5_, BlockRayTraceResult p_225533_6_) - Overrides:
use
in classAbstractBlock
-
checkTickOnNeighbor
- Overrides:
checkTickOnNeighbor
in classRedstoneDiodeBlock
-
refreshOutputState
-
tick
public void tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) - Overrides:
tick
in classRedstoneDiodeBlock
-
triggerEvent
public boolean triggerEvent(BlockState p_189539_1_, World p_189539_2_, BlockPos p_189539_3_, int p_189539_4_, int p_189539_5_) - Overrides:
triggerEvent
in classAbstractBlock
-
newBlockEntity
- Specified by:
newBlockEntity
in interfaceITileEntityProvider
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
getWeakChanges
Description copied from interface:IForgeBlock
If this block should be notified of weak changes. Weak changes are changes 1 block away through a solid block. Similar to comparators.- Specified by:
getWeakChanges
in interfaceIForgeBlock
world
- The current worldpos
- Block position in world- Returns:
- true To be notified of changes
-
onNeighborChange
Description copied from interface:IForgeBlock
Called when a tile entity on a side of this block changes is created or is destroyed.- Specified by:
onNeighborChange
in interfaceIForgeBlock
world
- The worldpos
- Block position in worldneighbor
- Block position of neighbor
-