Files

1.9 KiB

IScriptEntity.print

← IScriptEntity · ← Master

Parça 1/3 · sonraki

print("arg1: " + arg1 + ", arg2: " + arg2 + ", arg3: " + arg3); }

Parameters: scriptName - The name of the script to execute. function - The name of the function within the script to execute. args - The arguments to pass to the function.

lockPosition

void lockPosition(double x, double y, double z)

Lock the entity's position.

var s = c.getSubject(); var pos = s.getPosition(); s.lockPosition(pos.x, pos.y, pos.z);

Parameters: x - X position y - Y position z - Z position

unlockPosition

void unlockPosition()

Unlock the entity's position.

c.getSubject().unlockPosition();

isPositionLocked

boolean isPositionLocked()

Check if the entity's position is locked.

if (c.getSubject().isPositionLocked()) { // Do something }

lockRotation

void lockRotation(float yaw, float pitch, float yawHead)

Lock the entity's rotation.

var s = c.getSubject(); var rot = s.getRotations(); s.lockRotation(rot.y, rot.x, rot.z);

Parameters: yaw - Yaw rotation pitch - Pitch rotation yawHead - Yaw rotation of the head

unlockRotation

void unlockRotation()

Unlock the entity's rotation.

c.getSubject().unlockRotation();

isRotationLocked

boolean isRotationLocked()

Check if the entity's rotation is locked.

if (c.getSubject().isRotationLocked()) { // Do something }

moveTo

void moveTo(java.lang.String interpolation, int durationTicks, double x, double y, double z, boolean disableAI)

Moves the entity to the specified position (x, y, z) with the given interpolation type and duration. The following interpolation types are supported:

§7linear§r §7quad_in§r §7quad_out§r §7quad_inout§r §7cubic_in§r §7cubic_out§r