Repository navigation
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
},
"int_array":{// use 'int_array' to add int arrays
"key": [321,9345,6165]
},
"byte_array":{// use 'byte_array' to add byte arrays
"key": [1,3,4]
},
"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
}
}
}
}