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 BlockPos
static final int
private final PositionSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canReceiveVibration
(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, GameEvent.Context pContext) boolean
int
void
void
onReceiveVibration
(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, Entity pEntity, Entity pPlayerEntity, float pDistance) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getListenerRadius
in interfaceVibrationSystem.User
-
getPositionSource
- Specified by:
getPositionSource
in interfaceVibrationSystem.User
-
canTriggerAvoidVibration
public boolean canTriggerAvoidVibration()- Specified by:
canTriggerAvoidVibration
in interfaceVibrationSystem.User
-
canReceiveVibration
public boolean canReceiveVibration(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, @Nullable GameEvent.Context pContext) - Specified by:
canReceiveVibration
in interfaceVibrationSystem.User
-
onReceiveVibration
public void onReceiveVibration(ServerLevel pLevel, BlockPos pPos, Holder<GameEvent> pGameEvent, @Nullable Entity pEntity, @Nullable Entity pPlayerEntity, float pDistance) - Specified by:
onReceiveVibration
in interfaceVibrationSystem.User
-
onDataChanged
public void onDataChanged()- Specified by:
onDataChanged
in interfaceVibrationSystem.User
-
requiresAdjacentChunksToBeTicking
public boolean requiresAdjacentChunksToBeTicking()- Specified by:
requiresAdjacentChunksToBeTicking
in interfaceVibrationSystem.User
-