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.RenderSideCacheKeyNested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.IExtendedPositionPredicate<A>, AbstractBlock.IPositionPredicate, AbstractBlock.OffsetType, AbstractBlock.PropertiesNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>> -
Field Summary
FieldsFields inherited from class net.minecraft.block.RedstoneDiodeBlock
POWERED, SHAPEFields inherited from class net.minecraft.block.HorizontalBlock
FACINGFields inherited from class net.minecraft.block.Block
BLOCK_STATE_REGISTRY, LOGGER, RANDOM, stateDefinitionFields inherited from class net.minecraft.block.AbstractBlock
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(World p_176460_1_, BlockPos p_176460_2_, BlockState p_176460_3_) protected voidcheckTickOnNeighbor(World p_176398_1_, BlockPos p_176398_2_, BlockState p_176398_3_) protected voidcreateBlockStateDefinition(StateContainer.Builder<Block, BlockState> p_206840_1_) protected intgetDelay(BlockState p_196346_1_) protected intgetInputSignal(World p_176397_1_, BlockPos p_176397_2_, BlockState p_176397_3_) private ItemFrameEntitygetItemFrame(World p_176461_1_, Direction p_176461_2_, BlockPos p_176461_3_) protected intgetOutputSignal(IBlockReader p_176408_1_, BlockPos p_176408_2_, BlockState p_176408_3_) booleangetWeakChanges(BlockState state, IWorldReader world, BlockPos pos) If this block should be notified of weak changes.newBlockEntity(IBlockReader p_196283_1_) voidonNeighborChange(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 voidrefreshOutputState(World p_176462_1_, BlockPos p_176462_2_, BlockState p_176462_3_) protected booleanshouldTurnOn(World p_176404_1_, BlockPos p_176404_2_, BlockState p_176404_3_) voidtick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) booleantriggerEvent(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, updateNeighborsInFrontMethods inherited from class net.minecraft.block.HorizontalBlock
mirror, rotateMethods 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, wasExplodedMethods 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, 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.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:
getDelayin classRedstoneDiodeBlock
-
getOutputSignal
protected int getOutputSignal(IBlockReader p_176408_1_, BlockPos p_176408_2_, BlockState p_176408_3_) - Overrides:
getOutputSignalin classRedstoneDiodeBlock
-
calculateOutputSignal
-
shouldTurnOn
- Overrides:
shouldTurnOnin classRedstoneDiodeBlock
-
getInputSignal
- Overrides:
getInputSignalin 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:
usein classAbstractBlock
-
checkTickOnNeighbor
- Overrides:
checkTickOnNeighborin classRedstoneDiodeBlock
-
refreshOutputState
-
tick
public void tick(BlockState p_225534_1_, ServerWorld p_225534_2_, BlockPos p_225534_3_, Random p_225534_4_) - Overrides:
tickin 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:
triggerEventin classAbstractBlock
-
newBlockEntity
- Specified by:
newBlockEntityin interfaceITileEntityProvider
-
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 worldpos- Block position in world- 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 worldpos- Block position in worldneighbor- Block position of neighbor
-