#if fps<60
{math=10+20}
{crashmypc=true}
{xx=0}
{yy=0}
#while crashmypc
#if yy>height
{crashmypc=false}
;hand, xx,yy,1;
{xx=xx+16}
#if xx>width
{yy=yy+16}
{xx=0}
#for num in range(0,10):
;alert, num;
Which will send the user all the numbers between 0 (inclusive) and 10 (exclusive) in order.#for i in ["I want", "to", 0x6B696C6C, "myself"]:
;alert, num;
Which will send the user all the values in the array in order (from left to right).
Function | Description |
---|---|
Returns the char at the specified index. | |
Returns true if and only if this string contains the specified sequence of char values. | |
If this string ends with the specified suffix. | |
Compares this String to another String, ignoring case considerations. | |
Returns the length of this string. | |
Returns a string whose value is the concatenation of this string repeated requested amount of times. | |
Tests if this string starts with the specified prefix. | |
Returns a string that is a substring of this string. | |
Returns a string that is a substring of this string. | |
Converts this string to a new character array. | |
Returns a new string where all of the characters in this String are lower case. | |
Returns a new string where all of the characters in this String are upper case. | |
Returns a string whose value is this string, with all leading and trailing space removed. |
Define an array with 3 objects inside it (the number 4 and the number 2 and the word "Text"):
{arr=[4,2,"Text"]}
Get the number of objects within the array (3):
{length(arr)}
Replace the number 2 (at position 1) with the number 3:
{arr[1]=3}
Read the first value (at position 0) of the array:
{arr[0]}
Add an object in the 4th position of the array:
{arr[3]="4th object"}
Read the new length of the array (4):
{length(arr)}
#def divide, num1, num2
{result = num1/num2}
;divide, 4, 2;
{result}
#def divide, num1, num2
;return, num1/num2;
{divide(4,2)}
#while _i<10
{_i++}
#if _i==5
{break}
{_i}
Will set {_i} to 5
name - The name of the item
item_name - The name of the item type (Even if name was modified with anvil/commands)
repair_cost - The repair cost of the item
damage - How much the item has been damaged
max_damage - How much the item can bee damaged
max_stack_size - The max stack size of the item
enchantment_glint_override - Imma be honest idk what this one does, check the minecraft wiki if it's important.
trim - An object containing the following 3 properties:
- material - The name of the material used on the armor piece's trim
- pattern - The name of the pattern used on the armor piece's trim
- showintooltip - Whether it should show the armor trim in the item's tooltip (idk how this would be useful but it was easy to add so I added it.)
enchantable - If not null, items with the component can be enchanted in an enchanting table.
lore - An array of "Text" objects (use their getString function if you need a string)
rarity - Can be of the following values: common, uncommon, rare and epic.
unbreakable - If it is not null then the tool is unbreakable.
custom_data - Custom NBT data attached to the object... in the form of a string.
enchantments - Contains every enchantment on the object, if the enchantment is null then it is not present:
- [Enchantment name] - The enchantment
- level - The level of the enchantment on the item.
Those properties can be navigated with the '.' character
Your selected item has {getItem(selectedslot).durability} durability left!