Skip to content

Commit

Permalink
Updated to 1.21.50 (#330)
Browse files Browse the repository at this point in the history
* - Add new client biome components
* - Added built-in block tags
* - Add liquid detection block component
* - Add item visual component
* - Allow ambient_occlusion to use floats
* - Added cannot_be_attacked and ignore component
* - Added play_sound event response
* - Added summon_event property to summon_entity behavior
* - Updated home and looked_at components
* - Added compostable item component
* - Added jigsaws
* - Added processor_lists
* - Made identifier required in jigsaws
* - Added structure sets
* - Remove compressed volume file
* - Add template pools
* - Setup jigsaw schemas
* - Added broadcast_when_dying
* - Update interact.vibration
* - Fix format_version ref in jigsaw schemas
  • Loading branch information
Xterionix authored Dec 5, 2024
1 parent b4b53a8 commit ec99529
Show file tree
Hide file tree
Showing 36 changed files with 1,131 additions and 39 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ JSON validation can give snippets for sub items, as well as description, but thi
- [Recipes](behavior/recipes/recipes.json)
- [Spawn rules](behavior/spawn_rules/spawn_rules.json)
- [Trading](behavior/trading/trading.json)
- [Jigsaws](behavior/worldgen)

## Resource files

Expand Down
1 change: 0 additions & 1 deletion behavior/volumes/volumes.json

This file was deleted.

20 changes: 20 additions & 0 deletions source/behavior/blocks/format/components/item_visual.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.item_visual",
"title": "Item Visual",
"description": "The description identifier of the geometry and material used to render the item of this block.\nExperimental toggles required: Upcoming Creator Features",
"type": "object",
"additionalProperties": false,
"required": [ "geometry", "material_instances" ],
"properties": {
"geometry": {
"title": "Geometry",
"description": "The \"minecraft:geometry\" component that will be used for the item.",
"$ref": "./geometry.json"
},
"material_instances": {
"title": "Geometry",
"description": "The \"minecraft:material_instances\" component that will be used for the item.",
"$ref": "./material_instances.json"
}
}
}
56 changes: 56 additions & 0 deletions source/behavior/blocks/format/components/liquid_detection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.liquid_detection",
"title": "Liquid Detection",
"description": "The definitions for how a block behaves when detecting liquid. Only one rule definition is allowed per liquid type - if multiple are specified, the first will be used and the rest will be ignored.\nExperimental toggles required: Upcoming Creator Features",
"type": "object",
"additionalProperties": false,
"required": [ ],
"definitions": {
"definition_rule": {
"title": "Definition Rule",
"description": "The definition rule that specifies the behavior for one liquid type.",
"type": "object",
"additionalProperties": false,
"properties": {
"can_contain_liquid": {
"title": "Can Contain Liquid",
"description": "Whether this block can contain the liquid. For example, if the liquid type is water, this means the block can be waterlogged.",
"type": "boolean",
"default": false
},
"liquid_type": {
"title": "Liquid Type",
"description": "The type of liquid this detection rule is for.",
"type": "string",
"enum": [ "water" ],
"default": "water"
},
"on_liquid_touches": {
"title": "On Liquid Touches",
"description": "How the block reacts to flowing water. Must be one of the following options:\n\"blocking\" - The default value for this field. The block stops the liquid from flowing.\n\"broken\" - The block is destroyed completely.\n\"popped\" - The block is destroyed and its item is spawned.\n\"no_reaction\" - The block is unaffected; visually, the liquid will flow through the block.",
"type": "string",
"enum": [ "blocking", "broken", "popped", "no_reaction" ],
"default": "blocking"
},
"stops_liquid_flowing_from_direction": {
"title": "Stops Liquid Flowing From Direction",
"description": "When a block contains a liquid, controls the directions in which the liquid can't flow out from the block. Also controls the directions in which a block can stop liquid flowing into it if no_reaction is set for the on_liquid_touches field. The default is an empty list; this means that liquid can flow out of all directions by default.",
"type": "array",
"uniqueItems": true,
"items": {
"type": "string",
"enum": [ "up", "down", "north", "south", "east", "west", "side", "all" ]
}
}
}
}
},
"properties": {
"detection_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/definition_rule"
}
}
}
}
28 changes: 18 additions & 10 deletions source/behavior/blocks/format/components/material_instances.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"$id": "blockception.minecraft.behavior.blocks.minecraft.material_instances",
"title": "Material Instances",
"description": "The material instances for a block. Maps face or material_instance names in a geometry file to an actual material instance. You can assign a material instance object to any of these faces: \"up\", \"down\", \"north\", \"south\", \"east\", \"west\", or \"*\". You can also give an instance the name of your choosing such as \"my_instance\", and then assign it to a face by doing \"north\":\"my_instance\".",
"required": [],
"required": [ ],
"examples": [
{ "*": {} },
{ "custom_sides": {} },
{ "up": {} },
{ "down": {} },
{ "north": {} },
{ "*": { } },
{ "custom_sides": { } },
{ "up": { } },
{ "down": { } },
{ "north": { } },
{ "south": "custom_sides" },
{ "east": "custom_sides" },
{ "west": "custom_sides" }
Expand All @@ -27,9 +27,17 @@
"properties": {
"ambient_occlusion": {
"title": "Ambient Occlusion",
"type": "boolean",
"default": true,
"description": "Should this material have ambient occlusion applied when lighting? If true, shadows will be created around and underneath the block."
"description": "Should this material have ambient occlusion applied when lighting? If true, shadows will be created around and underneath the block.",
"anyOf": [
{
"type": "boolean",
"default": true
},
{
"type": "number",
"minimum": 0 //TODO: Check if there's a maximum value
}
]
},
"face_dimming": {
"title": "Face Dimming",
Expand All @@ -43,7 +51,7 @@
"default": "opaque",
"description": "The render method to use. Must be one of these options: opaque - Used for a regular block texture without an alpha layer. Does not allow for transparency or translucency. double_sided - Used for completely disabling backface culling. blend - Used for a block like stained glass. Allows for transparency and translucency (slightly transparent textures). alpha_test - Used for a block like the vanilla (unstained) glass. Does not allow for translucency, only fully opaque or fully transparent textures. Also disables backface culling.",
"markdownDescription": "The render method to use. Must be one of these options: \nopaque - Used for a regular block texture without an alpha layer. Does not allow for transparency or translucency.\ndouble_sided - Used for completely disabling backface culling.\nblend - Used for a block like stained glass. Allows for transparency and translucency (slightly transparent textures).\nalpha_test - Used for a block like the vanilla (unstained) glass. Does not allow for translucency, only fully opaque or fully transparent textures. Also disables backface culling.",
"enum": ["opaque", "double_sided", "blend", "alpha_test", "alpha_test_single_sided"]
"enum": [ "opaque", "double_sided", "blend", "alpha_test", "alpha_test_single_sided" ]
},
"texture": {
"title": "Texture",
Expand Down
16 changes: 15 additions & 1 deletion source/behavior/blocks/format/minecraft.block.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
"minecraft:flammable": { "$ref": "./components/flammable.json" },
"minecraft:friction": { "$ref": "./components/friction.json" },
"minecraft:geometry": { "$ref": "./components/geometry.json" },
"minecraft:item_visual": { "$ref": "./components/item_visual.json" },
"minecraft:light_dampening": { "$ref": "./components/light_dampening.json" },
"minecraft:light_emission": { "$ref": "./components/light_emission.json" },
"minecraft:liquid_detection": { "$ref": "./components/liquid_detection.json" },
"minecraft:loot": { "$ref": "./components/loot.json" },
"minecraft:map_color": { "$ref": "./components/map_color.json" },
"minecraft:material_instances": { "$ref": "./components/material_instances.json" },
Expand All @@ -34,7 +36,19 @@
"minecraft:transformation": { "$ref": "./components/transformation.json" },
"minecraft:custom_components": { "$ref": "./components/custom_components.json" },
"minecraft:tick": { "$ref": "./components/tick.json" },
"minecraft:entity_fall_on": { "$ref": "./components/entity_fall_on.json" }
"minecraft:entity_fall_on": { "$ref": "./components/entity_fall_on.json" },
// Tags
"tag:minecraft:diamond_tier_destructible": { },
"tag:minecraft:iron_tier_destructible": { },
"tag:minecraft:is_axe_item_destructible": { },
"tag:minecraft:is_hoe_item_destructible": { },
"tag:minecraft:is_mace_item_destructible": { },
"tag:minecraft:is_pickaxe_item_destructible": { },
"tag:minecraft:is_shears_item_destructible": { },
"tag:minecraft:is_shovel_item_destructible": { },
"tag:minecraft:is_sword_item_destructible": { },
"tag:minecraft:netherite_tier_destructible": { },
"tag:minecraft:stone_tier_destructible": { }
},
"patternProperties": {
"tag:.+": {
Expand Down
11 changes: 8 additions & 3 deletions source/behavior/entities/format/behaviors/summon_entity.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"title": "Summon Entity",
"type": "object",
"additionalProperties": false,
"required": [],
"required": [ ],
"properties": {
"priority": {
"$ref": "./types/priority.json"
Expand Down Expand Up @@ -111,7 +111,7 @@
"type": "string",
"default": "line",
"description": "The base shape of this step. Valid values are circle and line",
"enum": ["line", "circle"],
"enum": [ "line", "circle" ],
"title": "Shape"
},
"size": {
Expand All @@ -137,6 +137,11 @@
"description": "Maximum radius where the summon entities can spawn.",
"title": "Summon Cap Radius"
},
"summon_event": {
"title": "Summon Event",
"default": "self",
"description": "Event to invoke on each summoned entity on spawn."
},
"target": {
"type": "string",
"default": "self",
Expand All @@ -163,7 +168,7 @@
},
"examples": [
{
"summon_choices": []
"summon_choices": [ ]
}
]
}
2 changes: 2 additions & 0 deletions source/behavior/entities/format/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"minecraft:can_fly": { "$ref": "./components/can_fly.json" },
"minecraft:can_join_raid": { "$ref": "./components/can_join_raid.json" },
"minecraft:can_power_jump": { "$ref": "./components/can_power_jump.json" },
"minecraft:cannot_be_attacked": { "$ref": "./components/cannot_be_attacked.json" },
"minecraft:celebrate_hunt": { "$ref": "./components/celebrate_hunt.json" },
"minecraft:collision_box": { "$ref": "./components/collision_box.json" },
"minecraft:color": { "$ref": "./components/color.json" },
Expand Down Expand Up @@ -71,6 +72,7 @@
"minecraft:genetics": { "$ref": "./components/genetics.json" },
"minecraft:giveable": { "$ref": "./components/giveable.json" },
"minecraft:ground_offset": { "$ref": "./components/ground_offset.json" },
"minecraft:ignore_cannot_be_attacked": { "$ref": "./components/ignore_cannot_be_attacked.json" },
"minecraft:group_size": { "$ref": "./components/group_size.json" },
"minecraft:grows_crop": { "$ref": "./components/grows_crop.json" },
"minecraft:healable": { "$ref": "./components/healable.json" },
Expand Down
6 changes: 6 additions & 0 deletions source/behavior/entities/format/components/angry.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@
"description": "If true, other entities of the same entity definition within the broadcastRange will also become angry whenever this mob is attacked.",
"title": "Broadcast Anger On Being Attacked"
},
"broadcast_anger_when_dying": {
"type": "boolean",
"default": false,
"description": "If false, when this mob is killed it does not spread its anger to other entities of the same entity definition within the broadcastRange",
"title": "Broadcast Anger When Dying"
},
"duration": {
"title": "Duration",
"type": "integer",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.cannot_be_attacked",
"type": "object",
"title": "Cannot Be Attacked",
"additionalProperties": false,
"description": "When set, blocks entities from attacking the owner entity unless they have the \"minecraft:ignore_cannot_be_attacked\" component.",
"required": [ ],
"properties": { }
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"title": "Deals Damage",
"description": "Defines how received damage affects the entity:\n- 'yes', received damage is applied to the entity.\n- 'no', received damage is not applied to the entity.\n- 'no_but_side_effects_apply', received damage is not applied to the entity, but the side effects of the attack are. This means that the attacker's weapon loses durability, enchantment side effects are applied, and so on.",
"enum": [ "yes", "no", "no_but_side_effects_apply" ],
"default": "yes",
"default": "yes"
},
"on_damage": {
"type": "object",
Expand Down
Loading

0 comments on commit ec99529

Please sign in to comment.