Package net.minecraft.world.level
Interface SignalGetter
- All Superinterfaces:
BlockGetter
,IBlockGetterExtension
,LevelHeightAccessor
- All Known Subinterfaces:
CommonLevelAccessor
,LevelAccessor
,LevelReader
,LevelTimeAccess
,ServerLevelAccessor
,WorldGenLevel
- All Known Implementing Classes:
ClientLevel
,Level
,ServerLevel
,WorldGenRegion
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault int
Returns the highest redstone signal the given position receives from neighboring blocks.default int
getControlInputSignal
(BlockPos pPos, Direction pDirection, boolean pDiodesOnly) Returns the control signal emitted from the given position in the given direction.default int
getDirectSignal
(BlockPos pPos, Direction pDirection) Returns the direct redstone signal emitted from the given position in the given direction.default int
getDirectSignalTo
(BlockPos pPos) Returns the direct redstone signal the given position receives from neighboring blocks.default int
Returns the redstone signal emitted from the given position in the given direction.default boolean
hasNeighborSignal
(BlockPos pPos) Returns whether the given position receives any redstone signal from neighboring blocks.default boolean
Returns whether a redstone signal is emitted from the given position in the given direction.Methods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockEntity, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockState, getBlockStates, getFluidState, getLightEmission, getMaxLightLevel, isBlockInLine
Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension
getAuxLightManager, getAuxLightManager, getModelData
Methods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getHeight, getMaxBuildHeight, getMaxSection, getMinBuildHeight, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight
-
Field Details
-
DIRECTIONS
-
-
Method Details
-
getDirectSignal
Returns the direct redstone signal emitted from the given position in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
-
getDirectSignalTo
Returns the direct redstone signal the given position receives from neighboring blocks. -
getControlInputSignal
Returns the control signal emitted from the given position in the given direction. IfdiodesOnly
istrue
, this method returns the direct signal emitted if and only if this position is occupied by a diode (i.e. a repeater or comparator). Otherwise, if this position is occupied by a redstone block, this method will return the redstone signal emitted by it. If not, this method will return the direct signal emitted from this position in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
-
hasSignal
Returns whether a redstone signal is emitted from the given position in the given direction.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
-
getSignal
Returns the redstone signal emitted from the given position in the given direction. This is the highest value between the signal emitted by the block itself, and the direct signal received from neighboring blocks if the block is a redstone conductor.NOTE: directions in redstone signal related methods are backwards, so this method checks for the signal emitted in the opposite direction of the one given.
-
hasNeighborSignal
Returns whether the given position receives any redstone signal from neighboring blocks. -
getBestNeighborSignal
Returns the highest redstone signal the given position receives from neighboring blocks.
-