Class Allay.VibrationUser
java.lang.Object
net.minecraft.world.entity.animal.allay.Allay.VibrationUser
- All Implemented Interfaces:
VibrationSystem.User
- Enclosing class:
Allay
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanReceiveVibration(ServerLevel level, BlockPos pos, Holder<GameEvent> event, GameEvent.Context context) intvoidonReceiveVibration(ServerLevel level, BlockPos pos, Holder<GameEvent> event, @Nullable Entity sourceEntity, @Nullable Entity projectileOwner, float receivingDistance) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface VibrationSystem.User
calculateTravelTimeInTicks, canTriggerAvoidVibration, isValidVibration, onDataChanged, requiresAdjacentChunksToBeTicking
-
Field Details
-
VIBRATION_EVENT_LISTENER_RANGE
private static final int VIBRATION_EVENT_LISTENER_RANGE- See Also:
-
positionSource
-
-
Constructor Details
-
VibrationUser
private VibrationUser()
-
-
Method Details
-
getListenerRadius
public int getListenerRadius()- Specified by:
getListenerRadiusin interfaceVibrationSystem.User
-
getPositionSource
- Specified by:
getPositionSourcein interfaceVibrationSystem.User
-
canReceiveVibration
public boolean canReceiveVibration(ServerLevel level, BlockPos pos, Holder<GameEvent> event, GameEvent.Context context) - Specified by:
canReceiveVibrationin interfaceVibrationSystem.User
-
onReceiveVibration
public void onReceiveVibration(ServerLevel level, BlockPos pos, Holder<GameEvent> event, @Nullable Entity sourceEntity, @Nullable Entity projectileOwner, float receivingDistance) - Specified by:
onReceiveVibrationin interfaceVibrationSystem.User
-
getListenableEvents
- Specified by:
getListenableEventsin interfaceVibrationSystem.User
-