Package net.minecraft.world.level.block
Class SculkSensorBlock
java.lang.Object
net.minecraft.world.level.block.state.BlockBehaviour
net.minecraft.world.level.block.Block
net.minecraft.world.level.block.BaseEntityBlock
net.minecraft.world.level.block.SculkSensorBlock
- All Implemented Interfaces:
BucketPickup
,EntityBlock
,LiquidBlockContainer
,SimpleWaterloggedBlock
,ItemLike
,IForgeBlock
,IForgeBucketPickup
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.BlockStatePairKey
Nested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
private final int
static final EnumProperty<SculkSensorPhase>
static final IntegerProperty
protected static final VoxelShape
static final it.unimi.dsi.fastutil.objects.Object2IntMap<GameEvent>
static final BooleanProperty
Fields inherited from class net.minecraft.world.level.block.Block
BLOCK_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_DROPS, UPDATE_SUPPRESS_LIGHT
Fields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, material, properties, soundType, speedFactor, UPDATE_SHAPE_ORDER
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
activate
(Entity p_222126_, Level p_222127_, BlockPos p_222128_, BlockState p_222129_, int p_222130_) void
animateTick
(BlockState p_222148_, Level p_222149_, BlockPos p_222150_, RandomSource p_222151_) static boolean
canActivate
(BlockState p_154490_) protected void
static void
deactivate
(Level p_154408_, BlockPos p_154409_, BlockState p_154410_) int
getAnalogOutputSignal
(BlockState p_154442_, Level p_154443_, BlockPos p_154444_) int
getExpDrop
(BlockState state, LevelReader level, RandomSource randomSource, BlockPos pos, int fortuneLevel, int silkTouchLevel) Gathers how much experience this block drops when broken.getFluidState
(BlockState p_154479_) <T extends BlockEntity>
GameEventListenergetListener
(ServerLevel p_222123_, T p_222124_) int
static SculkSensorPhase
getPhase
(BlockState p_154488_) getRenderShape
(BlockState p_154477_) getShape
(BlockState p_154432_, BlockGetter p_154433_, BlockPos p_154434_, CollisionContext p_154435_) int
getSignal
(BlockState p_154437_, BlockGetter p_154438_, BlockPos p_154439_, Direction p_154440_) getStateForPlacement
(BlockPlaceContext p_154396_) <T extends BlockEntity>
BlockEntityTicker<T>getTicker
(Level p_154401_, BlockState p_154402_, BlockEntityType<T> p_154403_) boolean
hasAnalogOutputSignal
(BlockState p_154481_) boolean
isPathfindable
(BlockState p_154427_, BlockGetter p_154428_, BlockPos p_154429_, PathComputationType p_154430_) boolean
isSignalSource
(BlockState p_154484_) newBlockEntity
(BlockPos p_154466_, BlockState p_154467_) void
onPlace
(BlockState p_154471_, Level p_154472_, BlockPos p_154473_, BlockState p_154474_, boolean p_154475_) void
onRemove
(BlockState p_154446_, Level p_154447_, BlockPos p_154448_, BlockState p_154449_, boolean p_154450_) void
spawnAfterBreak
(BlockState p_222142_, ServerLevel p_222143_, BlockPos p_222144_, ItemStack p_222145_, boolean p_222146_) void
stepOn
(Level p_222132_, BlockPos p_222133_, BlockState p_222134_, Entity p_222135_) void
tick
(BlockState p_222137_, ServerLevel p_222138_, BlockPos p_222139_, RandomSource p_222140_) private static void
updateNeighbours
(Level p_154405_, BlockPos p_154406_) updateShape
(BlockState p_154457_, Direction p_154458_, BlockState p_154459_, LevelAccessor p_154460_, BlockPos p_154461_, BlockPos p_154462_) boolean
useShapeForLightOcclusion
(BlockState p_154486_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEvent
Methods inherited from class net.minecraft.world.level.block.Block
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, setPlacedBy, shouldRenderFace, spawnDestroyParticles, stateById, toString, tryDropExperience, updateEntityAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOf
Methods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMaterialColor, entityInside, getBlockSupportShape, getCollisionShape, getDestroyProgress, getDirectSignal, getDrops, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getPistonPushReaction, getSeed, getShadeBrightness, getVisualShape, isAir, isCollisionShapeFullBlock, isOcclusionShapeFullBlock, mirror, neighborChanged, onProjectileHit, randomTick, rotate, skipRendering, updateIndirectNeighbourShapes, use
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBlock
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getCloneItemStack, getEnchantPowerBonus, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hidesNeighborFace, isBed, isBurning, isConduitFrame, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, isValidSpawn, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onNeighborChange, onTreeGrow, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, supportsExternalFaceHiding
Methods inherited from interface net.minecraftforge.common.extensions.IForgeBucketPickup
getPickupSound
Methods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
ACTIVE_TICKS
public static final int ACTIVE_TICKS- See Also:
-
COOLDOWN_TICKS
public static final int COOLDOWN_TICKS- See Also:
-
VIBRATION_FREQUENCY_FOR_EVENT
public static final it.unimi.dsi.fastutil.objects.Object2IntMap<GameEvent> VIBRATION_FREQUENCY_FOR_EVENT -
PHASE
-
POWER
-
WATERLOGGED
-
SHAPE
-
listenerRange
private final int listenerRange
-
-
Constructor Details
-
SculkSensorBlock
-
-
Method Details
-
getListenerRange
public int getListenerRange() -
getStateForPlacement
- Overrides:
getStateForPlacement
in classBlock
-
getFluidState
- Overrides:
getFluidState
in classBlockBehaviour
-
tick
public void tick(BlockState p_222137_, ServerLevel p_222138_, BlockPos p_222139_, RandomSource p_222140_) - Overrides:
tick
in classBlockBehaviour
-
stepOn
-
onPlace
public void onPlace(BlockState p_154471_, Level p_154472_, BlockPos p_154473_, BlockState p_154474_, boolean p_154475_) - Overrides:
onPlace
in classBlockBehaviour
-
onRemove
public void onRemove(BlockState p_154446_, Level p_154447_, BlockPos p_154448_, BlockState p_154449_, boolean p_154450_) - Overrides:
onRemove
in classBlockBehaviour
-
updateShape
public BlockState updateShape(BlockState p_154457_, Direction p_154458_, BlockState p_154459_, LevelAccessor p_154460_, BlockPos p_154461_, BlockPos p_154462_) - Overrides:
updateShape
in classBlockBehaviour
-
updateNeighbours
-
newBlockEntity
- Specified by:
newBlockEntity
in interfaceEntityBlock
-
getListener
@Nullable public <T extends BlockEntity> GameEventListener getListener(ServerLevel p_222123_, T p_222124_) - Specified by:
getListener
in interfaceEntityBlock
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_154401_, BlockState p_154402_, BlockEntityType<T> p_154403_) - Specified by:
getTicker
in interfaceEntityBlock
-
getRenderShape
- Overrides:
getRenderShape
in classBaseEntityBlock
-
getShape
public VoxelShape getShape(BlockState p_154432_, BlockGetter p_154433_, BlockPos p_154434_, CollisionContext p_154435_) - Overrides:
getShape
in classBlockBehaviour
-
isSignalSource
- Overrides:
isSignalSource
in classBlockBehaviour
-
getSignal
public int getSignal(BlockState p_154437_, BlockGetter p_154438_, BlockPos p_154439_, Direction p_154440_) - Overrides:
getSignal
in classBlockBehaviour
-
getPhase
-
canActivate
-
deactivate
-
activate
public static void activate(@Nullable Entity p_222126_, Level p_222127_, BlockPos p_222128_, BlockState p_222129_, int p_222130_) -
animateTick
public void animateTick(BlockState p_222148_, Level p_222149_, BlockPos p_222150_, RandomSource p_222151_) - Overrides:
animateTick
in classBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinition
in classBlock
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignal
in classBlockBehaviour
-
getAnalogOutputSignal
- Overrides:
getAnalogOutputSignal
in classBlockBehaviour
-
isPathfindable
public boolean isPathfindable(BlockState p_154427_, BlockGetter p_154428_, BlockPos p_154429_, PathComputationType p_154430_) - Overrides:
isPathfindable
in classBlockBehaviour
-
useShapeForLightOcclusion
- Overrides:
useShapeForLightOcclusion
in classBlockBehaviour
-
spawnAfterBreak
public void spawnAfterBreak(BlockState p_222142_, ServerLevel p_222143_, BlockPos p_222144_, ItemStack p_222145_, boolean p_222146_) - Overrides:
spawnAfterBreak
in classBlockBehaviour
-
getExpDrop
public int getExpDrop(BlockState state, LevelReader level, RandomSource randomSource, BlockPos pos, int fortuneLevel, int silkTouchLevel) Description copied from interface:IForgeBlock
Gathers how much experience this block drops when broken.- Specified by:
getExpDrop
in interfaceIForgeBlock
- Parameters:
state
- The current statelevel
- The levelrandomSource
- Random source to use for experience randomnesspos
- Block positionfortuneLevel
- fortune enchantment level of tool being usedsilkTouchLevel
- silk touch enchantment level of tool being used- Returns:
- Amount of XP from breaking this block.
-