Class VibrationListener
java.lang.Object
net.minecraft.world.level.gameevent.vibrations.VibrationListener
- All Implemented Interfaces:
GameEventListener
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static interface
-
Field Summary
Modifier and TypeFieldDescriptionprotected final VibrationListener.VibrationListenerConfig
protected final int
protected final PositionSource
protected float
protected VibrationListener.ReceivingEvent
protected int
-
Constructor Summary
ConstructorDescriptionVibrationListener
(PositionSource p_223760_, int p_223761_, VibrationListener.VibrationListenerConfig p_223762_, VibrationListener.ReceivingEvent p_223763_, float p_223764_, int p_223765_) -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.Codec<VibrationListener>
codec
(VibrationListener.VibrationListenerConfig p_223782_) int
boolean
handleGameEvent
(ServerLevel p_223767_, GameEvent.Message p_223768_) private static boolean
isOccluded
(Level p_223776_, Vec3 p_223777_, Vec3 p_223778_) private void
scheduleSignal
(ServerLevel p_223770_, GameEvent p_223771_, GameEvent.Context p_223772_, Vec3 p_223773_, Vec3 p_223774_) void
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.GameEventListener
handleEventsImmediately
-
Field Details
-
listenerSource
-
listenerRange
protected final int listenerRange -
config
-
receivingEvent
-
receivingDistance
protected float receivingDistance -
travelTimeInTicks
protected int travelTimeInTicks
-
-
Constructor Details
-
VibrationListener
public VibrationListener(PositionSource p_223760_, int p_223761_, VibrationListener.VibrationListenerConfig p_223762_, @Nullable VibrationListener.ReceivingEvent p_223763_, float p_223764_, int p_223765_)
-
-
Method Details
-
codec
public static com.mojang.serialization.Codec<VibrationListener> codec(VibrationListener.VibrationListenerConfig p_223782_) -
tick
-
getListenerSource
- Specified by:
getListenerSource
in interfaceGameEventListener
-
getListenerRadius
public int getListenerRadius()- Specified by:
getListenerRadius
in interfaceGameEventListener
-
handleGameEvent
- Specified by:
handleGameEvent
in interfaceGameEventListener
-
scheduleSignal
private void scheduleSignal(ServerLevel p_223770_, GameEvent p_223771_, GameEvent.Context p_223772_, Vec3 p_223773_, Vec3 p_223774_) -
isOccluded
-