Class VibrationListener

java.lang.Object
net.minecraft.world.event.listener.VibrationListener
All Implemented Interfaces:
GameEventListener

public class VibrationListener extends Object implements GameEventListener
Mappings:
Namespace Name
official ddk
intermediary net/minecraft/class_5718
named net/minecraft/world/event/listener/VibrationListener
  • Field Details

    • FREQUENCIES

      public static final Object2IntMap<GameEvent> FREQUENCIES
      Mappings:
      Namespace Name Mixin selector
      official a Lddk;a:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      intermediary field_40356 Lnet/minecraft/class_5718;field_40356:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      named FREQUENCIES Lnet/minecraft/world/event/listener/VibrationListener;FREQUENCIES:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
    • positionSource

      protected final PositionSource positionSource
      Mappings:
      Namespace Name Mixin selector
      official b Lddk;b:Lddg;
      intermediary field_28187 Lnet/minecraft/class_5718;field_28187:Lnet/minecraft/class_5716;
      named positionSource Lnet/minecraft/world/event/listener/VibrationListener;positionSource:Lnet/minecraft/world/event/PositionSource;
    • range

      protected final int range
      Mappings:
      Namespace Name Mixin selector
      official c Lddk;c:I
      intermediary field_28188 Lnet/minecraft/class_5718;field_28188:I
      named range Lnet/minecraft/world/event/listener/VibrationListener;range:I
    • callback

      protected final VibrationListener.Callback callback
      Mappings:
      Namespace Name Mixin selector
      official d Lddk;d:Lddk$a;
      intermediary field_28189 Lnet/minecraft/class_5718;field_28189:Lnet/minecraft/class_5718$class_5719;
      named callback Lnet/minecraft/world/event/listener/VibrationListener;callback:Lnet/minecraft/world/event/listener/VibrationListener$Callback;
    • vibration

      @Nullable protected @Nullable Vibration vibration
      Mappings:
      Namespace Name Mixin selector
      official e Lddk;e:Lddj;
      intermediary field_40357 Lnet/minecraft/class_5718;field_40357:Lnet/minecraft/class_7269;
      named vibration Lnet/minecraft/world/event/listener/VibrationListener;vibration:Lnet/minecraft/world/event/listener/Vibration;
    • delay

      protected int delay
      Mappings:
      Namespace Name Mixin selector
      official f Lddk;f:I
      intermediary field_28192 Lnet/minecraft/class_5718;field_28192:I
      named delay Lnet/minecraft/world/event/listener/VibrationListener;delay:I
    • selector

      private final VibrationSelector selector
      Mappings:
      Namespace Name Mixin selector
      official g Lddk;g:Lddl;
      intermediary field_40358 Lnet/minecraft/class_5718;field_40358:Lnet/minecraft/class_7722;
      named selector Lnet/minecraft/world/event/listener/VibrationListener;selector:Lnet/minecraft/world/event/listener/VibrationSelector;
  • Constructor Details

    • VibrationListener

      private VibrationListener(PositionSource positionSource, int range, VibrationListener.Callback callback, @Nullable @Nullable Vibration vibration, VibrationSelector selector, int delay)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lddk;<init>(Lddg;ILddk$a;Lddj;Lddl;I)V
      intermediary <init> Lnet/minecraft/class_5718;<init>(Lnet/minecraft/class_5716;ILnet/minecraft/class_5718$class_5719;Lnet/minecraft/class_7269;Lnet/minecraft/class_7722;I)V
      named <init> Lnet/minecraft/world/event/listener/VibrationListener;<init>(Lnet/minecraft/world/event/PositionSource;ILnet/minecraft/world/event/listener/VibrationListener$Callback;Lnet/minecraft/world/event/listener/Vibration;Lnet/minecraft/world/event/listener/VibrationSelector;I)V
    • VibrationListener

      public VibrationListener(PositionSource positionSource, int range, VibrationListener.Callback callback)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lddk;<init>(Lddg;ILddk$a;)V
      intermediary <init> Lnet/minecraft/class_5718;<init>(Lnet/minecraft/class_5716;ILnet/minecraft/class_5718$class_5719;)V
      named <init> Lnet/minecraft/world/event/listener/VibrationListener;<init>(Lnet/minecraft/world/event/PositionSource;ILnet/minecraft/world/event/listener/VibrationListener$Callback;)V
  • Method Details

    • createCodec

      public static com.mojang.serialization.Codec<VibrationListener> createCodec(VibrationListener.Callback callback)
      Mappings:
      Namespace Name Mixin selector
      official a Lddk;a(Lddk$a;)Lcom/mojang/serialization/Codec;
      intermediary method_42340 Lnet/minecraft/class_5718;method_42340(Lnet/minecraft/class_5718$class_5719;)Lcom/mojang/serialization/Codec;
      named createCodec Lnet/minecraft/world/event/listener/VibrationListener;createCodec(Lnet/minecraft/world/event/listener/VibrationListener$Callback;)Lcom/mojang/serialization/Codec;
    • getFrequency

      public static int getFrequency(GameEvent event)
      Mappings:
      Namespace Name Mixin selector
      official a Lddk;a(Lddc;)I
      intermediary method_45496 Lnet/minecraft/class_5718;method_45496(Lnet/minecraft/class_5712;)I
      named getFrequency Lnet/minecraft/world/event/listener/VibrationListener;getFrequency(Lnet/minecraft/world/event/GameEvent;)I
    • tick

      public void tick(World world)
      Mappings:
      Namespace Name Mixin selector
      official a Lddk;a(Lcjw;)V
      intermediary method_32964 Lnet/minecraft/class_5718;method_32964(Lnet/minecraft/class_1937;)V
      named tick Lnet/minecraft/world/event/listener/VibrationListener;tick(Lnet/minecraft/world/World;)V
    • getPositionSource

      public PositionSource getPositionSource()
      Returns the position source of this listener.
      Specified by:
      getPositionSource in interface GameEventListener
      Mappings:
      Namespace Name Mixin selector
      official a Ldde;a()Lddg;
      intermediary method_32946 Lnet/minecraft/class_5714;method_32946()Lnet/minecraft/class_5716;
      named getPositionSource Lnet/minecraft/world/event/listener/GameEventListener;getPositionSource()Lnet/minecraft/world/event/PositionSource;
    • getRange

      public int getRange()
      Returns the range, in blocks, of the listener.
      Specified by:
      getRange in interface GameEventListener
      Mappings:
      Namespace Name Mixin selector
      official b Ldde;b()I
      intermediary method_32948 Lnet/minecraft/class_5714;method_32948()I
      named getRange Lnet/minecraft/world/event/listener/GameEventListener;getRange()I
    • listen

      public boolean listen(ServerWorld world, GameEvent event, GameEvent.Emitter emitter, Vec3d emitterPos)
      Listens to an incoming game event.
      Specified by:
      listen in interface GameEventListener
      Returns:
      true if the game event has been accepted by this listener
      Mappings:
      Namespace Name Mixin selector
      official a Ldde;a(Lahm;Lddc;Lddc$a;Leae;)Z
      intermediary method_32947 Lnet/minecraft/class_5714;method_32947(Lnet/minecraft/class_3218;Lnet/minecraft/class_5712;Lnet/minecraft/class_5712$class_7397;Lnet/minecraft/class_243;)Z
      named listen Lnet/minecraft/world/event/listener/GameEventListener;listen(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/world/event/GameEvent$Emitter;Lnet/minecraft/util/math/Vec3d;)Z
    • forceListen

      public void forceListen(ServerWorld world, GameEvent event, GameEvent.Emitter emitter, Vec3d emitterPos)
      Mappings:
      Namespace Name Mixin selector
      official b Lddk;b(Lahm;Lddc;Lddc$a;Leae;)V
      intermediary method_45498 Lnet/minecraft/class_5718;method_45498(Lnet/minecraft/class_3218;Lnet/minecraft/class_5712;Lnet/minecraft/class_5712$class_7397;Lnet/minecraft/class_243;)V
      named forceListen Lnet/minecraft/world/event/listener/VibrationListener;forceListen(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/world/event/GameEvent$Emitter;Lnet/minecraft/util/math/Vec3d;)V
    • trySelect

      public void trySelect(ServerWorld world, GameEvent event, GameEvent.Emitter emitter, Vec3d emitterPos, Vec3d listenerPos)
      Mappings:
      Namespace Name Mixin selector
      official a Lddk;a(Lahm;Lddc;Lddc$a;Leae;Leae;)V
      intermediary method_45494 Lnet/minecraft/class_5718;method_45494(Lnet/minecraft/class_3218;Lnet/minecraft/class_5712;Lnet/minecraft/class_5712$class_7397;Lnet/minecraft/class_243;Lnet/minecraft/class_243;)V
      named trySelect Lnet/minecraft/world/event/listener/VibrationListener;trySelect(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/world/event/GameEvent$Emitter;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)V
    • isOccluded

      private static boolean isOccluded(World world, Vec3d start, Vec3d end)
      Mappings:
      Namespace Name Mixin selector
      official a Lddk;a(Lcjw;Leae;Leae;)Z
      intermediary method_32966 Lnet/minecraft/class_5718;method_32966(Lnet/minecraft/class_1937;Lnet/minecraft/class_243;Lnet/minecraft/class_243;)Z
      named isOccluded Lnet/minecraft/world/event/listener/VibrationListener;isOccluded(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Z