Class LookControl

java.lang.Object
net.minecraft.entity.ai.control.LookControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
BeeEntity.BeeLookControl, 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
official blx
intermediary net/minecraft/class_1333
named net/minecraft/entity/ai/control/LookControl
  • Field Details

    • entity

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

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

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

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

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

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

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

    • LookControl

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

    • lookAt

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

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

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

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

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

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

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

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

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

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

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

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

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

      protected Optional<Float> getTargetYaw()
      Mappings:
      Namespace Name Mixin selector
      official i Lblx;i()Ljava/util/Optional;
      intermediary method_20251 Lnet/minecraft/class_1333;method_20251()Ljava/util/Optional;
      named getTargetYaw Lnet/minecraft/entity/ai/control/LookControl;getTargetYaw()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
      official a Lblx;a(FFF)F
      intermediary method_6229 Lnet/minecraft/class_1333;method_6229(FFF)F
      named changeAngle Lnet/minecraft/entity/ai/control/LookControl;changeAngle(FFF)F
    • getLookingHeightFor

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