Package net.minecraft.entity.ai.control
Class BodyControl
java.lang.Object
net.minecraft.entity.ai.control.BodyControl
- All Implemented Interfaces:
Control
- Direct Known Subclasses:
CamelEntity.CamelBodyControl
,PhantomEntity.PhantomBodyControl
,ShulkerEntity.ShulkerBodyControl
The body control ensures a mob's head and body yaws are kept up with each other.
- Mappings:
Namespace Name named net/minecraft/entity/ai/control/BodyControl
intermediary net/minecraft/class_1330
official byy
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
private int
private final MobEntity
private float
private static final int
private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
private boolean
isMoving()
private void
Keeps up the body yaw by ensuring it is within the max head rotation from the head yaw.private void
Keeps up the head yaw by ensuring it is within the max head rotation from the body yaw.private void
Gradually adjusts the body yaw toward the head yaw, starting after 10 ticks of wait and finishes by the 20th tick.void
tick()
Ticks the body control.
-
Field Details
-
BODY_KEEP_UP_THRESHOLD
private static final int BODY_KEEP_UP_THRESHOLD- See Also:
- Mappings:
Namespace Name Mixin selector named BODY_KEEP_UP_THRESHOLD
Lnet/minecraft/entity/ai/control/BodyControl;BODY_KEEP_UP_THRESHOLD:I
intermediary field_30194
Lnet/minecraft/class_1330;field_30194:I
official b
Lbyy;b:I
-
ROTATE_BODY_START_TICK
private static final int ROTATE_BODY_START_TICK- See Also:
- Mappings:
Namespace Name Mixin selector named ROTATE_BODY_START_TICK
Lnet/minecraft/entity/ai/control/BodyControl;ROTATE_BODY_START_TICK:I
intermediary field_30195
Lnet/minecraft/class_1330;field_30195:I
official c
Lbyy;c:I
-
ROTATION_INCREMENTS
private static final int ROTATION_INCREMENTS- See Also:
- Mappings:
Namespace Name Mixin selector named ROTATION_INCREMENTS
Lnet/minecraft/entity/ai/control/BodyControl;ROTATION_INCREMENTS:I
intermediary field_30196
Lnet/minecraft/class_1330;field_30196:I
official d
Lbyy;d:I
-
entity
- Mappings:
Namespace Name Mixin selector named entity
Lnet/minecraft/entity/ai/control/BodyControl;entity:Lnet/minecraft/entity/mob/MobEntity;
intermediary field_6356
Lnet/minecraft/class_1330;field_6356:Lnet/minecraft/class_1308;
official a
Lbyy;a:Lbte;
-
bodyAdjustTicks
private int bodyAdjustTicks- Mappings:
Namespace Name Mixin selector named bodyAdjustTicks
Lnet/minecraft/entity/ai/control/BodyControl;bodyAdjustTicks:I
intermediary field_6355
Lnet/minecraft/class_1330;field_6355:I
official e
Lbyy;e:I
-
lastHeadYaw
private float lastHeadYaw- Mappings:
Namespace Name Mixin selector named lastHeadYaw
Lnet/minecraft/entity/ai/control/BodyControl;lastHeadYaw:F
intermediary field_6354
Lnet/minecraft/class_1330;field_6354:F
official f
Lbyy;f:F
-
-
Constructor Details
-
BodyControl
- Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/entity/ai/control/BodyControl;<init>(Lnet/minecraft/entity/mob/MobEntity;)V
intermediary <init>
Lnet/minecraft/class_1330;<init>(Lnet/minecraft/class_1308;)V
official <init>
Lbyy;<init>(Lbte;)V
-
-
Method Details
-
tick
public void tick()Ticks the body control.- Implementation Requirements:
- If the entity has moved, its body yaw adjusts to its head yaw. Otherwise, if the entity is not steered, its head yaw adjusts to its body yaw.
- Mappings:
Namespace Name Mixin selector named tick
Lnet/minecraft/entity/ai/control/BodyControl;tick()V
intermediary method_6224
Lnet/minecraft/class_1330;method_6224()V
official a
Lbyy;a()V
-
keepUpBody
private void keepUpBody()Keeps up the body yaw by ensuring it is within the max head rotation from the head yaw.- Mappings:
Namespace Name Mixin selector named keepUpBody
Lnet/minecraft/entity/ai/control/BodyControl;keepUpBody()V
intermediary method_20243
Lnet/minecraft/class_1330;method_20243()V
official b
Lbyy;b()V
-
keepUpHead
private void keepUpHead()Keeps up the head yaw by ensuring it is within the max head rotation from the body yaw.- Mappings:
Namespace Name Mixin selector named keepUpHead
Lnet/minecraft/entity/ai/control/BodyControl;keepUpHead()V
intermediary method_20244
Lnet/minecraft/class_1330;method_20244()V
official c
Lbyy;c()V
-
slowlyAdjustBody
private void slowlyAdjustBody()Gradually adjusts the body yaw toward the head yaw, starting after 10 ticks of wait and finishes by the 20th tick.- Mappings:
Namespace Name Mixin selector named slowlyAdjustBody
Lnet/minecraft/entity/ai/control/BodyControl;slowlyAdjustBody()V
intermediary method_20245
Lnet/minecraft/class_1330;method_20245()V
official d
Lbyy;d()V
-
isIndependent
private boolean isIndependent()- Mappings:
Namespace Name Mixin selector named isIndependent
Lnet/minecraft/entity/ai/control/BodyControl;isIndependent()Z
intermediary method_20246
Lnet/minecraft/class_1330;method_20246()Z
official e
Lbyy;e()Z
-
isMoving
private boolean isMoving()- Mappings:
Namespace Name Mixin selector named isMoving
Lnet/minecraft/entity/ai/control/BodyControl;isMoving()Z
intermediary method_20247
Lnet/minecraft/class_1330;method_20247()Z
official f
Lbyy;f()Z
-