Class SculkSensorListener

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

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

    • positionSource

      protected final PositionSource positionSource
      Mappings:
      Namespace Name Mixin selector
      official a Lctf;a:Lctc;
      intermediary field_28187 Lnet/minecraft/class_5718;field_28187:Lnet/minecraft/class_5716;
      named positionSource Lnet/minecraft/world/event/listener/SculkSensorListener;positionSource:Lnet/minecraft/world/event/PositionSource;
    • range

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

      protected final SculkSensorListener.Callback callback
      Mappings:
      Namespace Name Mixin selector
      official c Lctf;c:Lctf$a;
      intermediary field_28189 Lnet/minecraft/class_5718;field_28189:Lnet/minecraft/class_5718$class_5719;
      named callback Lnet/minecraft/world/event/listener/SculkSensorListener;callback:Lnet/minecraft/world/event/listener/SculkSensorListener$Callback;
    • event

      protected Optional<GameEvent> event
      Mappings:
      Namespace Name Mixin selector
      official d Lctf;d:Ljava/util/Optional;
      intermediary field_28190 Lnet/minecraft/class_5718;field_28190:Ljava/util/Optional;
      named event Lnet/minecraft/world/event/listener/SculkSensorListener;event:Ljava/util/Optional;
    • distance

      protected int distance
      Mappings:
      Namespace Name Mixin selector
      official e Lctf;e:I
      intermediary field_28191 Lnet/minecraft/class_5718;field_28191:I
      named distance Lnet/minecraft/world/event/listener/SculkSensorListener;distance:I
    • delay

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

    • SculkSensorListener

      public SculkSensorListener(PositionSource positionSource, int range, SculkSensorListener.Callback listener)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lctf;<init>(Lctc;ILctf$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/SculkSensorListener;<init>(Lnet/minecraft/world/event/PositionSource;ILnet/minecraft/world/event/listener/SculkSensorListener$Callback;)V
  • Method Details

    • tick

      public void tick(World world)
      Mappings:
      Namespace Name Mixin selector
      official a Lctf;a(Lcav;)V
      intermediary method_32964 Lnet/minecraft/class_5718;method_32964(Lnet/minecraft/class_1937;)V
      named tick Lnet/minecraft/world/event/listener/SculkSensorListener;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 Lcta;a()Lctc;
      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 Lcta;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(World world, GameEvent event, @Nullable @Nullable Entity entity, BlockPos pos)
      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 Lcta;a(Lcav;Lcsy;Laxk;Lgj;)Z
      intermediary method_32947 Lnet/minecraft/class_5714;method_32947(Lnet/minecraft/class_1937;Lnet/minecraft/class_5712;Lnet/minecraft/class_1297;Lnet/minecraft/class_2338;)Z
      named listen Lnet/minecraft/world/event/listener/GameEventListener;listen(Lnet/minecraft/world/World;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/BlockPos;)Z
    • shouldActivate

      private boolean shouldActivate(GameEvent event, @Nullable @Nullable Entity entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lctf;a(Lcsy;Laxk;)Z
      intermediary method_32968 Lnet/minecraft/class_5718;method_32968(Lnet/minecraft/class_5712;Lnet/minecraft/class_1297;)Z
      named shouldActivate Lnet/minecraft/world/event/listener/SculkSensorListener;shouldActivate(Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/entity/Entity;)Z
    • listen

      private void listen(World world, GameEvent event, BlockPos pos, BlockPos sourcePos)
      Mappings:
      Namespace Name Mixin selector
      official a Lctf;a(Lcav;Lcsy;Lgj;Lgj;)V
      intermediary method_32965 Lnet/minecraft/class_5718;method_32965(Lnet/minecraft/class_1937;Lnet/minecraft/class_5712;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)V
      named listen Lnet/minecraft/world/event/listener/SculkSensorListener;listen(Lnet/minecraft/world/World;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)V
    • isOccluded

      private boolean isOccluded(World world, BlockPos pos, BlockPos sourcePos)
      Mappings:
      Namespace Name Mixin selector
      official a Lctf;a(Lcav;Lgj;Lgj;)Z
      intermediary method_32966 Lnet/minecraft/class_5718;method_32966(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;Lnet/minecraft/class_2338;)Z
      named isOccluded Lnet/minecraft/world/event/listener/SculkSensorListener;isOccluded(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/BlockPos;)Z