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:
FeatureElement,BucketPickup,EntityBlock,LiquidBlockContainer,SimpleWaterloggedBlock,ItemLike,IBlockExtension,IBucketPickupExtension
- Direct Known Subclasses:
CalibratedSculkSensorBlock
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.block.Block
Block.ShapePairKeyNested classes/interfaces inherited from class net.minecraft.world.level.block.state.BlockBehaviour
BlockBehaviour.BlockStateBase, BlockBehaviour.OffsetFunction, BlockBehaviour.OffsetType, BlockBehaviour.Properties, BlockBehaviour.StateArgumentPredicate<A>, BlockBehaviour.StatePredicate -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final com.mojang.serialization.MapCodec<SculkSensorBlock> static final intstatic final EnumProperty<SculkSensorPhase> static final IntegerPropertyprivate static final float[]private static final VoxelShapestatic final BooleanPropertyFields 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_SKIP_ALL_SIDEEFFECTS, UPDATE_SKIP_BLOCK_ENTITY_SIDEEFFECTS, UPDATE_SKIP_ON_PLACE, UPDATE_SKIP_SHAPE_UPDATE_ON_WIRE, UPDATE_SUPPRESS_DROPSFields inherited from class net.minecraft.world.level.block.state.BlockBehaviour
descriptionId, drops, dynamicShape, explosionResistance, friction, hasCollision, isRandomlyTicking, jumpFactor, properties, requiredFeatures, soundType, speedFactor, UPDATE_SHAPE_ORDERFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(Entity pEntity, Level pLevel, BlockPos pPos, BlockState pState, int pPower, int pFrequency) protected voidaffectNeighborsAfterRemoval(BlockState p_393931_, ServerLevel p_394552_, BlockPos p_394037_, boolean p_393527_) voidanimateTick(BlockState p_222148_, Level p_222149_, BlockPos p_222150_, RandomSource p_222151_) Called periodically clientside on blocks near the player to show effects (like furnace fire particles).static booleancanActivate(BlockState pState) com.mojang.serialization.MapCodec<? extends SculkSensorBlock> codec()protected voidstatic voiddeactivate(Level pLevel, BlockPos pPos, BlockState pState) intprotected intgetAnalogOutputSignal(BlockState p_154442_, Level p_154443_, BlockPos p_154444_, Direction p_435933_) intgetDirectSignal(BlockState p_279407_, BlockGetter p_279217_, BlockPos p_279190_, Direction p_279273_) Returns the direct signal this block emits in the given direction.intgetExpDrop(BlockState state, LevelAccessor level, BlockPos pos, BlockEntity blockEntity, Entity breaker, ItemStack tool) Returns how many experience points this block drops when broken, before application of enchantments.protected FluidStategetFluidState(BlockState p_154479_) static SculkSensorPhasegetPhase(BlockState pState) protected VoxelShapegetShape(BlockState p_154432_, BlockGetter p_154433_, BlockPos p_154434_, CollisionContext p_154435_) protected intgetSignal(BlockState p_154437_, BlockGetter p_154438_, BlockPos p_154439_, Direction p_154440_) Returns the signal this block emits in the given direction.getStateForPlacement(BlockPlaceContext p_154396_) <T extends BlockEntity>
BlockEntityTicker<T> getTicker(Level p_154401_, BlockState p_154402_, BlockEntityType<T> p_154403_) protected booleanhasAnalogOutputSignal(BlockState p_154481_) protected booleanisPathfindable(BlockState p_154427_, PathComputationType p_154430_) protected booleanisSignalSource(BlockState p_154484_) Returns whether this block is capable of emitting redstone signals.newBlockEntity(BlockPos p_154466_, BlockState p_154467_) protected voidonPlace(BlockState p_154471_, Level p_154472_, BlockPos p_154473_, BlockState p_154474_, boolean p_154475_) protected voidspawnAfterBreak(BlockState p_222142_, ServerLevel p_222143_, BlockPos p_222144_, ItemStack p_222145_, boolean p_222146_) Perform side-effects from block dropping, such as creating silverfishvoidstepOn(Level p_222132_, BlockPos p_222133_, BlockState p_222134_, Entity p_222135_) protected voidtick(BlockState p_222137_, ServerLevel p_222138_, BlockPos p_222139_, RandomSource p_222140_) static voidtryResonateVibration(Entity pEntity, Level pLevel, BlockPos pPos, int pFrequency) private static voidupdateNeighbours(Level pLevel, BlockPos pPos, BlockState pState) protected BlockStateupdateShape(BlockState p_154457_, LevelReader p_374292_, ScheduledTickAccess p_374575_, BlockPos p_154461_, Direction p_154458_, BlockPos p_154462_, BlockState p_154459_, RandomSource p_374248_) protected booleanuseShapeForLightOcclusion(BlockState p_154486_) Methods inherited from class net.minecraft.world.level.block.BaseEntityBlock
createTickerHelper, getMenuProvider, triggerEventMethods inherited from class net.minecraft.world.level.block.Block
asBlock, asItem, box, boxes, boxZ, boxZ, boxZ, builtInRegistryHolder, byItem, canSupportCenter, canSupportRigidBlock, column, column, cube, cube, defaultBlockState, destroy, dropFromBlockInteractLootTable, dropFromExplosion, dropFromLootTable, dropResources, dropResources, dropResources, fallOn, getDrops, getDrops, getExplosionResistance, getFriction, getId, getJumpFactor, getName, getShapeForEachState, getShapeForEachState, getSpeedFactor, getStateDefinition, handlePrecipitation, hasDynamicShape, isExceptionForConnection, isFaceFull, isPossibleToRespawnInThis, isShapeFullBlock, playerDestroy, playerWillDestroy, popExperience, popResource, popResourceFromFace, pushEntitiesUp, registerDefaultState, setPlacedBy, shouldRenderFace, shouldRenderFace, spawnDestroyParticles, stateById, toString, tryDropExperience, updateEntityMovementAfterFallOn, updateFromNeighbourShapes, updateOrDestroy, updateOrDestroy, wasExploded, withPropertiesOfMethods inherited from class net.minecraft.world.level.block.state.BlockBehaviour
attack, canBeReplaced, canBeReplaced, canSurvive, defaultDestroyTime, defaultMapColor, entityInside, getBlockSupportShape, getCloneItemStack, getCollisionShape, getDescriptionId, getDestroyProgress, getDrops, getEntityInsideCollisionShape, getInteractionShape, getLightBlock, getLootTable, getMaxHorizontalOffset, getMaxVerticalOffset, getOcclusionShape, getRenderShape, getSeed, getShadeBrightness, getSoundType, getVisualShape, isAir, isCollisionShapeFullBlock, isRandomlyTicking, mirror, neighborChanged, onExplosionHit, onProjectileHit, propagatesSkylightDown, properties, propertiesCodec, randomTick, requiredFeatures, rotate, shouldChangedStateKeepBlockEntity, simpleCodec, skipRendering, updateIndirectNeighbourShapes, useItemOn, useWithoutItemMethods 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
getListenerMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface net.neoforged.neoforge.common.extensions.IBlockExtension
addLandingEffects, addRunningEffects, canBeHydrated, canConnectRedstone, canDropFromExplosion, canEntityDestroy, canHarvestBlock, canStickTo, canSustainPlant, collisionExtendsVertically, getAdjacentBlockPathType, getAppearance, getBeaconColorMultiplier, getBedDirection, getBlockPathType, getBubbleColumnDirection, getCloneItemStack, getEnchantPowerBonus, getExplosionResistance, getFireSpreadSpeed, getFlammability, getFriction, getLightEmission, getMapColor, getPistonPushReaction, getRespawnPosition, getSoundType, getStateAtViewpoint, getToolModifiedState, getWeakChanges, hasDynamicLightEmission, hidesNeighborFace, ignitedByLava, isBed, isBurning, isConduitFrame, isEmpty, isFertile, isFireSource, isFlammable, isLadder, isPortalFrame, isScaffolding, isSlimeBlock, isStickyBlock, makesOpenTrapdoorAboveClimbable, onBlockExploded, onBlockStateChange, onCaughtFire, onDestroyedByPlayer, onDestroyedByPushReaction, onNeighborChange, onTreeGrow, playFallSound, playStepSound, rotate, setBedOccupied, shouldCheckWeakPower, shouldDisplayFluidOverlay, shouldHideAdjacentFluidFace, supportsExternalFaceHidingMethods inherited from interface net.neoforged.neoforge.common.extensions.IBucketPickupExtension
getPickupSoundMethods inherited from interface net.minecraft.world.level.block.SimpleWaterloggedBlock
canPlaceLiquid, getPickupSound, pickupBlock, placeLiquid
-
Field Details
-
CODEC
-
ACTIVE_TICKS
public static final int ACTIVE_TICKS- See Also:
-
COOLDOWN_TICKS
public static final int COOLDOWN_TICKS- See Also:
-
PHASE
-
POWER
-
WATERLOGGED
-
SHAPE
-
RESONANCE_PITCH_BEND
private static final float[] RESONANCE_PITCH_BEND
-
-
Constructor Details
-
SculkSensorBlock
-
-
Method Details
-
codec
- Specified by:
codecin classBaseEntityBlock
-
getStateForPlacement
- Overrides:
getStateForPlacementin classBlock
-
getFluidState
- Overrides:
getFluidStatein classBlockBehaviour
-
tick
protected void tick(BlockState p_222137_, ServerLevel p_222138_, BlockPos p_222139_, RandomSource p_222140_) - Overrides:
tickin classBlockBehaviour
-
stepOn
-
onPlace
protected void onPlace(BlockState p_154471_, Level p_154472_, BlockPos p_154473_, BlockState p_154474_, boolean p_154475_) - Overrides:
onPlacein classBlockBehaviour
-
affectNeighborsAfterRemoval
protected void affectNeighborsAfterRemoval(BlockState p_393931_, ServerLevel p_394552_, BlockPos p_394037_, boolean p_393527_) - Overrides:
affectNeighborsAfterRemovalin classBlockBehaviour
-
updateShape
protected BlockState updateShape(BlockState p_154457_, LevelReader p_374292_, ScheduledTickAccess p_374575_, BlockPos p_154461_, Direction p_154458_, BlockPos p_154462_, BlockState p_154459_, RandomSource p_374248_) - Overrides:
updateShapein classBlockBehaviour
-
updateNeighbours
-
newBlockEntity
- Specified by:
newBlockEntityin interfaceEntityBlock
-
getTicker
@Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_154401_, BlockState p_154402_, BlockEntityType<T> p_154403_) - Specified by:
getTickerin interfaceEntityBlock
-
getShape
protected VoxelShape getShape(BlockState p_154432_, BlockGetter p_154433_, BlockPos p_154434_, CollisionContext p_154435_) - Overrides:
getShapein classBlockBehaviour
-
isSignalSource
Description copied from class:BlockBehaviourReturns whether this block is capable of emitting redstone signals.- Overrides:
isSignalSourcein classBlockBehaviour
-
getSignal
protected int getSignal(BlockState p_154437_, BlockGetter p_154438_, BlockPos p_154439_, Direction p_154440_) Description copied from class:BlockBehaviourReturns the signal this block emits 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.
- Overrides:
getSignalin classBlockBehaviour
-
getDirectSignal
public int getDirectSignal(BlockState p_279407_, BlockGetter p_279217_, BlockPos p_279190_, Direction p_279273_) Description copied from class:BlockBehaviourReturns the direct signal this block emits 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.
- Overrides:
getDirectSignalin classBlockBehaviour
-
getPhase
-
canActivate
-
deactivate
-
getActiveTicks
public int getActiveTicks() -
activate
public void activate(@Nullable Entity pEntity, Level pLevel, BlockPos pPos, BlockState pState, int pPower, int pFrequency) -
tryResonateVibration
-
animateTick
public void animateTick(BlockState p_222148_, Level p_222149_, BlockPos p_222150_, RandomSource p_222151_) Description copied from class:BlockCalled periodically clientside on blocks near the player to show effects (like furnace fire particles).- Overrides:
animateTickin classBlock
-
createBlockStateDefinition
- Overrides:
createBlockStateDefinitionin classBlock
-
hasAnalogOutputSignal
- Overrides:
hasAnalogOutputSignalin classBlockBehaviour
-
getAnalogOutputSignal
protected int getAnalogOutputSignal(BlockState p_154442_, Level p_154443_, BlockPos p_154444_, Direction p_435933_) - Overrides:
getAnalogOutputSignalin classBlockBehaviour
-
isPathfindable
- Overrides:
isPathfindablein classBlockBehaviour
-
useShapeForLightOcclusion
- Overrides:
useShapeForLightOcclusionin classBlockBehaviour
-
spawnAfterBreak
protected void spawnAfterBreak(BlockState p_222142_, ServerLevel p_222143_, BlockPos p_222144_, ItemStack p_222145_, boolean p_222146_) Description copied from class:BlockBehaviourPerform side-effects from block dropping, such as creating silverfish- Overrides:
spawnAfterBreakin classBlockBehaviour
-
getExpDrop
public int getExpDrop(BlockState state, LevelAccessor level, BlockPos pos, @Nullable BlockEntity blockEntity, @Nullable Entity breaker, ItemStack tool) Description copied from interface:IBlockExtensionReturns how many experience points this block drops when broken, before application of enchantments.- Specified by:
getExpDropin interfaceIBlockExtension- Parameters:
state- The state of the block being brokenlevel- The levelpos- The position of the block being brokenblockEntity- The block entity, if anybreaker- The entity who broke the block, if knowntool- The item stack used to break the block. May be empty- Returns:
- The amount of experience points dropped by this block
-