Package net.minecraft.world.level.block
Class ComparatorBlock
- All Implemented Interfaces:
EntityBlock,ItemLike,IForgeBlock,IForgeRegistryEntry<Block>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicateNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>> -
Field Summary
FieldsFields inherited from class net.minecraft.world.level.block.DiodeBlock
POWERED, SHAPEFields inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlock
FACINGFields inherited from class net.minecraft.world.level.block.Block
BLOCK_STATE_REGISTRY, INDESTRUCTIBLE, INSTANT, RANDOM, 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_DROPS, UPDATE_SUPPRESS_LIGHTFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intcalculateOutputSignal(Level p_51904_, BlockPos p_51905_, BlockState p_51906_) protected voidcheckTickOnNeighbor(Level p_51900_, BlockPos p_51901_, BlockState p_51902_) 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 tile 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_51869_, ServerLevel p_51870_, BlockPos p_51871_, Random p_51872_) booleantriggerEvent(BlockState p_51874_, Level p_51875_, BlockPos p_51876_, int p_51877_, int p_51878_) 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.DiodeBlock
canSurvive, getAlternateSignal, getAlternateSignalAt, getDirectSignal, getShape, getSignal, getStateForPlacement, isAlternateInput, isDiode, isLocked, isSignalSource, neighborChanged, onPlace, onRemove, setPlacedBy, shouldPrioritize, updateNeighborsInFrontMethods inherited from class net.minecraft.world.level.block.HorizontalDirectionalBlock
mirror, rotateMethods inherited from class net.minecraft.world.level.block.Block
animateTick, appendHoverText, asBlock, asItem, box, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, canSustainPlant, defaultBlockState, destroy, dropFromExplosion, dropResources, dropResources, dropResources, dropResources, fallOn, fillItemCategory, 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, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, defaultDestroyTime, defaultMaterialColor, entityInside, getAnalogOutputSignal, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDrops, getFluidState, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getMenuProvider, getOcclusionShape, getOffsetType, getPistonPushReaction, getRenderShape, getSeed, getShadeBrightness, getVisualShape, hasAnalogOutputSignal, isAir, isCollisionShapeFullBlock, isPathfindable, onProjectileHit, randomTick, skipRendering, spawnAfterBreak, updateIndirectNeighbourShapes, updateShape, useShapeForLightOcclusionMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.level.block.EntityBlock
getListener, getTickerMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAiPathNodeType, getBeaconColorMultiplier, getBedDirection, getCloneItemStack, getEnchantPowerBonus, getExpDrop, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getToolModifiedState, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
-
Field Details
-
MODE
-
-
Constructor Details
-
ComparatorBlock
-
-
Method Details
-
getDelay
- Specified by:
getDelayin classDiodeBlock
-
getOutputSignal
- Overrides:
getOutputSignalin classDiodeBlock
-
calculateOutputSignal
-
shouldTurnOn
- Overrides:
shouldTurnOnin classDiodeBlock
-
getInputSignal
- Overrides:
getInputSignalin classDiodeBlock
-
getItemFrame
-
use
public InteractionResult use(BlockState p_51880_, Level p_51881_, BlockPos p_51882_, Player p_51883_, InteractionHand p_51884_, BlockHitResult p_51885_) - Overrides:
usein classBlockBehaviour
-
checkTickOnNeighbor
- Overrides:
checkTickOnNeighborin classDiodeBlock
-
refreshOutputState
-
tick
- Overrides:
tickin classDiodeBlock
-
triggerEvent
public boolean triggerEvent(BlockState p_51874_, Level p_51875_, BlockPos p_51876_, int p_51877_, int p_51878_) - Overrides:
triggerEventin classBlockBehaviour
-
newBlockEntity
- Specified by:
newBlockEntityin interfaceEntityBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
getWeakChanges
Description copied from interface:IForgeBlockIf 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 interfaceIForgeBlockworld- The current levelpos- Block position in level- Returns:
- true To be notified of changes
-
onNeighborChange
Description copied from interface:IForgeBlockCalled when a tile entity on a side of this block changes is created or is destroyed.- Specified by:
onNeighborChangein interfaceIForgeBlockworld- The levelpos- Block position in levelneighbor- Block position of neighbor
-