Skip to content

Commit

Permalink
- Updates for 1.20.80 (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xterionix committed Apr 29, 2024
1 parent a8d687e commit f3c02e7
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 5 deletions.
2 changes: 2 additions & 0 deletions source/behavior/entities/filters/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
{ "if": { "properties": { "test": { "const": "has_container_open" } } }, "then": { "$ref": "./filters/has_container_open.json" } },
{ "if": { "properties": { "test": { "const": "has_damage" } } }, "then": { "$ref": "./filters/has_damage.json" } },
{ "if": { "properties": { "test": { "const": "has_equipment" } } }, "then": { "$ref": "./filters/has_equipment.json" } },
{ "if": { "properties": { "test": { "const": "has_damaged_equipment" } } }, "then": { "$ref": "./filters/has_damaged_equipment.json" } },
{ "if": { "properties": { "test": { "const": "has_mob_effect" } } }, "then": { "$ref": "./filters/has_mob_effect.json" } },
{ "if": { "properties": { "test": { "const": "has_nametag" } } }, "then": { "$ref": "./filters/has_nametag.json" } },
{ "if": { "properties": { "test": { "const": "has_property" } } }, "then": { "$ref": "./filters/has_property.json" } },
Expand Down Expand Up @@ -141,6 +142,7 @@
{ "if": { "properties": { "test": { "const": "is_sneak_held" } } }, "then": { "$ref": "./filters/is_sneak_held.json" } },
{ "if": { "properties": { "test": { "const": "is_sneaking" } } }, "then": { "$ref": "./filters/is_sneaking.json" } },
{ "if": { "properties": { "test": { "const": "is_snow_covered" } } }, "then": { "$ref": "./filters/is_snow_covered.json" } },
{ "if": { "properties": { "test": { "const": "is_sitting" } } }, "then": { "$ref": "./filters/is_sitting.json" } },
{ "if": { "properties": { "test": { "const": "is_target" } } }, "then": { "$ref": "./filters/is_target.json" } },
{ "if": { "properties": { "test": { "const": "is_temperature_type" } } }, "then": { "$ref": "./filters/is_temperature_type.json" } },
{ "if": { "properties": { "test": { "const": "is_temperature_value" } } }, "then": { "$ref": "./filters/is_temperature_value.json" } },
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"$id": "blockception.minecraft.behavior.entities.filters.has_damaged_equipment",
"type": "object",
"title": "Has Damaged Equipment",
"description": "Tests for the presence of a damaged named item in the designated slot of the subject entity.",
"required": [ "value" ],
"properties": {
"test": {
"type": "string",
"const": "has_equipment",
"description": "Tests for the presence of a damaged named item in the designated slot of the subject entity.",
"title": "Test"
},
"domain": {
"description": "The equipment location to test.",
"default": "any",
"enum": [ "any", "inventory", "armor", "feet", "hand", "head", "leg", "torso" ],
"title": "Domain"
},
"operator": {
"$ref": "./types/operator.json"
},
"subject": {
"$ref": "./types/subject.json"
},
"value": {
"description": "The item name to look for.",
"type": "string",
"$ref": "../../../../general/item/identifier.json",
"title": "Value"
}
},
"examples": [
{
"test": "has_damaged_equipment",
"value": "example"
}
]
}
31 changes: 31 additions & 0 deletions source/behavior/entities/filters/filters/is_sitting.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$id": "blockception.minecraft.behavior.entities.filters.is_sitting",
"type": "object",
"title": "Is Sitting",
"description": "Returns true if the subject entity is sitting",
"properties": {
"test": {
"type": "string",
"title": "Test Property",
"description": "Returns true if the subject entity is sitting."
},
"operator": {
"$ref": "./types/operator.json"
},
"subject": {
"$ref": "./types/subject.json"
},
"value": {
"title": "Value",
"description": "True or false.",
"type": "boolean",
"default": true
}
},
"examples": [
{
"test": "is_sitting",
"value": true
}
]
}
42 changes: 38 additions & 4 deletions source/behavior/entities/format/components/interact.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,48 @@
"drop_item_slot": {
"title": "Drop Item Slot",
"type": "string",
"description": "The entity's equipment slot to remove and drop the item from, if any, upon successful interaction.",
"enum": ["slot.armor.head", "slot.armor.chest", "slot.armor.legs", "slot.armor.feet"]
"examples": [
"slot.armor.head",
"slot.armor.chest",
"slot.armor.legs",
"slot.armor.feet"
],
"description": "The entity's equipment slot to remove and drop the item from, if any, upon successful interaction."
},
"equip_item_slot": {
"title": "Equip Item Slot",
"type": "string",
"description": "The entity's slot to equip the item to, if any, upon successful interaction. Inventory slots are denoted by positive numbers.",
"enum": ["slot.armor.head", "slot.armor.chest", "slot.armor.legs", "slot.armor.feet"]
"description": "The entity's equipment slot to equip the item to, if any, upon successful interaction.",
"examples": [
"slot.armor.head",
"slot.armor.chest",
"slot.armor.legs",
"slot.armor.feet"
]
},
"repair_entity_item": {
"title": "Repair Entity Item",
"type": "object",
"description": "Allows to repair one of the entity's items.",
"properties": {
"amount": {
"title": "Amount",
"description": "How much of the item durability should be restored upon interaction.",
"type": "integer",
"minimum": 0
},
"slot": {
"title": "Slot",
"description": "The entity's slot containing the item to be repaired.",
"type": "string",
"examples": [
"slot.armor.head",
"slot.armor.chest",
"slot.armor.legs",
"slot.armor.feet"
]
}
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/behavior/items/format/components/wearable.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"description": "Which equipment slot the item can fit in",
"type": "string",
"enum": [
"slot.weapon.mainhand",
"none",
"slot.weapon.mainhand",
"slot.weapon.offhand",
"slot.armor.head",
"slot.armor.chest",
Expand Down
6 changes: 6 additions & 0 deletions source/behavior/recipes/types/recipe_shaped.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
"description": "When input items match the pattern then these items are the result.",
"title": "Result",
"oneOf": [{ "$ref": "./base types/item.json" }, { "type": "array", "items": { "$ref": "./base types/item.json" } }]
},
"assume_symmetry": {
"type": "boolean",
"title": "Assume Symmetry",
"description": "Used to automatically assume a symmetrical recipe should return the same resultUsed to automatically assume a symmetrical recipe should return the same result",
"default": true
}
}
}

0 comments on commit f3c02e7

Please sign in to comment.