Class EmptyBodyRotationController
java.lang.Object
com.ticxo.modelengine.api.nms.impl.EmptyBodyRotationController
- All Implemented Interfaces:
BodyRotationController,DataIO
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatfloatfloatintintfloatfloatfloatfloatbooleanbooleanbooleanvoidsetBodyClampUneven(boolean flag) voidsetHeadClampUneven(boolean flag) voidsetMaxBodyAngle(float angle) If body clamp is even, set the max body angle for both sides.
Otherwise, only set the angle on the positive side.voidsetMaxHeadAngle(float angle) If head clamp is even, set the max head angle for both sides.
Otherwise, only set the angle on the positive side.voidsetMinBodyAngle(float angle) If body clamp is uneven, set the angle on the negative side.
Otherwise, this method has no effect.voidsetMinHeadAngle(float angle) If head clamp is uneven, set the angle on the negative side.
Otherwise, this method has no effect.voidsetPlayerMode(boolean flag) Toggle player rotation mode.
If true, the body would act like the player's body rotation.
Otherwise, the body would auto rotate to match the head's rotation after a certain period of time.voidsetRotationDelay(int delay) Set the wait time before the body auto rotates to match the head's rotation.
For example, if delay = 60, the entity would rotate its head, stop, and wait 3 seconds before rotating its body.voidsetRotationDuration(int duration) Set the time it takes to auto rotates back to the head's rotation.
For example, if duration = 60, the entity would rotate its head, stop, wait 0.5 second, and takes 3 seconds to match body rotation to the head rotation.voidsetStableAngle(float angle) Set the stable angle before correcting back to the clamped angle.
For example, if the clamp = 50, and the stable angle = 15, the body can be 65 degrees away from the head before snapping back to 50 degrees away.
This causes the "sudden jerk" effect on all entity body rotation.voidsetXHeadRot(float rot) voidsetYBodyRot(float rot) voidsetYHeadRot(float rot) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.ticxo.modelengine.api.nms.entity.wrapper.BodyRotationController
load, save, tick
-
Constructor Details
-
EmptyBodyRotationController
public EmptyBodyRotationController()
-
-
Method Details
-
getYHeadRot
public float getYHeadRot()- Specified by:
getYHeadRotin interfaceBodyRotationController
-
setYHeadRot
public void setYHeadRot(float rot) - Specified by:
setYHeadRotin interfaceBodyRotationController
-
getXHeadRot
public float getXHeadRot()- Specified by:
getXHeadRotin interfaceBodyRotationController
-
setXHeadRot
public void setXHeadRot(float rot) - Specified by:
setXHeadRotin interfaceBodyRotationController
-
getYBodyRot
public float getYBodyRot()- Specified by:
getYBodyRotin interfaceBodyRotationController
-
setYBodyRot
public void setYBodyRot(float rot) - Specified by:
setYBodyRotin interfaceBodyRotationController
-
isHeadClampUneven
public boolean isHeadClampUneven()- Specified by:
isHeadClampUnevenin interfaceBodyRotationController
-
setHeadClampUneven
public void setHeadClampUneven(boolean flag) - Specified by:
setHeadClampUnevenin interfaceBodyRotationController
-
isBodyClampUneven
public boolean isBodyClampUneven()- Specified by:
isBodyClampUnevenin interfaceBodyRotationController
-
setBodyClampUneven
public void setBodyClampUneven(boolean flag) - Specified by:
setBodyClampUnevenin interfaceBodyRotationController
-
getMaxHeadAngle
public float getMaxHeadAngle()- Specified by:
getMaxHeadAnglein interfaceBodyRotationController
-
setMaxHeadAngle
public void setMaxHeadAngle(float angle) Description copied from interface:BodyRotationControllerIf head clamp is even, set the max head angle for both sides.
Otherwise, only set the angle on the positive side.- Specified by:
setMaxHeadAnglein interfaceBodyRotationController- Parameters:
angle- angle in degrees
-
getMaxBodyAngle
public float getMaxBodyAngle()- Specified by:
getMaxBodyAnglein interfaceBodyRotationController
-
setMaxBodyAngle
public void setMaxBodyAngle(float angle) Description copied from interface:BodyRotationControllerIf body clamp is even, set the max body angle for both sides.
Otherwise, only set the angle on the positive side.- Specified by:
setMaxBodyAnglein interfaceBodyRotationController- Parameters:
angle- angle in degrees
-
getMinHeadAngle
public float getMinHeadAngle()- Specified by:
getMinHeadAnglein interfaceBodyRotationController
-
setMinHeadAngle
public void setMinHeadAngle(float angle) Description copied from interface:BodyRotationControllerIf head clamp is uneven, set the angle on the negative side.
Otherwise, this method has no effect.- Specified by:
setMinHeadAnglein interfaceBodyRotationController- Parameters:
angle- angle in degrees
-
getMinBodyAngle
public float getMinBodyAngle()- Specified by:
getMinBodyAnglein interfaceBodyRotationController
-
setMinBodyAngle
public void setMinBodyAngle(float angle) Description copied from interface:BodyRotationControllerIf body clamp is uneven, set the angle on the negative side.
Otherwise, this method has no effect.- Specified by:
setMinBodyAnglein interfaceBodyRotationController- Parameters:
angle- angle in degrees
-
getStableAngle
public float getStableAngle()- Specified by:
getStableAnglein interfaceBodyRotationController
-
setStableAngle
public void setStableAngle(float angle) Description copied from interface:BodyRotationControllerSet the stable angle before correcting back to the clamped angle.
For example, if the clamp = 50, and the stable angle = 15, the body can be 65 degrees away from the head before snapping back to 50 degrees away.
This causes the "sudden jerk" effect on all entity body rotation.- Specified by:
setStableAnglein interfaceBodyRotationController- Parameters:
angle- angle in degrees
-
isPlayerMode
public boolean isPlayerMode()- Specified by:
isPlayerModein interfaceBodyRotationController
-
setPlayerMode
public void setPlayerMode(boolean flag) Description copied from interface:BodyRotationControllerToggle player rotation mode.
If true, the body would act like the player's body rotation.
Otherwise, the body would auto rotate to match the head's rotation after a certain period of time.- Specified by:
setPlayerModein interfaceBodyRotationController
-
getRotationDelay
public int getRotationDelay()- Specified by:
getRotationDelayin interfaceBodyRotationController
-
setRotationDelay
public void setRotationDelay(int delay) Description copied from interface:BodyRotationControllerSet the wait time before the body auto rotates to match the head's rotation.
For example, if delay = 60, the entity would rotate its head, stop, and wait 3 seconds before rotating its body.- Specified by:
setRotationDelayin interfaceBodyRotationController- Parameters:
delay- delay in ticks
-
getRotationDuration
public int getRotationDuration()- Specified by:
getRotationDurationin interfaceBodyRotationController
-
setRotationDuration
public void setRotationDuration(int duration) Description copied from interface:BodyRotationControllerSet the time it takes to auto rotates back to the head's rotation.
For example, if duration = 60, the entity would rotate its head, stop, wait 0.5 second, and takes 3 seconds to match body rotation to the head rotation.- Specified by:
setRotationDurationin interfaceBodyRotationController- Parameters:
duration- duration in ticks.
-