Class SculkSensorListener
java.lang.Object
net.minecraft.world.event.listener.SculkSensorListener
- All Implemented Interfaces:
GameEventListener
- Mappings:
Namespace Name official cwtintermediary net/minecraft/class_5718named net/minecraft/world/event/listener/SculkSensorListener
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final SculkSensorListener.Callbackprotected intprotected intprotected final PositionSourceprotected final intprotected @Nullable SculkSensorListener.Vibration -
Constructor Summary
ConstructorsConstructorDescriptionSculkSensorListener(PositionSource positionSource, int range, SculkSensorListener.Callback callback, @Nullable SculkSensorListener.Vibration vibration, int distance, int delay) -
Method Summary
Modifier and TypeMethodDescriptionstatic com.mojang.serialization.Codec<SculkSensorListener>createCodec(SculkSensorListener.Callback callback) Returns the position source of this listener.intgetRange()Returns the range, in blocks, of the listener.private static booleanisOccluded(World world, Vec3d start, Vec3d end) booleanlisten(ServerWorld world, GameEvent event, GameEvent.class_7397 class_7397, Vec3d pos) Listens to an incoming game event.private voidlisten(ServerWorld world, GameEvent gameEvent, GameEvent.class_7397 class_7397, Vec3d start, Vec3d end) void
-
Field Details
-
positionSource
- Mappings:
Namespace Name Mixin selector official aLcwt;a:Lcwq;intermediary field_28187Lnet/minecraft/class_5718;field_28187:Lnet/minecraft/class_5716;named positionSourceLnet/minecraft/world/event/listener/SculkSensorListener;positionSource:Lnet/minecraft/world/event/PositionSource;
-
range
protected final int range- Mappings:
Namespace Name Mixin selector official bLcwt;b:Iintermediary field_28188Lnet/minecraft/class_5718;field_28188:Inamed rangeLnet/minecraft/world/event/listener/SculkSensorListener;range:I
-
callback
- Mappings:
Namespace Name Mixin selector official cLcwt;c:Lcwt$b;intermediary field_28189Lnet/minecraft/class_5718;field_28189:Lnet/minecraft/class_5718$class_5719;named callbackLnet/minecraft/world/event/listener/SculkSensorListener;callback:Lnet/minecraft/world/event/listener/SculkSensorListener$Callback;
-
vibration
- Mappings:
Namespace Name Mixin selector official dLcwt;d:Lcwt$a;intermediary field_28190Lnet/minecraft/class_5718;field_28190:Lnet/minecraft/class_5718$class_7269;named vibrationLnet/minecraft/world/event/listener/SculkSensorListener;vibration:Lnet/minecraft/world/event/listener/SculkSensorListener$Vibration;
-
distance
protected int distance- Mappings:
Namespace Name Mixin selector official eLcwt;e:Iintermediary field_28191Lnet/minecraft/class_5718;field_28191:Inamed distanceLnet/minecraft/world/event/listener/SculkSensorListener;distance:I
-
delay
protected int delay- Mappings:
Namespace Name Mixin selector official fLcwt;f:Iintermediary field_28192Lnet/minecraft/class_5718;field_28192:Inamed delayLnet/minecraft/world/event/listener/SculkSensorListener;delay:I
-
-
Constructor Details
-
SculkSensorListener
public SculkSensorListener(PositionSource positionSource, int range, SculkSensorListener.Callback callback, @Nullable @Nullable SculkSensorListener.Vibration vibration, int distance, int delay) - Mappings:
Namespace Name Mixin selector official <init>Lcwt;<init>(Lcwq;ILcwt$b;Lcwt$a;II)Vintermediary <init>Lnet/minecraft/class_5718;<init>(Lnet/minecraft/class_5716;ILnet/minecraft/class_5718$class_5719;Lnet/minecraft/class_5718$class_7269;II)Vnamed <init>Lnet/minecraft/world/event/listener/SculkSensorListener;<init>(Lnet/minecraft/world/event/PositionSource;ILnet/minecraft/world/event/listener/SculkSensorListener$Callback;Lnet/minecraft/world/event/listener/SculkSensorListener$Vibration;II)V
-
-
Method Details
-
createCodec
public static com.mojang.serialization.Codec<SculkSensorListener> createCodec(SculkSensorListener.Callback callback) - Mappings:
Namespace Name Mixin selector official aLcwt;a(Lcwt$b;)Lcom/mojang/serialization/Codec;intermediary method_42340Lnet/minecraft/class_5718;method_42340(Lnet/minecraft/class_5718$class_5719;)Lcom/mojang/serialization/Codec;named createCodecLnet/minecraft/world/event/listener/SculkSensorListener;createCodec(Lnet/minecraft/world/event/listener/SculkSensorListener$Callback;)Lcom/mojang/serialization/Codec;
-
tick
- Mappings:
Namespace Name Mixin selector official aLcwt;a(Lcdu;)Vintermediary method_32964Lnet/minecraft/class_5718;method_32964(Lnet/minecraft/class_1937;)Vnamed tickLnet/minecraft/world/event/listener/SculkSensorListener;tick(Lnet/minecraft/world/World;)V
-
getPositionSource
Returns the position source of this listener.- Specified by:
getPositionSourcein interfaceGameEventListener- Mappings:
Namespace Name Mixin selector official tLcwp;t()Lcwq;intermediary method_32946Lnet/minecraft/class_5714;method_32946()Lnet/minecraft/class_5716;named getPositionSourceLnet/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:
getRangein interfaceGameEventListener- Mappings:
Namespace Name Mixin selector official fFLcwp;fF()Iintermediary method_32948Lnet/minecraft/class_5714;method_32948()Inamed getRangeLnet/minecraft/world/event/listener/GameEventListener;getRange()I
-
listen
public boolean listen(ServerWorld world, GameEvent event, GameEvent.class_7397 class_7397, Vec3d pos) Listens to an incoming game event.- Specified by:
listenin interfaceGameEventListener- Returns:
trueif the game event has been accepted by this listener- Mappings:
Namespace Name Mixin selector official aLcwp;a(Laek;Lcwn;Lcwn$a;Ldth;)Zintermediary method_32947Lnet/minecraft/class_5714;method_32947(Lnet/minecraft/class_3218;Lnet/minecraft/class_5712;Lnet/minecraft/class_5712$class_7397;Lnet/minecraft/class_243;)Znamed listenLnet/minecraft/world/event/listener/GameEventListener;listen(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/world/event/GameEvent$class_7397;Lnet/minecraft/util/math/Vec3d;)Z
-
listen
private void listen(ServerWorld world, GameEvent gameEvent, GameEvent.class_7397 class_7397, Vec3d start, Vec3d end) - Mappings:
Namespace Name Mixin selector official aLcwt;a(Laek;Lcwn;Lcwn$a;Ldth;Ldth;)Vintermediary method_42339Lnet/minecraft/class_5718;method_42339(Lnet/minecraft/class_3218;Lnet/minecraft/class_5712;Lnet/minecraft/class_5712$class_7397;Lnet/minecraft/class_243;Lnet/minecraft/class_243;)Vnamed listenLnet/minecraft/world/event/listener/SculkSensorListener;listen(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/event/GameEvent;Lnet/minecraft/world/event/GameEvent$class_7397;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)V
-
isOccluded
- Mappings:
Namespace Name Mixin selector official aLcwt;a(Lcdu;Ldth;Ldth;)Zintermediary method_32966Lnet/minecraft/class_5718;method_32966(Lnet/minecraft/class_1937;Lnet/minecraft/class_243;Lnet/minecraft/class_243;)Znamed isOccludedLnet/minecraft/world/event/listener/SculkSensorListener;isOccluded(Lnet/minecraft/world/World;Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Z
-