Skip to content

Commit

Permalink
Updated for 1.21.60 (#334)
Browse files Browse the repository at this point in the history
* - Add crafting item catalogs
* - Removed experimental warning for item visual
* - Added renders_when_invisible entity component
* - Removed experimental warning for liquid detection
* - Added property inheritance to breedable
* - Added min_looked_at_duration field to look_at component
* - Added combine_parent_colors to breedable
* - Update catalog file schema
* - Split storage item components
* - Added new entity filters
* - Added surface opacity to water appearance biome component
* - Remove actor_id loot table example as it is no longer the standard
* - Add set_armor_trim trim loot table function
* - Added match_tool loot table condition
* - Added creature_spawn_probability component
* - Added verticalFlySpeed to has_ability
* - Update descriptions and default values
* - Add base field to block_sounds
* - Removed block sounds enum as creators can specify custom ones too
* - Change default format version
  • Loading branch information
Xterionix authored Feb 13, 2025
1 parent 968d0c7 commit 4056987
Show file tree
Hide file tree
Showing 38 changed files with 453 additions and 252 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ JSON validation can give snippets for sub items, as well as description, but thi
- [Spawn rules](behavior/spawn_rules/spawn_rules.json)
- [Trading](behavior/trading/trading.json)
- [Jigsaws](behavior/worldgen)
- [Crafting Item Catalog](behavior/item_catalog/crafting_item_catalog.json)

## Resource files

Expand Down
1 change: 1 addition & 0 deletions source/behavior/biomes/biomes.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"minecraft:capped_surface": { "$ref": "./components/capped_surface.json" },
"minecraft:climate": { "$ref": "./components/climate.json" },
"minecraft:consolidated_features": { "$ref": "./components/consolidated_features.json" },
"minecraft:creature_spawn_probability": { "$ref": "./components/creature_spawn_probability.json" },
"minecraft:frozen_ocean_surface": { "$ref": "./components/frozen_ocean_surface.json" },
"minecraft:legacy_world_generation_rules": {
"$ref": "./components/legacy_world_generation_rules.json"
Expand Down
16 changes: 16 additions & 0 deletions source/behavior/biomes/components/creature_spawn_probability.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$id": "minecraft.behavior.biomes.components.minecraft.creature_spawn_probability",
"title": "Creature Spawn Probability",
"description": "Probability that creatures will spawn within the biome when a chunk is generated.",
"type": "object",
"additionalProperties": false,
"properties": {
"probability": {
"type": "number",
"title": "Probability",
"description": "Probabiltity between [0.0, 0.75] of creatures spawning within the biome on chunk generation.",
"minimum": 0.0,
"maximum": 0.75
}
}
}
2 changes: 1 addition & 1 deletion source/behavior/blocks/format/components/item_visual.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$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",
"description": "The description identifier of the geometry and material used to render the item of this block.",
"type": "object",
"additionalProperties": false,
"required": [ "geometry", "material_instances" ],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$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",
"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.",
"type": "object",
"additionalProperties": false,
"required": [ ],
Expand Down
5 changes: 4 additions & 1 deletion source/behavior/blocks/format/minecraft.block.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@
"$ref": "../../../general/vanilla/creative_category.json"
},
"group": {
"$ref": "../../../general/vanilla/item_group.json"
"title": "Group",
"description": "A translation string of an existing group in minecraft to group this block/item under",
"type": "string",
"pattern": "^[0-9a-zA-Z:_\\.\\-]+$"
},
"is_hidden_in_commands": {
"title": "Is Hidden In Commands",
Expand Down
2 changes: 2 additions & 0 deletions source/behavior/entities/filters/filters.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
{ "if": { "properties": { "test": { "const": "has_tag" } } }, "then": { "$ref": "./filters/has_tag.json" } },
{ "if": { "properties": { "test": { "const": "has_target" } } }, "then": { "$ref": "./filters/has_target.json" } },
{ "if": { "properties": { "test": { "const": "has_trade_supply" } } }, "then": { "$ref": "./filters/has_trade_supply.json" } },
{ "if": { "properties": { "test": { "const": "home_distance" } } }, "then": { "$ref": "./filters/home_distance.json" } },
{ "if": { "properties": { "test": { "const": "hourly_clock_time" } } }, "then": { "$ref": "./filters/hourly_clock_time.json" } },
{ "if": { "properties": { "test": { "const": "in_block" } } }, "then": { "$ref": "./filters/in_block.json" } },
{ "if": { "properties": { "test": { "const": "in_caravan" } } }, "then": { "$ref": "./filters/in_caravan.json" } },
Expand All @@ -119,6 +120,7 @@
{ "if": { "properties": { "test": { "const": "is_avoiding_mobs" } } }, "then": { "$ref": "./filters/is_avoiding_mobs.json" } },
{ "if": { "properties": { "test": { "const": "is_biome" } } }, "then": { "$ref": "./filters/is_biome.json" } },
{ "if": { "properties": { "test": { "const": "is_block" } } }, "then": { "$ref": "./filters/is_block.json" } },
{ "if": { "properties": { "test": { "const": "is_bound_to_creaking_heart" } } }, "then": { "$ref": "./filters/is_bound_to_creaking_heart.json" } },
{ "if": { "properties": { "test": { "const": "is_brightness" } } }, "then": { "$ref": "./filters/is_brightness.json" } },
{ "if": { "properties": { "test": { "const": "is_climbing" } } }, "then": { "$ref": "./filters/is_climbing.json" } },
{ "if": { "properties": { "test": { "const": "is_color" } } }, "then": { "$ref": "./filters/is_color.json" } },
Expand Down
2 changes: 1 addition & 1 deletion source/behavior/entities/filters/filters/has_ability.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"value": {
"type": "string",
"description": "(Required) The Ability type to test.",
"enum": ["flySpeed", "flying", "instabuild", "invulnerable", "lightning", "mayfly", "mute", "noclip", "walkSpeed", "worldbuilder"],
"enum": ["flySpeed", "flying", "instabuild", "invulnerable", "lightning", "mayfly", "mute", "noclip", "walkSpeed", "worldbuilder", "verticalFlySpeed"],
"title": "Value"
}
},
Expand Down
26 changes: 26 additions & 0 deletions source/behavior/entities/filters/filters/home_distance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"$id": "blockception.minecraft.behavior.entities.filters.home_distance",
"type": "object",
"title": "Home Distance",
"description": "Tests the distance between the subject and its home. Returns false if the subject has no home or if their home is in a different dimension.",
"required": ["value"],
"properties": {
"test": {
"type": "string",
"title": "Test",
"description": "The test property."
},
"operator": {
"$ref": "./types/operator.json"
},
"subject": {
"$ref": "./types/subject.json"
},
"value": {
"description": "(Required) A floating point value.",
"type": "number",
"default": true,
"title": "Value"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$id": "blockception.minecraft.behavior.entities.filters.is_bound_to_creaking_heart",
"type": "object",
"title": "Is Bound To Creaking Heart",
"description": "Tests that the Creaking Heart that spawned the subject Creaking still exists.",
"properties": {
"test": {
"type": "string",
"title": "Test Property",
"description": "The test property."
},
"operator": {
"$ref": "./types/operator.json"
},
"subject": {
"$ref": "./types/subject.json"
},
"value": {
"title": "Value",
"description": "True or false.",
"type": "boolean",
"default": true
}
},
"examples": [
{
"test": "is_bound_to_creaking_heart",
"value": false
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"listen_time": {
"title": "Listen Time",
"type": "integer",
"default": 0.0,
"default": 30,
"description": "Sets the time an entity should continue delivering items to a noteblock after hearing it."
},
"on_item_throw": {
Expand Down
6 changes: 3 additions & 3 deletions source/behavior/entities/format/behaviors/move_outdoors.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
"search_count": {
"title": "Search Count",
"type": "integer",
"default": 0.0,
"default": 10,
"description": "The amount of times to try finding a random outdoors position before failing."
},
"search_height": {
"title": "Search Height",
"type": "integer",
"default": 0.0,
"default": 5,
"description": "The y range to search for an outdoors position for."
},
"search_range": {
"title": "Search Range",
"type": "integer",
"default": 0.0,
"default": 15,
"description": "The x and z range to search for an outdoors position for."
},
"timeout_cooldown": {
Expand Down
4 changes: 2 additions & 2 deletions source/behavior/entities/format/behaviors/ram_attack.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"min_ram_distance": {
"title": "Min Ram Distance",
"type": "number",
"default": 0.0,
"default": 4.0,
"description": "The minimum distance at which the mob can start a ram attack."
},
"on_start": {
Expand All @@ -53,7 +53,7 @@
"ram_distance": {
"title": "Ram Distance",
"type": "number",
"default": 0.0,
"default": 7.0,
"description": "The distance at which the mob start to run with ram speed."
},
"ram_impact_sound": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"title": "Digging Duration Range",

"$ref": "../../../../general/vectors/number2.json",
"default": [0.0, 0.0],
"default": [8.0, 10.0],
"description": "Digging duration in seconds."
},
"find_valid_position_retries": {
"title": "Find Valid Position Retries",
"type": "number",
"default": 0.0,
"default": 5.0,
"description": "Amount of retries to find a valid target position within search range."
},
"goal_radius": {
Expand Down Expand Up @@ -80,13 +80,13 @@
"search_range_xz": {
"title": "Search Range XZ",
"type": "number",
"default": 0.0,
"default": 10.0,
"description": "Width and length of the volume around the entity used to find a valid target position"
},
"search_range_y": {
"title": "Search Range Y",
"type": "number",
"default": 0.0,
"default": 7.0,
"description": "Height of the volume around the entity used to find a valid target position"
},
"spawn_item_after_seconds": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"listen_time": {
"title": "Listen Time",
"type": "integer",
"default": 0.0,
"default": 30.0,
"description": "Sets the time an entity should stay near a noteblock after hearing it."
},
"speed": {
Expand Down
1 change: 1 addition & 0 deletions source/behavior/entities/format/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@
"minecraft:ravager_blocked": { "$ref": "./components/ravager_blocked.json" },
"minecraft:rideable": { "$ref": "./components/rideable.json" },
"minecraft:reflect_projectiles": { "$ref": "./components/reflect_projectiles.json" },
"minecraft:renders_when_invisible": { "$ref": "./components/renders_when_invisible.json" },
"minecraft:scale_by_age": { "$ref": "./components/scale_by_age.json" },
"minecraft:scale": { "$ref": "./components/scale.json" },
"minecraft:scheduler": { "$ref": "./components/scheduler.json" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"play_attack_sound": {
"title": "Play Attack Sound",
"type": "boolean",
"default": 4.94066e-324,
"default": true,
"description": "If the entity should play their attack sound when attacking a target."
}
},
Expand Down
31 changes: 30 additions & 1 deletion source/behavior/entities/format/components/breedable.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@
"default": 0,
"minimum": 0.0,
"maximum": 1.0,
"description": "The percentage chance of a mutation on the entity's color.",
"description": "The percentage chance of the offspring getting its color as if spawned rather than inheriting color from its parents.",
"title": "Color"
},
"extra_variant": {
Expand Down Expand Up @@ -227,6 +227,29 @@
"type": "array",
"description": "[EXPERIMENTAL] List of attributes that should benefit from parent centric attribute blending. For example, horses blend their health, movement, and jump_strength in their offspring."
},
"property_inheritance": {
"title": "Property Inheritance",
"description": "List of Entity Properties that should be inherited from the parent entities and potentially mutated.",
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"properties": {
"mutation_chance": {
"title": "Mutation Chance",
"description": "The chance it should not inherit from either parent",
"type": "number",
"minimum": 0
},
"mutation_values": {
"title": "Mutation Values",
"description": "Array of values to select from if mutating and the component has random mutation set",
"type": "array",
"minItems": 1
}
}
}
},
"random_extra_variant_mutation_interval": {
"title": "Random Extra Variant Mutation Interval",
"default": 0,
Expand All @@ -245,6 +268,12 @@
"description": "If true, the babies will be automatically tamed if its parents are.",
"title": "Inherit Tamed"
},
"combine_parent_colors": {
"type": "boolean",
"default": true,
"description": "If true, the babies will have their color be mixed.",
"title": "Combine Parent Colors"
},
"require_full_health": {
"type": "boolean",
"default": false,
Expand Down
6 changes: 6 additions & 0 deletions source/behavior/entities/format/components/looked_at.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@
"description": "Maximum distance this entity will look for another entity looking at it.",
"title": "Search Radius"
},
"min_looked_at_duration": {
"type": "number",
"default": 0,
"description": "Defines the minimum, continuous time the owner entity has to be looked at before being considered as such.",
"title": "Min Looked At Duration"
},
"set_target": {
"title": "Set Target",
"description": "Defines if and how the owner entity will set entities that are looking at it as its combat targets. Valid values:\n- \"never\", looking entities are never set as targets, but events are emitted.\n- \"once_and_stop_scanning\", the first detected looking entity is set as target. Scanning and event emission is suspended if and until the owner entity has a target.\n- \"once_and_keep_scanning\", the first detected looking entity is set as target. Scanning and event emission continues.",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$id": "blockception.minecraft.behavior.entities.minecraft.renders_when_invisible",
"title": "Renders When Invisible",
"description": "Marks the entity as being able to fly, the pathfinder won't be restricted to paths where a solid block is required underneath it.",
"type": "object",
"additionalProperties": false,
"properties": {}
}
13 changes: 13 additions & 0 deletions source/behavior/item_catalog/crafting_item_catalog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.item_catalog.crafting_item_catalog",
"type": "object",
"title": "Crafting Item Catalog",
"description": "Used to define the creative inventory/recipe book",
"required": [ "format_version", "minecraft:crafting_items_catalog" ],
"additionalProperties": false,
"properties": {
"format_version": { "$ref": "../../general/format_version.json" },
"minecraft:crafting_items_catalog": { "$ref": "./format/crafting_items_catalog.json" }
}
}
Loading

0 comments on commit 4056987

Please sign in to comment.