Uses of Annotation Interface
com.ticxo.modelengine.api.command.annotations.CommandAttribute
Package
Description
-
Uses of CommandAttribute in com.ticxo.modelengine.api.model
Modifier and TypeMethodDescriptionvoid
ModeledEntity.addModel
(ActiveModel model, boolean overrideHitbox) void
ActiveModel.destroy()
Despawn the model from the world.
This method would despawn the model from all players that is close enough to see it.ModeledEntity.getBodyRotationController()
Get theBodyRotationController
of this entity.
This is used to configure the entity's body rotation.ModeledEntity.getLookController()
Get theLookController
of this entity.
This is mainly used to control the entity's pitch, head yaw and body yaw.Get theActiveModel
of the specified model ID from this entity.ModeledEntity.getMountManager()
Get theMountManager
of this ModeledEntity.
This is used to mount an entity to this entity.void
ActiveModel.hideFromPlayer
(org.bukkit.entity.Player player) Hide the model from the player.
This does not unregister the player as a viewer of this model, hence update packets would still be sent, and the model would be visible to them when they exit and enter its render radius.void
IModel.hideFromPlayer
(org.bukkit.entity.Player player) Hide this entity from the player.
This does not unregister the player as a viewer of this entity, hence update packets would still be sent, and the entity would be visible to them when they exit and enter its render radius.void
ActiveModel.removeBone
(String bone) Remove a bone from this model.
The bone is destroyed immediately after removing, so this process is not revertible.
To hide a renderer bone temporarily, useBoneRenderer.setModelVisible(boolean)
.
To transfer a bone to another parent, useModelBone.addChild(ModelBone)
.ModeledEntity.removeModel
(String modelId) Remove anActiveModel
of the specified model ID from this entity.
The model would not despawn by itself after removing.void
IModel.setBaseEntityVisible
(boolean flag) Change the visibility of the owner of the model.void
ActiveModel.setCanHurt
(boolean flag) Set if the model should play the damage tint.
This is mainly use to disable damage tint for inanimate models like rocks, barrels, etc.void
ActiveModel.setGlowing
(boolean flag) Set the glow state of the model.void
ActiveModel.setLockPitch
(boolean flag) Lock the pitch of this model.
When locked, the pitch defaults to 0 degree.void
ActiveModel.setLockYaw
(boolean flag) Lock the head yaw of this model.
When locked, the head yaw defaults to 0 degree relative to the body's yaw rotation.void
ModeledEntity.setModelRotationLock
(boolean flag) Set the rotation setting of this entity.
When rotation is locked, all rotations caused by the entity would be canceled visually.void
ModeledEntity.setRenderRadius
(int radius) Set the render distance of this entity.void
ModeledEntity.setStepHeight
(double height) Set the step height of this entity.
Due to Minecraft being stupid, some entities like pigs are not affected by this.void
ActiveModel.showToPlayer
(org.bukkit.entity.Player player) Show the model to the player.
This does not register the player as a viewer of this model, hence no update packets would be sent to them.void
IModel.showToPlayer
(org.bukkit.entity.Player player) Show this entity to the player.
This does not register the player as a viewer of this entity, hence no update packets would be sent to them. -
Uses of CommandAttribute in com.ticxo.modelengine.api.mount
Modifier and TypeMethodDescriptionvoid
MountManager.addPassengerToSeat
(String modelId, String seatId, org.bukkit.entity.Entity passenger, MountController controller) void
MountManager.dismountAll()
void
MountManager.dismountAllPassengers()
void
MountManager.removeDriver()
void
MountManager.setCanRide
(boolean flag) void
MountManager.setCanSteer
(boolean flag) void
MountManager.setDriver
(@NotNull org.bukkit.entity.Entity driver, MountController controller) -
Uses of CommandAttribute in com.ticxo.modelengine.api.nms.entity.wrapper
Modifier and TypeMethodDescriptionvoid
LookController.lookAt
(double x, double y, double z) void
BodyRotationController.setBodyClampUneven
(boolean flag) void
LookController.setBodyYaw
(float yaw) void
BodyRotationController.setHeadClampUneven
(boolean flag) void
LookController.setHeadYaw
(float yaw) void
BodyRotationController.setMaxBodyAngle
(float angle) If body clamp is even, set the max body angle for both sides.
Otherwise, only set the angle on the positive side.void
BodyRotationController.setMaxHeadAngle
(float angle) If head clamp is even, set the max head angle for both sides.
Otherwise, only set the angle on the positive side.void
BodyRotationController.setMinBodyAngle
(float angle) If body clamp is uneven, set the angle on the negative side.
Otherwise, this method has no effect.void
BodyRotationController.setMinHeadAngle
(float angle) If head clamp is uneven, set the angle on the negative side.
Otherwise, this method has no effect.void
LookController.setPitch
(float pitch) void
BodyRotationController.setPlayerMode
(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.void
BodyRotationController.setRotationDelay
(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.void
BodyRotationController.setRotationDuration
(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.void
BodyRotationController.setStableAngle
(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.