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 - official - blt- intermediary - net/minecraft/class_1330- named - net/minecraft/entity/ai/control/BodyControl
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final intprivate intprivate final MobEntityprivate floatprivate static final intprivate static final int
- 
Constructor SummaryConstructors
- 
Method SummaryModifier 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_THRESHOLDprivate static final int BODY_KEEP_UP_THRESHOLD- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - b- Lblt;b:I- intermediary - field_30194- Lnet/minecraft/class_1330;field_30194:I- named - BODY_KEEP_UP_THRESHOLD- Lnet/minecraft/entity/ai/control/BodyControl;BODY_KEEP_UP_THRESHOLD:I
 
- 
ROTATE_BODY_START_TICKprivate static final int ROTATE_BODY_START_TICK- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - c- Lblt;c:I- intermediary - field_30195- Lnet/minecraft/class_1330;field_30195:I- named - ROTATE_BODY_START_TICK- Lnet/minecraft/entity/ai/control/BodyControl;ROTATE_BODY_START_TICK:I
 
- 
ROTATION_INCREMENTSprivate static final int ROTATION_INCREMENTS- See Also:
- Mappings:
- Namespace - Name - Mixin selector - official - d- Lblt;d:I- intermediary - field_30196- Lnet/minecraft/class_1330;field_30196:I- named - ROTATION_INCREMENTS- Lnet/minecraft/entity/ai/control/BodyControl;ROTATION_INCREMENTS:I
 
- 
entity- Mappings:
- Namespace - Name - Mixin selector - official - a- Lblt;a:Lbgb;- intermediary - field_6356- Lnet/minecraft/class_1330;field_6356:Lnet/minecraft/class_1308;- named - entity- Lnet/minecraft/entity/ai/control/BodyControl;entity:Lnet/minecraft/entity/mob/MobEntity;
 
- 
bodyAdjustTicksprivate int bodyAdjustTicks- Mappings:
- Namespace - Name - Mixin selector - official - e- Lblt;e:I- intermediary - field_6355- Lnet/minecraft/class_1330;field_6355:I- named - bodyAdjustTicks- Lnet/minecraft/entity/ai/control/BodyControl;bodyAdjustTicks:I
 
- 
lastHeadYawprivate float lastHeadYaw- Mappings:
- Namespace - Name - Mixin selector - official - f- Lblt;f:F- intermediary - field_6354- Lnet/minecraft/class_1330;field_6354:F- named - lastHeadYaw- Lnet/minecraft/entity/ai/control/BodyControl;lastHeadYaw:F
 
 
- 
- 
Constructor Details- 
BodyControl- Mappings:
- Namespace - Name - Mixin selector - official - <init>- Lblt;<init>(Lbgb;)V- intermediary - <init>- Lnet/minecraft/class_1330;<init>(Lnet/minecraft/class_1308;)V- named - <init>- Lnet/minecraft/entity/ai/control/BodyControl;<init>(Lnet/minecraft/entity/mob/MobEntity;)V
 
 
- 
- 
Method Details- 
tickpublic 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 - official - a- Lblt;a()V- intermediary - method_6224- Lnet/minecraft/class_1330;method_6224()V- named - tick- Lnet/minecraft/entity/ai/control/BodyControl;tick()V
 
- 
keepUpBodyprivate 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 - official - b- Lblt;b()V- intermediary - method_20243- Lnet/minecraft/class_1330;method_20243()V- named - keepUpBody- Lnet/minecraft/entity/ai/control/BodyControl;keepUpBody()V
 
- 
keepUpHeadprivate 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 - official - c- Lblt;c()V- intermediary - method_20244- Lnet/minecraft/class_1330;method_20244()V- named - keepUpHead- Lnet/minecraft/entity/ai/control/BodyControl;keepUpHead()V
 
- 
slowlyAdjustBodyprivate 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 - official - d- Lblt;d()V- intermediary - method_20245- Lnet/minecraft/class_1330;method_20245()V- named - slowlyAdjustBody- Lnet/minecraft/entity/ai/control/BodyControl;slowlyAdjustBody()V
 
- 
isIndependentprivate boolean isIndependent()- Mappings:
- Namespace - Name - Mixin selector - official - e- Lblt;e()Z- intermediary - method_20246- Lnet/minecraft/class_1330;method_20246()Z- named - isIndependent- Lnet/minecraft/entity/ai/control/BodyControl;isIndependent()Z
 
- 
isMovingprivate boolean isMoving()- Mappings:
- Namespace - Name - Mixin selector - official - f- Lblt;f()Z- intermediary - method_20247- Lnet/minecraft/class_1330;method_20247()Z- named - isMoving- Lnet/minecraft/entity/ai/control/BodyControl;isMoving()Z
 
 
-