Class TertiaryLookControl<T extends net.minecraft.world.entity.Mob & TwoHeadedEntity>
java.lang.Object
nokunami.floral_warfare.common.entity.ai.control.TertiaryLookControl<T>
- All Implemented Interfaces:
net.minecraft.world.entity.ai.control.Control
public class TertiaryLookControl<T extends net.minecraft.world.entity.Mob & TwoHeadedEntity>
extends Object
implements net.minecraft.world.entity.ai.control.Control
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected final Tprotected doubleprotected doubleprotected doubleprotected floatprotected float -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoubledoubledoublebooleanprotected booleanprotected floatrotateThirdTowards(float from, float to, float maxDelta) Rotate as much as possible fromfromtotowithin the bounds ofmaxDeltavoidsetThirdLookAt(double pX, double pY, double pZ) voidsetThirdLookAt(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) Sets position to look atvoidsetThirdLookAt(net.minecraft.world.entity.Entity pEntity) Sets the controlling mob's look vector to the provided entity's locationvoidsetThirdLookAt(net.minecraft.world.entity.Entity pEntity, float pDeltaYaw, float pDeltaPitch) Sets position to look at using entityvoidsetThirdLookAt(net.minecraft.world.phys.Vec3 pLookVector) Sets the mob's look vectorvoidtick()Updates look
-
Field Details
-
mob
-
yMaxRotSpeed
protected float yMaxRotSpeed -
xMaxRotAngle
protected float xMaxRotAngle -
lookAtCooldown
protected int lookAtCooldown -
wantedX
protected double wantedX -
wantedY
protected double wantedY -
wantedZ
protected double wantedZ
-
-
Constructor Details
-
TertiaryLookControl
-
-
Method Details
-
setThirdLookAt
public void setThirdLookAt(net.minecraft.world.phys.Vec3 pLookVector) Sets the mob's look vector -
setThirdLookAt
public void setThirdLookAt(net.minecraft.world.entity.Entity pEntity) Sets the controlling mob's look vector to the provided entity's location -
setThirdLookAt
public void setThirdLookAt(net.minecraft.world.entity.Entity pEntity, float pDeltaYaw, float pDeltaPitch) Sets position to look at using entity -
setThirdLookAt
public void setThirdLookAt(double pX, double pY, double pZ) -
setThirdLookAt
public void setThirdLookAt(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) Sets position to look at -
tick
public void tick()Updates look -
clampHeadRotationToBody
protected void clampHeadRotationToBody() -
resetThirdXRotOnTick
protected boolean resetThirdXRotOnTick() -
isThirdLookingAtTarget
public boolean isThirdLookingAtTarget() -
getThirdWantedX
public double getThirdWantedX() -
getThirdWantedY
public double getThirdWantedY() -
getThirdWantedZ
public double getThirdWantedZ() -
getThirdXRotD
-
getThirdYRotD
-
rotateThirdTowards
protected float rotateThirdTowards(float from, float to, float maxDelta) Rotate as much as possible fromfromtotowithin the bounds ofmaxDelta
-