-
Notifications
You must be signed in to change notification settings - Fork 0
JSON Files
urstruktur edited this page Nov 30, 2016
·
10 revisions
Example of crafting json file defining the crafting receipts. Meant to be modified manually.
{
"receipts": [{
"ingredients": {
"1": {
"typeID": "woodblock",
"pos": [0, 0],
"amount": 1
},
"2": {
"typeID": "stoneblock",
"pos": [1, 0],
"amount": 1
}
},
"resultTypeID": "lasergun"
}, {
"ingredients": {
"1": {
"typeID": "woodblock",
"pos": [0, 0],
"amount": 1
},
"2": {
"typeID": "woodblock",
"pos": [0, 1],
"amount": 1
}
},
"resultTypeID": "woodplank"
}]
}Example of the json file defining all the item types. It defines all available item types and holds all static information like the maximum stack height or image file. Meant to be modified manually.
{
"itemtypes" : {
"stoneblock" : {
"category": "block",
"name": "Stone Block",
"maxStackHeight": 64,
"hasWear": false,
"image": "items/stoneblock.png"
},
"woodblock" : {
"name": "Wood Block",
"category": "block",
"maxStackHeight": 64,
"hasWear": false,
"image": "items/woodblock.png"
},
"lasergun" : {
"name": "Laser Gun",
"category": "tool",
"maxStackHeight": 1,
"hasWear": true,
"image": "items/lasergun.png"
}
}
}The json representation of a players inventory. Only meant to be created programmatically for saving and loading.
{
"inventory": {
"items": [
{
"pos": [1, 2],
"typeID": "woodblock",
"stackHeight": 3
},
{
"pos": [0, 3],
"typeID": "lasergun",
"wear": 1.0
}
]
}
}ALL VALID!