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/BodyControlintermediary net/minecraft/class_1330official bzk
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate intprivate final MobEntityprivate floatprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanprivate booleanisMoving()private voidKeeps up the body yaw by ensuring it is within the max head rotation from the head yaw.private voidKeeps up the head yaw by ensuring it is within the max head rotation from the body yaw.private voidGradually adjusts the body yaw toward the head yaw, starting after 10 ticks of wait and finishes by the 20th tick.voidtick()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_THRESHOLDLnet/minecraft/entity/ai/control/BodyControl;BODY_KEEP_UP_THRESHOLD:Iintermediary field_30194Lnet/minecraft/class_1330;field_30194:Iofficial bLbzk;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_TICKLnet/minecraft/entity/ai/control/BodyControl;ROTATE_BODY_START_TICK:Iintermediary field_30195Lnet/minecraft/class_1330;field_30195:Iofficial cLbzk;c:I
-
ROTATION_INCREMENTS
private static final int ROTATION_INCREMENTS- See Also:
- Mappings:
Namespace Name Mixin selector named ROTATION_INCREMENTSLnet/minecraft/entity/ai/control/BodyControl;ROTATION_INCREMENTS:Iintermediary field_30196Lnet/minecraft/class_1330;field_30196:Iofficial dLbzk;d:I
-
entity
- Mappings:
Namespace Name Mixin selector named entityLnet/minecraft/entity/ai/control/BodyControl;entity:Lnet/minecraft/entity/mob/MobEntity;intermediary field_6356Lnet/minecraft/class_1330;field_6356:Lnet/minecraft/class_1308;official aLbzk;a:Lbtp;
-
bodyAdjustTicks
private int bodyAdjustTicks- Mappings:
Namespace Name Mixin selector named bodyAdjustTicksLnet/minecraft/entity/ai/control/BodyControl;bodyAdjustTicks:Iintermediary field_6355Lnet/minecraft/class_1330;field_6355:Iofficial eLbzk;e:I
-
lastHeadYaw
private float lastHeadYaw- Mappings:
Namespace Name Mixin selector named lastHeadYawLnet/minecraft/entity/ai/control/BodyControl;lastHeadYaw:Fintermediary field_6354Lnet/minecraft/class_1330;field_6354:Fofficial fLbzk;f:F
-
-
Constructor Details
-
BodyControl
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/ai/control/BodyControl;<init>(Lnet/minecraft/entity/mob/MobEntity;)Vintermediary <init>Lnet/minecraft/class_1330;<init>(Lnet/minecraft/class_1308;)Vofficial <init>Lbzk;<init>(Lbtp;)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 tickLnet/minecraft/entity/ai/control/BodyControl;tick()Vintermediary method_6224Lnet/minecraft/class_1330;method_6224()Vofficial aLbzk;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 keepUpBodyLnet/minecraft/entity/ai/control/BodyControl;keepUpBody()Vintermediary method_20243Lnet/minecraft/class_1330;method_20243()Vofficial bLbzk;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 keepUpHeadLnet/minecraft/entity/ai/control/BodyControl;keepUpHead()Vintermediary method_20244Lnet/minecraft/class_1330;method_20244()Vofficial cLbzk;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 slowlyAdjustBodyLnet/minecraft/entity/ai/control/BodyControl;slowlyAdjustBody()Vintermediary method_20245Lnet/minecraft/class_1330;method_20245()Vofficial dLbzk;d()V
-
isIndependent
private boolean isIndependent()- Mappings:
Namespace Name Mixin selector named isIndependentLnet/minecraft/entity/ai/control/BodyControl;isIndependent()Zintermediary method_20246Lnet/minecraft/class_1330;method_20246()Zofficial eLbzk;e()Z
-
isMoving
private boolean isMoving()- Mappings:
Namespace Name Mixin selector named isMovingLnet/minecraft/entity/ai/control/BodyControl;isMoving()Zintermediary method_20247Lnet/minecraft/class_1330;method_20247()Zofficial fLbzk;f()Z
-