Refactor
This commit is contained in:
86
source/behavior/loot_tables/loot_tables.json
Normal file
86
source/behavior/loot_tables/loot_tables.json
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"$id": "blockception.minecraft.behavior.loot_tables",
|
||||
"additionalProperties": false,
|
||||
"description": "A minecraft loot table",
|
||||
"title": "Loot Table",
|
||||
"examples": [
|
||||
{
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1,
|
||||
"entries": [
|
||||
{
|
||||
"type": "item",
|
||||
"name": "minecraft:spawn_egg",
|
||||
"weight": 1,
|
||||
"functions": [{ "function": "set_count", "count": { "min": 1, "max": 1 } }, { "function": "set_actor_id" }]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"definitions": {
|
||||
"pools_spec": {
|
||||
"title": "Pools",
|
||||
"description": "TODO description",
|
||||
"type": "array",
|
||||
"additionalProperties": false,
|
||||
"items": {
|
||||
"additionalProperties": false,
|
||||
"title": "A Single Pool",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"rolls": {
|
||||
"title": "Rolls",
|
||||
"oneOf": [
|
||||
{ "type": "integer", "minimum": 0 },
|
||||
{
|
||||
"type": "object",
|
||||
"required": ["min", "max"],
|
||||
"properties": { "min": { "title": "Minimum", "type": "number", "minimum": 0 }, "max": { "title": "Minimum", "type": "number", "minimum": 1 } }
|
||||
}
|
||||
]
|
||||
},
|
||||
"type": { "title": "Type", "type": "string", "description": "", "enum": ["loot_table", "item", "empty"] },
|
||||
"conditions": { "title": "Conditions", "description": "TODO", "type": "array", "items": { "$ref": "./conditions.json" } },
|
||||
"entries": {
|
||||
"title": "Entries",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"additionalProperties": false,
|
||||
"type": "object",
|
||||
"required": ["type"],
|
||||
"title": "Entry",
|
||||
"properties": {
|
||||
"type": { "title": "Type", "type": "string", "enum": ["item", "empty", "loot_table"] },
|
||||
"count": { "type": "integer", "title": "Count", "description": "The amount of the item" },
|
||||
"name": { "title": "Name", "type": "string", "description": "An item or loottable", "pattern": "^([\\w]+:|loot_tables/)" },
|
||||
"weight": { "title": "Weight", "type": "integer", "minimum": 1 },
|
||||
"functions": { "title": "Functions", "type": "array", "items": { "type": "object", "required": ["function"], "title": "Function", "$ref": "./functions.json" } },
|
||||
"pools": { "$ref": "#/definitions/pools_spec" },
|
||||
"quality": { "title": "Quality", "description": "UNDOCUMANTED", "type": "integer" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"tiers": {
|
||||
"title": "Tiers",
|
||||
"description": "TODO description",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"bonus_chance": { "title": "Bonus Chance", "description": "TODO description", "type": "number" },
|
||||
"bonus_rolls": { "title": "Bonus Rolls", "description": "TODO description", "type": "integer" },
|
||||
"initial_range": { "title": "Initial Range", "description": "TODO description", "type": "integer" }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"pools": { "$ref": "#/definitions/pools_spec", "description": "TODO description", "title": "TODO Title" },
|
||||
"type": { "title": "Type", "type": "string", "description": "TODO description", "enum": ["minecraft:chest"] }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user