Class LookControl

java.lang.Object
net.minecraft.world.entity.ai.control.LookControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
Bee.BeeLookControl, Fox.FoxLookControl, Phantom.PhantomLookControl, Shulker.ShulkerLookControl, SmoothSwimmingLookControl

public class LookControl extends Object implements Control
  • Field Details

    • mob

      protected final Mob mob
    • yMaxRotSpeed

      protected float yMaxRotSpeed
    • xMaxRotAngle

      protected float xMaxRotAngle
    • hasWanted

      protected boolean hasWanted
    • wantedX

      protected double wantedX
    • wantedY

      protected double wantedY
    • wantedZ

      protected double wantedZ
  • Constructor Details

    • LookControl

      public LookControl(Mob p_24945_)
  • Method Details

    • setLookAt

      public void setLookAt(Vec3 p_24965_)
    • setLookAt

      public void setLookAt(Entity p_148052_)
    • setLookAt

      public void setLookAt(Entity p_24961_, float p_24962_, float p_24963_)
    • setLookAt

      public void setLookAt(double p_24947_, double p_24948_, double p_24949_)
    • setLookAt

      public void setLookAt(double p_24951_, double p_24952_, double p_24953_, float p_24954_, float p_24955_)
    • tick

      public void tick()
    • clampHeadRotationToBody

      protected void clampHeadRotationToBody()
    • resetXRotOnTick

      protected boolean resetXRotOnTick()
    • isHasWanted

      public boolean isHasWanted()
    • getWantedX

      public double getWantedX()
    • getWantedY

      public double getWantedY()
    • getWantedZ

      public double getWantedZ()
    • getXRotD

      protected Optional<Float> getXRotD()
    • getYRotD

      protected Optional<Float> getYRotD()
    • rotateTowards

      protected float rotateTowards(float p_24957_, float p_24958_, float p_24959_)
    • getWantedY

      private static double getWantedY(Entity p_24967_)