Files

1.5 KiB

IScriptFactory.vector4

← IScriptFactory · ← Master

Parça 11/11 · önceki

c.send("Is the point inside the bounding volume? " + isInside);

Parameters: point - The position of the point to check. bound1 - The position of one corner of the bounding volume. bound2 - The position of the opposite corner of the bounding volume.

Returns: true if the point is inside the bounding volume, false otherwise.

Throws: java.lang.IllegalArgumentException - if the input vectors have different dimensions.

toNBT

INBTCompound toNBT(java.lang.Object object)

Converts an object to an INBTCompound representation.

Parameters: object - The object to convert to an INBTCompound.

Returns: The INBTCompound representation of the object or null if the object is not of the expected types.

format

java.lang.String format(java.lang.String format, java.lang.Object... args)

Formates strings (placeholders).

// Example: var name = "Steve"; var age = 18; var message = mappet.format("Hello %s, you are %d years old!", name, age); c.send(message);

// You can also use the positional arguments: var s = c.getSubject(); var pos = s.getPosition(); var message = mappet.format("Hello %1$s, you are in x:%2$.2f, y:%3$.2f, z:%4$.2f!", s.getName(), pos.x, pos.y, pos.z); s.send(message);

Parameters: format - string to format args - arguments to replace

Returns: formatted string