Class SculkSensorBlockEntity.VibrationUser
java.lang.Object
net.minecraft.world.level.block.entity.SculkSensorBlockEntity.VibrationUser
- All Implemented Interfaces:
VibrationSystem.User
- Direct Known Subclasses:
CalibratedSculkSensorBlockEntity.VibrationUser
- Enclosing class:
SculkSensorBlockEntity
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BlockPosstatic final intprivate final PositionSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanReceiveVibration(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, GameEvent.Context pContext) booleanintvoidvoidonReceiveVibration(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, Entity pEntity, Entity pPlayerEntity, float pDistance) booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.gameevent.vibrations.VibrationSystem.User
calculateTravelTimeInTicks, getListenableEvents, isValidVibration
-
Field Details
-
LISTENER_RANGE
public static final int LISTENER_RANGE- See Also:
-
blockPos
-
positionSource
-
-
Constructor Details
-
VibrationUser
-
-
Method Details
-
getListenerRadius
public int getListenerRadius()- Specified by:
getListenerRadiusin interfaceVibrationSystem.User
-
getPositionSource
- Specified by:
getPositionSourcein interfaceVibrationSystem.User
-
canTriggerAvoidVibration
public boolean canTriggerAvoidVibration()- Specified by:
canTriggerAvoidVibrationin interfaceVibrationSystem.User
-
canReceiveVibration
public boolean canReceiveVibration(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, @Nullable GameEvent.Context pContext) - Specified by:
canReceiveVibrationin interfaceVibrationSystem.User
-
onReceiveVibration
public void onReceiveVibration(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, @Nullable Entity pEntity, @Nullable Entity pPlayerEntity, float pDistance) - Specified by:
onReceiveVibrationin interfaceVibrationSystem.User
-
onDataChanged
public void onDataChanged()- Specified by:
onDataChangedin interfaceVibrationSystem.User
-
requiresAdjacentChunksToBeTicking
public boolean requiresAdjacentChunksToBeTicking()- Specified by:
requiresAdjacentChunksToBeTickingin interfaceVibrationSystem.User
-