Class SplitLookControl
java.lang.Object
net.minecraft.world.entity.ai.control.LookControl
nokunami.floral_warfare.common.entity.ai.control.SplitLookControl
- All Implemented Interfaces:
net.minecraft.world.entity.ai.control.Control
public class SplitLookControl
extends net.minecraft.world.entity.ai.control.LookControl
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final net.minecraft.world.entity.Mobprotected intprotected doubleprotected doubleprotected doubleprotected floatprotected floatFields inherited from class net.minecraft.world.entity.ai.control.LookControl
lookAtCooldown, mob, wantedX, wantedY, wantedZ, xMaxRotAngle, yMaxRotSpeed -
Constructor Summary
ConstructorsConstructorDescriptionSplitLookControl(net.minecraft.world.entity.Mob mobSplit, net.minecraft.world.entity.Mob mob) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoubledoubledoublebooleanprotected booleanprotected floatrotateSplitTowards(float pFrom, float pTo, float pMaxDelta) Rotate as much as possible fromfromtotowithin the bounds ofmaxDeltavoidsetLookAt(double pX, double pY, double pZ) voidsetLookAt(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) voidsetSplitLookAt(net.minecraft.world.entity.Entity pEntity) Sets the controlling mob's look vector to the provided entity's locationvoidsetSplitLookAt(net.minecraft.world.entity.Entity pEntity, float pDeltaYaw, float pDeltaPitch) Sets position to look at using entityvoidsetSplitLookAt(net.minecraft.world.phys.Vec3 pLookVector) Sets the mob's look vectorvoidtick()Updates lookMethods inherited from class net.minecraft.world.entity.ai.control.LookControl
clampHeadRotationToBody, getWantedX, getWantedY, getWantedZ, getXRotD, getYRotD, isLookingAtTarget, resetXRotOnTick, rotateTowards, setLookAt, setLookAt, setLookAt
-
Field Details
-
mobSplit
protected final net.minecraft.world.entity.Mob mobSplit -
yMaxSplitRotSpeed
protected float yMaxSplitRotSpeed -
xMaxSplitRotAngle
protected float xMaxSplitRotAngle -
splitLookAtCooldown
protected int splitLookAtCooldown -
splitWantedX
protected double splitWantedX -
splitWantedY
protected double splitWantedY -
splitWantedZ
protected double splitWantedZ
-
-
Constructor Details
-
SplitLookControl
public SplitLookControl(net.minecraft.world.entity.Mob mobSplit, net.minecraft.world.entity.Mob mob)
-
-
Method Details
-
setSplitLookAt
public void setSplitLookAt(net.minecraft.world.phys.Vec3 pLookVector) Sets the mob's look vector -
setSplitLookAt
public void setSplitLookAt(net.minecraft.world.entity.Entity pEntity) Sets the controlling mob's look vector to the provided entity's location -
setSplitLookAt
public void setSplitLookAt(net.minecraft.world.entity.Entity pEntity, float pDeltaYaw, float pDeltaPitch) Sets position to look at using entity -
setLookAt
public void setLookAt(double pX, double pY, double pZ) - Overrides:
setLookAtin classnet.minecraft.world.entity.ai.control.LookControl
-
setLookAt
public void setLookAt(double pX, double pY, double pZ, float pDeltaYaw, float pDeltaPitch) - Overrides:
setLookAtin classnet.minecraft.world.entity.ai.control.LookControl
-
tick
public void tick()Updates look- Overrides:
tickin classnet.minecraft.world.entity.ai.control.LookControl
-
clampSplitHeadRotationToBody
protected void clampSplitHeadRotationToBody() -
resetSplitXRotOnTick
protected boolean resetSplitXRotOnTick() -
isSplitLookingAtTarget
public boolean isSplitLookingAtTarget() -
getSplitWantedX
public double getSplitWantedX() -
getSplitWantedY
public double getSplitWantedY() -
getSplitWantedZ
public double getSplitWantedZ() -
getSplitXRotD
-
getSplitYRotD
-
rotateSplitTowards
protected float rotateSplitTowards(float pFrom, float pTo, float pMaxDelta) Rotate as much as possible fromfromtotowithin the bounds ofmaxDelta
-