Class VibrationListener
java.lang.Object
net.minecraft.world.level.gameevent.vibrations.VibrationListener
- All Implemented Interfaces:
GameEventListener
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprotected int
protected PositionSource
protected int
protected int
-
Constructor Summary
ConstructorDescriptionVibrationListener(PositionSource p_157894_, int p_157895_, VibrationListener.VibrationListenerConfig p_157896_)
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
handleGameEvent(Level p_157901_, GameEvent p_157902_, Entity p_157903_, BlockPos p_157904_)
private boolean
isOccluded(Level p_157911_, BlockPos p_157912_, BlockPos p_157913_)
private boolean
isValidVibration(GameEvent p_157917_, Entity p_157918_)
private void
sendSignal(Level p_157906_, GameEvent p_157907_, BlockPos p_157908_, BlockPos p_157909_)
void
-
Field Details
-
listenerSource
-
listenerRange
protected final int listenerRange -
config
-
receivingEvent
-
receivingDistance
protected int receivingDistance -
travelTimeInTicks
protected int travelTimeInTicks
-
-
Constructor Details
-
VibrationListener
public VibrationListener(PositionSource p_157894_, int p_157895_, VibrationListener.VibrationListenerConfig p_157896_)
-
-
Method Details
-
tick
-
getListenerSource
- Specified by:
getListenerSource
in interfaceGameEventListener
-
getListenerRadius
public int getListenerRadius()- Specified by:
getListenerRadius
in interfaceGameEventListener
-
handleGameEvent
public boolean handleGameEvent(Level p_157901_, GameEvent p_157902_, @Nullable Entity p_157903_, BlockPos p_157904_)- Specified by:
handleGameEvent
in interfaceGameEventListener
-
isValidVibration
-
sendSignal
-
isOccluded
-