-
Notifications
You must be signed in to change notification settings - Fork 2
ItemStack
small_jiu edited this page May 26, 2022
·
31 revisions
item have 5 method to add:
// NBT's '"' need use '\"',
// looks like \"key\": \"any value\",
// and dont use line feed
- "name@count@meta@nbt"
"minecraft:stone@2@10@{\"str":\"Hi_This_Is_Item\"}"
// the item will not hava nbt
// looks like 'name@count@meta@{}'
- "name@count@meta"
"minecraft:stone@2@10"
// the item with use 'meta 0'
// looks like 'name@count@0'
- "name@count"
"minecraft:stone@2"
// the item with use '1 count' and 'meta 0'
// looks like 'name@1@0'
- "name"
"minecraft:stone"
- JsonObject
{
"name": "minecraft:stone",// the item name, must exist
"count": 4,// the item count/amount, if not fount, wiil use 1 to set item count
"meta": 5,// the item meta, if not fount, wiil use 0 to set item meta
"nbt":{// the item nbtTags, if not fount, item will not have nbt
"boolean":{ // use 'boolean' to add booleans
"key": false
},
"string":{// use 'string' to add strings
"key": "value"
},
"long":{// use 'long' to add longs
"key":value
},
"int":{// use 'int' to add ints
"key":value
},
"float":{// use 'float' to add floats
"key":value
},
"double":{// use 'double' to add doubles
"key":value
},
"byte":{// use 'byte' to add bytes
"key":value
},
"short":{// use 'short' to add shorts
"key":value
},
"float_array":{// use 'float_array' to add float arrays
"key": [123.0123, 1646.8831, 1534.1238]
},
"double_array":{// use 'double_array' to add double arrays
"key": [321.000000001, 16156.55913, 1843.81315464]
},
"long_array":{// use 'long_array' to add long arrays
"key": [-9223372036854775808, 0, 9223372036854775807]
},
"int_array":{// use 'int_array' to add int arrays
"key": [-2147483647, 0, 2147483647]
},
"short_array":{// use 'short_array' to add short arrays
"key": [-32768,0,32767]
},
"byte_array":{// use 'byte_array' to add byte arrays
"key": [-128, 0, 127]
},
"string_array":{// use 'string_array' to add string arrays
"key": ["111","jiujiujiu", "999"]
},
"boolean_array":{// use 'boolean_array' to add boolean arrays
"key": [false, true, false]
},
"tags":{ // use 'tags' to add more sub nbts
"key":{ // the sub nbt will use normal nbt method to set
// some tags...
"tags":{} // the sub nbt can add more and more sub nbt, use 'tags' to add it
}
}
}
}