randomObject( list = $items$ )
It is used to obtain an object from a list of objects but the object will be completely random. Examples of use I have a list of 100 items and I want one of those 100 to get one and this would be the use
Arg | Values | Type | Required |
---|---|---|---|
list | List objets ArrayList object or Text list | ArrayList | Yes |
.
vars_list:
var3_list:
var: "$items$"
type: internal
list:
- "getItemStackByAdapter( item = mc:emerald_block )"
- "getItemStackByAdapter( item = mc:emerald )"
- "getItemStackByAdapter( item = mc:emerald_ore )"
- "getItemStackByAdapter( item = mc:diamond )"
- "getItemStackByAdapter( item = mc:diamond_block )"
- "getItemStackByAdapter( item = mc:diamond_ore )"
vars:
- " $itemRandom$ | internal = randomObject( list = $items$ ) " # Random item emerald, diamond etc