Update loot table schemas (#391)
* update loot table schemas * remove entity_properties and use new int_or_range definition * remove entity_properties from conditions.json as well
This commit is contained in:
19
source/behavior/loot_tables/conditions/bool_property.json
Normal file
19
source/behavior/loot_tables/conditions/bool_property.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.bool_property",
|
||||
"type": "object",
|
||||
"title": "Bool Property",
|
||||
"description": "Checks whether a boolean property matches the requested value.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "domain", "value"],
|
||||
"properties": {
|
||||
"condition": { "const": "bool_property" },
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": "Property domain identifier."
|
||||
},
|
||||
"value": {
|
||||
"type": "boolean",
|
||||
"description": "Expected boolean value."
|
||||
}
|
||||
}
|
||||
}
|
||||
15
source/behavior/loot_tables/conditions/entity_killed.json
Normal file
15
source/behavior/loot_tables/conditions/entity_killed.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.entity_killed",
|
||||
"type": "object",
|
||||
"title": "Entity Killed",
|
||||
"description": "Checks whether the source entity matches the supplied identifier.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "entity_type"],
|
||||
"properties": {
|
||||
"condition": { "const": "entity_killed" },
|
||||
"entity_type": {
|
||||
"type": "string",
|
||||
"description": "Entity identifier expected for the killer/victim."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.entity_properties",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Returns true if the actor properties defined were executed.",
|
||||
"title": "Entity Properties",
|
||||
"properties": {
|
||||
"condition": { "type": "string", "title": "Condition", "description": "Returns true if the actor properties defined were executed.", "$comment": "UNDOCUMENTED" },
|
||||
"entity": { "type": "string", "default": "this", "description": "The entity to test. The value must be only `this`.", "title": "Entity" },
|
||||
"properties": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"description": "The entity's properties. `on_fire`, `on_ground` is used for now.",
|
||||
"title": "Properties",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on_fire": {
|
||||
"title": "On Fire",
|
||||
"description": "Checks if the entity is on fire or not.",
|
||||
"$comment": "UNDOCUMENTED",
|
||||
"type": "boolean"
|
||||
},
|
||||
"on_ground": {
|
||||
"title": "On Ground",
|
||||
"description": "Checks if the entity is on the ground or not.",
|
||||
"$comment": "UNDOCUMENTED",
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
19
source/behavior/loot_tables/conditions/enum_property.json
Normal file
19
source/behavior/loot_tables/conditions/enum_property.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.enum_property",
|
||||
"type": "object",
|
||||
"title": "Enum Property",
|
||||
"description": "Checks whether an enum property matches the requested value.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "domain", "value"],
|
||||
"properties": {
|
||||
"condition": { "const": "enum_property" },
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": "Property domain identifier."
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "Expected enumeration value."
|
||||
}
|
||||
}
|
||||
}
|
||||
19
source/behavior/loot_tables/conditions/float_property.json
Normal file
19
source/behavior/loot_tables/conditions/float_property.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.float_property",
|
||||
"type": "object",
|
||||
"title": "Float Property",
|
||||
"description": "Checks whether a float property matches the requested value.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "domain", "value"],
|
||||
"properties": {
|
||||
"condition": { "const": "float_property" },
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": "Property domain identifier."
|
||||
},
|
||||
"value": {
|
||||
"description": "Expected float value.",
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
}
|
||||
15
source/behavior/loot_tables/conditions/has_property.json
Normal file
15
source/behavior/loot_tables/conditions/has_property.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.has_property",
|
||||
"type": "object",
|
||||
"title": "Has Property",
|
||||
"description": "Checks whether the current actor exposes a property in the given domain.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "domain"],
|
||||
"properties": {
|
||||
"condition": { "const": "has_property" },
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": "Property domain identifier."
|
||||
}
|
||||
}
|
||||
}
|
||||
15
source/behavior/loot_tables/conditions/has_variant.json
Normal file
15
source/behavior/loot_tables/conditions/has_variant.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.has_variant",
|
||||
"type": "object",
|
||||
"title": "Has Variant",
|
||||
"description": "Checks the variant value of the current actor.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "variant"],
|
||||
"properties": {
|
||||
"condition": { "const": "has_variant" },
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"description": "Expected variant identifier."
|
||||
}
|
||||
}
|
||||
}
|
||||
19
source/behavior/loot_tables/conditions/int_property.json
Normal file
19
source/behavior/loot_tables/conditions/int_property.json
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"$id": "blockception.minecraft.behavior.condition.int_property",
|
||||
"type": "object",
|
||||
"title": "Int Property",
|
||||
"description": "Checks whether an integer property matches the requested value.",
|
||||
"additionalProperties": false,
|
||||
"required": ["condition", "domain", "value"],
|
||||
"properties": {
|
||||
"condition": { "const": "int_property" },
|
||||
"domain": {
|
||||
"type": "string",
|
||||
"description": "Property domain identifier."
|
||||
},
|
||||
"value": {
|
||||
"description": "Expected integer value.",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,15 +8,18 @@
|
||||
"properties": {
|
||||
"condition": { "type": "string", "const": "match_tool", "title": "Condition", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
|
||||
"item": {
|
||||
"title": "Item",
|
||||
"description": "The item to match",
|
||||
"type": "string"
|
||||
"$ref": "../../../general/item/identifier.json"
|
||||
},
|
||||
"count": {
|
||||
"title": "Count",
|
||||
"description": "Minimum count to match of the given item",
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
"$ref": "../../../general/int_or_range.json"
|
||||
},
|
||||
"durability": {
|
||||
"title": "Durability",
|
||||
"description": "Minimum durability to match of the given item",
|
||||
"$ref": "../../../general/int_or_range.json"
|
||||
},
|
||||
"enchantments": {
|
||||
"title": "Enchantments",
|
||||
|
||||
@@ -2,40 +2,17 @@
|
||||
"$id": "blockception.minecraft.behavior.condition.random_regional_difficulty_chance",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Sets a Maximum regional difficulty random chance of the specified value.",
|
||||
"description": "Passes with a probability scaled by the world's regional difficulty multiplier. The regional difficulty is based on dimension, world difficulty and moon brightness.",
|
||||
"title": "Random Regional Difficulty Chance",
|
||||
"properties": {
|
||||
"condition": { "type": "string", "title": "Condition", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
|
||||
"default_chance": {
|
||||
"condition": { "const": "random_regional_difficulty_chance" },
|
||||
"max_chance": {
|
||||
"type": "number",
|
||||
"default": 0,
|
||||
"description": "The default random chance if the level difficulty is not assigned.",
|
||||
"title": "Default Chance"
|
||||
},
|
||||
"max_chance": { "title": "Maximum Chance", "type": "number", "description": "UNDOCUMENTED.", "$comment": "UNDOCUMENTED" },
|
||||
"easy": {
|
||||
"type": "number",
|
||||
"default": 0,
|
||||
"description": "The default random chance if the level difficulty is in easy. Omitting this field will set the value to `default_chance` field.",
|
||||
"title": "Easy"
|
||||
},
|
||||
"hard": {
|
||||
"type": "number",
|
||||
"default": 0,
|
||||
"description": "The default random chance if the level difficulty is in hard. Omitting this field will set the value to `default_chance` field.",
|
||||
"title": "Hard"
|
||||
},
|
||||
"normal": {
|
||||
"type": "number",
|
||||
"default": 0,
|
||||
"description": "The default random chance if the level difficulty is in normal. Omitting this field will set the value to `default_chance` field.",
|
||||
"title": "Normal"
|
||||
},
|
||||
"peaceful": {
|
||||
"type": "number",
|
||||
"default": 0,
|
||||
"description": "The default random chance if the level difficulty is in peaceful. Omitting this field will set the value to `default_chance` field.",
|
||||
"title": "Peaceful"
|
||||
"description": "Base probability (0-1) before scaling by the regional difficulty multiplier.",
|
||||
"minimum": 0,
|
||||
"maximum": 1,
|
||||
"default": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": ["condition"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user