Class BodyRotationControl

java.lang.Object
net.minecraft.world.entity.ai.control.BodyRotationControl
All Implemented Interfaces:
Control
Direct Known Subclasses:
Camel.CamelBodyRotationControl, Phantom.PhantomBodyRotationControl, Shulker.ShulkerBodyRotationControl

public class BodyRotationControl extends Object implements Control
  • Field Details

    • mob

      private final Mob mob
    • HEAD_STABLE_ANGLE

      private static final int HEAD_STABLE_ANGLE
      See Also:
    • DELAY_UNTIL_STARTING_TO_FACE_FORWARD

      private static final int DELAY_UNTIL_STARTING_TO_FACE_FORWARD
      See Also:
    • HOW_LONG_IT_TAKES_TO_FACE_FORWARD

      private static final int HOW_LONG_IT_TAKES_TO_FACE_FORWARD
      See Also:
    • headStableTime

      private int headStableTime
    • lastStableYHeadRot

      private float lastStableYHeadRot
  • Constructor Details

    • BodyRotationControl

      public BodyRotationControl(Mob p_24879_)
  • Method Details

    • clientTick

      public void clientTick()
    • rotateBodyIfNecessary

      private void rotateBodyIfNecessary()
    • rotateHeadIfNecessary

      private void rotateHeadIfNecessary()
    • rotateHeadTowardsFront

      private void rotateHeadTowardsFront()
    • notCarryingMobPassengers

      private boolean notCarryingMobPassengers()
    • isMoving

      private boolean isMoving()