Package net.minecraft.world.level.block
Class ComparatorBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.HorizontalDirectionalBlock
net.minecraft.world.level.block.DiodeBlock
net.minecraft.world.level.block.ComparatorBlock
- All Implemented Interfaces:
- FeatureElement,- EntityBlock,- ItemLike,- IBlockExtension
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.level.block.BlockBlock.BlockStatePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviourBlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ComparatorBlock>static final EnumProperty<ComparatorMode>Fields inherited from class net.minecraft.world.level.block.DiodeBlockPOWERED, SHAPEFields inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlockFACINGFields inherited from class net.minecraft.world.level.block.BlockBLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, stateDefinition, UPDATE_ALL, UPDATE_ALL_IMMEDIATE, UPDATE_CLIENTS, UPDATE_IMMEDIATE, UPDATE_INVISIBLE, UPDATE_KNOWN_SHAPE, UPDATE_LIMIT, UPDATE_MOVE_BY_PISTON, UPDATE_NEIGHBORS, UPDATE_NONE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviourdrops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprivate intcalculateOutputSignal(Level p_51904_, BlockPos p_51905_, BlockState p_51906_) protected voidcheckTickOnNeighbor(Level p_51900_, BlockPos p_51901_, BlockState p_51902_) com.mojang.serialization.MapCodec<ComparatorBlock>codec()protected voidprotected intgetDelay(BlockState p_51912_) protected intgetInputSignal(Level p_51896_, BlockPos p_51897_, BlockState p_51898_) private ItemFramegetItemFrame(Level p_51865_, Direction p_51866_, BlockPos p_51867_) protected intgetOutputSignal(BlockGetter p_51892_, BlockPos p_51893_, BlockState p_51894_) booleangetWeakChanges(BlockState state, LevelReader world, BlockPos pos) If this block should be notified of weak changes.newBlockEntity(BlockPos p_153086_, BlockState p_153087_) voidonNeighborChange(BlockState state, LevelReader world, BlockPos pos, BlockPos neighbor) Called when a block entity on a side of this block changes, is created, or is destroyed.private voidrefreshOutputState(Level p_51908_, BlockPos p_51909_, BlockState p_51910_) protected booleanshouldTurnOn(Level p_51861_, BlockPos p_51862_, BlockState p_51863_) voidtick(BlockState p_221010_, ServerLevel p_221011_, BlockPos p_221012_, RandomSource p_221013_) booleantriggerEvent(BlockState p_51874_, Level p_51875_, BlockPos p_51876_, int p_51877_, int p_51878_) updateShape(BlockState p_301069_, Direction p_301249_, BlockState p_301318_, LevelAccessor p_301207_, BlockPos p_301025_, BlockPos p_301045_) use(BlockState p_51880_, Level p_51881_, BlockPos p_51882_, Player p_51883_, InteractionHand p_51884_, BlockHitResult p_51885_) Methods inherited from class net.minecraft.world.level.block.DiodeBlockcanSurvive, canSurviveOn, getAlternateSignal, getDirectSignal, getShape, getSignal, getStateForPlacement, isDiode, isLocked, isSignalSource, neighborChanged, onPlace, onRemove, setPlacedBy, shouldPrioritize, sideInputDiodesOnly, updateNeighborsInFrontMethods inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlockmirror, rotateMethods inherited from class net.minecraft.world.level.block.BlockanimateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, getCloneItemStack, getDescriptionId, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getRenderPropertiesInternal, getShapeForEachState, getSoundType, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, initializeClient, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isRandomlyTicking, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, propagatesSkylightDown, pushEntitiesUp, registerDefaultState, shouldRenderFace, spawnDestroyParticles, stateById, stepOn, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviourattack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMapColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, isPathfindable, onExplosionHit, onProjectileHit, properties, propertiesCodec, randomTick, requiredFeatures, simpleCodec, skipRendering, spawnAfterBreak, updateIndirectNeighbourShapes, useShapeForLightOcclusionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlockgetListener, getTickerMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtensionaddLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, hidesNeighborFace, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
- 
Field Details- 
CODEC
- 
MODE
 
- 
- 
Constructor Details- 
ComparatorBlock
 
- 
- 
Method Details- 
codec- Specified by:
- codecin class- DiodeBlock
 
- 
getDelay- Specified by:
- getDelayin class- DiodeBlock
 
- 
updateShapepublic BlockState updateShape(BlockState p_301069_, Direction p_301249_, BlockState p_301318_, LevelAccessor p_301207_, BlockPos p_301025_, BlockPos p_301045_) - Overrides:
- updateShapein class- BlockBehaviour
 
- 
getOutputSignal- Overrides:
- getOutputSignalin class- DiodeBlock
 
- 
calculateOutputSignal
- 
shouldTurnOn- Overrides:
- shouldTurnOnin class- DiodeBlock
 
- 
getInputSignal- Overrides:
- getInputSignalin class- DiodeBlock
 
- 
getItemFrame
- 
usepublic InteractionResult use(BlockState p_51880_, Level p_51881_, BlockPos p_51882_, Player p_51883_, InteractionHand p_51884_, BlockHitResult p_51885_) - Overrides:
- usein class- BlockBehaviour
 
- 
checkTickOnNeighbor- Overrides:
- checkTickOnNeighborin class- DiodeBlock
 
- 
refreshOutputState
- 
tickpublic void tick(BlockState p_221010_, ServerLevel p_221011_, BlockPos p_221012_, RandomSource p_221013_) - Overrides:
- tickin class- DiodeBlock
 
- 
triggerEventpublic boolean triggerEvent(BlockState p_51874_, Level p_51875_, BlockPos p_51876_, int p_51877_, int p_51878_) - Overrides:
- triggerEventin class- BlockBehaviour
 
- 
newBlockEntity- Specified by:
- newBlockEntityin interface- EntityBlock
 
- 
createBlockStateDefinition- Overrides:
- createBlockStateDefinitionin class- Block
 
- 
getWeakChangesDescription copied from interface:IBlockExtensionIf this block should be notified of weak changes. Weak changes are changes 1 block away through a solid block. Similar to comparators.- Specified by:
- getWeakChangesin interface- IBlockExtension
- world- The current level
- pos- Block position in level
- Returns:
- true To be notified of changes
 
- 
onNeighborChangeDescription copied from interface:IBlockExtensionCalled when a block entity on a side of this block changes, is created, or is destroyed.This method is not suitable for listening to capability invalidations. For capability invalidations specifically, use BlockCapabilityCacheinstead.- Specified by:
- onNeighborChangein interface- IBlockExtension
- world- The level
- pos- Block position in level
- neighbor- Block position of neighbor
 
 
-