Package net.minecraft.block
Class SculkSensorBlock
java.lang.Object
net.minecraft.block.AbstractBlock
net.minecraft.block.Block
net.minecraft.block.BlockWithEntity
net.minecraft.block.SculkSensorBlock
- All Implemented Interfaces:
BlockEntityProvider
,FluidDrainable
,FluidFillable
,Waterloggable
,ItemConvertible
public class SculkSensorBlock extends BlockWithEntity implements Waterloggable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.block.Block
Block.NeighborGroup
Nested classes/interfaces inherited from class net.minecraft.block.AbstractBlock
AbstractBlock.AbstractBlockState, AbstractBlock.ContextPredicate, AbstractBlock.OffsetType, AbstractBlock.Settings, AbstractBlock.TypedContextPredicate<A>
-
Field Summary
Fields Modifier and Type Field Description static Object2IntMap<GameEvent>
FREQUENCIES
protected static VoxelShape
OUTLINE_SHAPE
static IntProperty
POWER
private int
range
static EnumProperty<SculkSensorPhase>
SCULK_SENSOR_PHASE
static BooleanProperty
WATERLOGGED
Fields inherited from class net.minecraft.block.Block
LOGGER, STATE_IDS, stateManager
Fields inherited from class net.minecraft.block.AbstractBlock
collidable, dynamicBounds, FACINGS, jumpVelocityMultiplier, lootTableId, material, randomTicks, resistance, settings, slipperiness, soundGroup, velocityMultiplier
-
Constructor Summary
Constructors Constructor Description SculkSensorBlock(AbstractBlock.Settings settings, int range)
-
Method Summary
Methods inherited from class net.minecraft.block.BlockWithEntity
checkType, createScreenHandlerFactory, onSyncedBlockEvent
Methods inherited from class net.minecraft.block.Block
addStacksForDisplay, afterBreak, appendTooltip, asBlock, asItem, canMobSpawnInside, cannotConnect, createCuboidShape, dropExperience, dropStack, dropStacks, dropStacks, dropStacks, getBlastResistance, getBlockFromItem, getDefaultState, getDroppedStacks, getDroppedStacks, getJumpVelocityMultiplier, getName, getPickStack, getRawIdFromState, getSlipperiness, getSoundGroup, getStateFromRawId, getStateManager, getTranslationKey, getVelocityMultiplier, hasDynamicBounds, hasRandomTicks, hasTopRim, isFaceFullSquare, isShapeFullCube, isTranslucent, onBreak, onBroken, onDestroyedByExplosion, onEntityLand, onLandedUpon, onPlaced, onSteppedOn, postProcessState, precipitationTick, pushEntitiesUpBeforeBlockChange, replace, replace, setDefaultState, shouldDrawSide, shouldDropItemsOnExplosion, sideCoversSmallSquare, toString
Methods inherited from class net.minecraft.block.AbstractBlock
calcBlockBreakingDelta, canBucketPlace, canPlaceAt, canReplace, getAmbientOcclusionLightLevel, getCollisionShape, getCullingShape, getDefaultMapColor, getDroppedStacks, getLootTableId, getMaxModelOffset, getOffsetType, getOpacity, getPistonBehavior, getRaycastShape, getRenderingSeed, getSidesShape, getStrongRedstonePower, getVisualShape, isSideInvisible, mirror, neighborUpdate, onBlockBreakStart, onEntityCollision, onProjectileHit, onStacksDropped, onUse, prepare, randomTick, rotate
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.block.Waterloggable
canFillWithFluid, getDrainSound, tryDrainFluid, tryFillWithFluid
-
Field Details
-
FREQUENCIES
-
SCULK_SENSOR_PHASE
-
POWER
-
WATERLOGGED
-
OUTLINE_SHAPE
-
range
private final int range
-
-
Constructor Details
-
SculkSensorBlock
-
-
Method Details
-
getRange
public int getRange() -
getPlacementState
- Overrides:
getPlacementState
in classBlock
-
getFluidState
- Overrides:
getFluidState
in classAbstractBlock
-
scheduledTick
- Overrides:
scheduledTick
in classAbstractBlock
-
onBlockAdded
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify)- Overrides:
onBlockAdded
in classAbstractBlock
-
onStateReplaced
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved)Called inWorldChunk.setBlockState(BlockPos, BlockState, boolean)
ifnewState
is different fromstate
. Vanilla blocks perform removal cleanups here.- Overrides:
onStateReplaced
in classAbstractBlock
-
getStateForNeighborUpdate
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState newState, WorldAccess world, BlockPos pos, BlockPos posFrom)- Overrides:
getStateForNeighborUpdate
in classAbstractBlock
-
updateNeighbors
-
createBlockEntity
- Specified by:
createBlockEntity
in interfaceBlockEntityProvider
-
getGameEventListener
@Nullable public <T extends BlockEntity> GameEventListener getGameEventListener(World world, T blockEntity)- Specified by:
getGameEventListener
in interfaceBlockEntityProvider
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type)- Specified by:
getTicker
in interfaceBlockEntityProvider
-
getRenderType
- Overrides:
getRenderType
in classBlockWithEntity
-
getOutlineShape
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context)- Overrides:
getOutlineShape
in classAbstractBlock
-
emitsRedstonePower
- Overrides:
emitsRedstonePower
in classAbstractBlock
-
getWeakRedstonePower
public int getWeakRedstonePower(BlockState state, BlockView world, BlockPos pos, Direction direction)- Overrides:
getWeakRedstonePower
in classAbstractBlock
-
getPhase
-
isInactive
-
setCooldown
-
setActive
-
randomDisplayTick
@Environment(CLIENT) public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random)- Overrides:
randomDisplayTick
in classBlock
-
appendProperties
- Overrides:
appendProperties
in classBlock
-
hasComparatorOutput
- Overrides:
hasComparatorOutput
in classAbstractBlock
-
getComparatorOutput
- Overrides:
getComparatorOutput
in classAbstractBlock
-
hasSidedTransparency
- Overrides:
hasSidedTransparency
in classAbstractBlock
-