objects
Data structures
Block
type
String
name
String
interactable
boolean
variant
int
heigth
double
width
double
length
double
x
double
y
double
z
double
Entity
type
String
entityId
String
Image
Image image = new Image(String url, boolean cache);Creates a new image. The image will be requested from the URL. Cache determines whether or not the image will be reloaded when reloading scripts.
getDimensions
float[] dimensions = image.getDimensions();Returns the image's dimensions.
isLoaded
boolean loaded = image.isLoaded();Returns true if the image is loaded.
ItemStack
type
String
name
String
displayName
String
stackSize
int
maxStackSize
int
durability
int
maxDurability
int
isBlock
boolean
meta
int
getEnchantments
List<Object[]> enchantments = itemStack.getEnchantments();Returns a list of a specific item stack's enchantments.
getTooltip
List<String> tooltips = itemStack.getTooltip();Returns a list of a specific item stack's tool tips.
Message
appendStyle
OPEN_URL
Opens a URL
OPEN_FILE
Opens a file on your computer
RUN_COMMAND
Sends text in the chat
SUGGEST_COMMAND
Puts text into your chat field
CHANGE_PAGE
Switches to a page in a book
COPY_TO_CLIPBOARD
Copies text to your clipboard
Message message = new Message().appendStyle(String style, String action, String styleMessage, String message);Adds different actions to messages.
TileEntity
name
String
type
String
Simulation
create
Simulation simulation = Simulation.create();Initializes a simulation with the local player's movement inputs.
getMotion
Vec3 motion = simulation.getMotion();Returns the motion vector of the simulation.
onGround
boolean onGround = simulation.onGround();Returns true if the simulation is on the ground.
setForward
simulation.setForward(float forward);Sets the forward movement input for the simulation.
setJump
simulation.setJump(boolean jump);Sets the jump movement input for the simulation.
setSneak
simulation.setSneak(boolean sneak);Sets the sneak movement input for the simulation.
setStrafe
simulation.setStrafe(float strafe);Sets the strafe movement input for the simulation.
getPosition
Vec3 position = simulation.getPosition();Returns the position of the simulation.
setYaw
simulation.setYaw(float yaw);Sets the rotation yaw for the simulation.
tick
simulation.tick();Moves the simulation to the next tick.
Vec3
x
double
y
double
z
double
ceil
Vec3 ceiled = position.ceil();Ceils a Vec3.
equals
boolean equal = vector1.equals(Vec3 vector2);Returns true if both vectors are equal.
floor
Vec3 floored = position.floor();Floors a Vec3.
inverse
Vec3 inverse = position.inverse();Sets a Vec3 to its inverse.
offset
Vec3 offset = position.offset(Vec3 position);
Vec3 offset = position.offset(double x, double y, double z);Adds a specified offset to all three axes.
translate
Vec3 translated = position.translate(Vec3 position);
Vec3 translated = position.translate(double x, double y, double z);Adds a specified translation to all three axes.
Last updated