Class LookControl

java.lang.Object
net.minecraft.entity.ai.control.LookControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
BeeEntity.BeeLookControl, CamelEntity.CamelLookControl, FoxEntity.FoxLookControl, FrogEntity.FrogLookControl, PhantomEntity.PhantomLookControl, ShulkerEntity.ShulkerLookControl, YawAdjustingLookControl

public class LookControl extends Object implements Control
The look control adjusts a mob's rotations to look at a target position.
Mappings:
Namespace Name
named net/minecraft/entity/ai/control/LookControl
intermediary net/minecraft/class_1333
official bzm
  • Field Details

    • entity

      protected final MobEntity entity
      Mappings:
      Namespace Name Mixin selector
      named entity Lnet/minecraft/entity/ai/control/LookControl;entity:Lnet/minecraft/entity/mob/MobEntity;
      intermediary field_6361 Lnet/minecraft/class_1333;field_6361:Lnet/minecraft/class_1308;
      official a Lbzm;a:Lbtn;
    • maxYawChange

      protected float maxYawChange
      Mappings:
      Namespace Name Mixin selector
      named maxYawChange Lnet/minecraft/entity/ai/control/LookControl;maxYawChange:F
      intermediary field_6359 Lnet/minecraft/class_1333;field_6359:F
      official b Lbzm;b:F
    • maxPitchChange

      protected float maxPitchChange
      Mappings:
      Namespace Name Mixin selector
      named maxPitchChange Lnet/minecraft/entity/ai/control/LookControl;maxPitchChange:F
      intermediary field_6358 Lnet/minecraft/class_1333;field_6358:F
      official c Lbzm;c:F
    • lookAtTimer

      protected int lookAtTimer
      Mappings:
      Namespace Name Mixin selector
      named lookAtTimer Lnet/minecraft/entity/ai/control/LookControl;lookAtTimer:I
      intermediary field_35103 Lnet/minecraft/class_1333;field_35103:I
      official d Lbzm;d:I
    • x

      protected double x
      Mappings:
      Namespace Name Mixin selector
      named x Lnet/minecraft/entity/ai/control/LookControl;x:D
      intermediary field_6364 Lnet/minecraft/class_1333;field_6364:D
      official e Lbzm;e:D
    • y

      protected double y
      Mappings:
      Namespace Name Mixin selector
      named y Lnet/minecraft/entity/ai/control/LookControl;y:D
      intermediary field_6363 Lnet/minecraft/class_1333;field_6363:D
      official f Lbzm;f:D
    • z

      protected double z
      Mappings:
      Namespace Name Mixin selector
      named z Lnet/minecraft/entity/ai/control/LookControl;z:D
      intermediary field_6362 Lnet/minecraft/class_1333;field_6362:D
      official g Lbzm;g:D
  • Constructor Details

    • LookControl

      public LookControl(MobEntity entity)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/entity/ai/control/LookControl;<init>(Lnet/minecraft/entity/mob/MobEntity;)V
      intermediary <init> Lnet/minecraft/class_1333;<init>(Lnet/minecraft/class_1308;)V
      official <init> Lbzm;<init>(Lbtn;)V
  • Method Details

    • lookAt

      public void lookAt(Vec3d direction)
      Mappings:
      Namespace Name Mixin selector
      named lookAt Lnet/minecraft/entity/ai/control/LookControl;lookAt(Lnet/minecraft/util/math/Vec3d;)V
      intermediary method_19615 Lnet/minecraft/class_1333;method_19615(Lnet/minecraft/class_243;)V
      official a Lbzm;a(Leww;)V
    • lookAt

      public void lookAt(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      named lookAt Lnet/minecraft/entity/ai/control/LookControl;lookAt(Lnet/minecraft/entity/Entity;)V
      intermediary method_35111 Lnet/minecraft/class_1333;method_35111(Lnet/minecraft/class_1297;)V
      official a Lbzm;a(Lbsq;)V
    • lookAt

      public void lookAt(Entity entity, float maxYawChange, float maxPitchChange)
      Mappings:
      Namespace Name Mixin selector
      named lookAt Lnet/minecraft/entity/ai/control/LookControl;lookAt(Lnet/minecraft/entity/Entity;FF)V
      intermediary method_6226 Lnet/minecraft/class_1333;method_6226(Lnet/minecraft/class_1297;FF)V
      official a Lbzm;a(Lbsq;FF)V
    • lookAt

      public void lookAt(double x, double y, double z)
      Mappings:
      Namespace Name Mixin selector
      named lookAt Lnet/minecraft/entity/ai/control/LookControl;lookAt(DDD)V
      intermediary method_20248 Lnet/minecraft/class_1333;method_20248(DDD)V
      official a Lbzm;a(DDD)V
    • lookAt

      public void lookAt(double x, double y, double z, float maxYawChange, float maxPitchChange)
      Mappings:
      Namespace Name Mixin selector
      named lookAt Lnet/minecraft/entity/ai/control/LookControl;lookAt(DDDFF)V
      intermediary method_6230 Lnet/minecraft/class_1333;method_6230(DDDFF)V
      official a Lbzm;a(DDDFF)V
    • tick

      public void tick()
      Mappings:
      Namespace Name Mixin selector
      named tick Lnet/minecraft/entity/ai/control/LookControl;tick()V
      intermediary method_6231 Lnet/minecraft/class_1333;method_6231()V
      official a Lbzm;a()V
    • clampHeadYaw

      protected void clampHeadYaw()
      Mappings:
      Namespace Name Mixin selector
      named clampHeadYaw Lnet/minecraft/entity/ai/control/LookControl;clampHeadYaw()V
      intermediary method_36980 Lnet/minecraft/class_1333;method_36980()V
      official b Lbzm;b()V
    • shouldStayHorizontal

      protected boolean shouldStayHorizontal()
      Mappings:
      Namespace Name Mixin selector
      named shouldStayHorizontal Lnet/minecraft/entity/ai/control/LookControl;shouldStayHorizontal()Z
      intermediary method_20433 Lnet/minecraft/class_1333;method_20433()Z
      official c Lbzm;c()Z
    • isLookingAtSpecificPosition

      public boolean isLookingAtSpecificPosition()
      Mappings:
      Namespace Name Mixin selector
      named isLookingAtSpecificPosition Lnet/minecraft/entity/ai/control/LookControl;isLookingAtSpecificPosition()Z
      intermediary method_38970 Lnet/minecraft/class_1333;method_38970()Z
      official d Lbzm;d()Z
    • getLookX

      public double getLookX()
      Mappings:
      Namespace Name Mixin selector
      named getLookX Lnet/minecraft/entity/ai/control/LookControl;getLookX()D
      intermediary method_6225 Lnet/minecraft/class_1333;method_6225()D
      official e Lbzm;e()D
    • getLookY

      public double getLookY()
      Mappings:
      Namespace Name Mixin selector
      named getLookY Lnet/minecraft/entity/ai/control/LookControl;getLookY()D
      intermediary method_6227 Lnet/minecraft/class_1333;method_6227()D
      official f Lbzm;f()D
    • getLookZ

      public double getLookZ()
      Mappings:
      Namespace Name Mixin selector
      named getLookZ Lnet/minecraft/entity/ai/control/LookControl;getLookZ()D
      intermediary method_6228 Lnet/minecraft/class_1333;method_6228()D
      official g Lbzm;g()D
    • getTargetPitch

      protected Optional<Float> getTargetPitch()
      Mappings:
      Namespace Name Mixin selector
      named getTargetPitch Lnet/minecraft/entity/ai/control/LookControl;getTargetPitch()Ljava/util/Optional;
      intermediary method_20250 Lnet/minecraft/class_1333;method_20250()Ljava/util/Optional;
      official h Lbzm;h()Ljava/util/Optional;
    • getTargetYaw

      protected Optional<Float> getTargetYaw()
      Mappings:
      Namespace Name Mixin selector
      named getTargetYaw Lnet/minecraft/entity/ai/control/LookControl;getTargetYaw()Ljava/util/Optional;
      intermediary method_20251 Lnet/minecraft/class_1333;method_20251()Ljava/util/Optional;
      official i Lbzm;i()Ljava/util/Optional;
    • changeAngle

      protected float changeAngle(float from, float to, float max)
      Changes the angle from from to to, or by max degrees if to is too big a change.

      This is the same as MobEntity.changeAngle(float, float, float).

      Mappings:
      Namespace Name Mixin selector
      named changeAngle Lnet/minecraft/entity/ai/control/LookControl;changeAngle(FFF)F
      intermediary method_6229 Lnet/minecraft/class_1333;method_6229(FFF)F
      official a Lbzm;a(FFF)F
    • getLookingHeightFor

      private static double getLookingHeightFor(Entity entity)
      Mappings:
      Namespace Name Mixin selector
      named getLookingHeightFor Lnet/minecraft/entity/ai/control/LookControl;getLookingHeightFor(Lnet/minecraft/entity/Entity;)D
      intermediary method_20249 Lnet/minecraft/class_1333;method_20249(Lnet/minecraft/class_1297;)D
      official b Lbzm;b(Lbsq;)D