Updated to 1.21.50 (#330)

* - 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
This commit is contained in:
Xterionix
2024-12-05 20:54:27 +05:00
committed by GitHub
parent b4b53a8074
commit ec99529c64
36 changed files with 1131 additions and 39 deletions

View File

@@ -0,0 +1,93 @@
{
"$id": "blockception.minecraft.behavior.worldgen.jigsaw_structures.minecraft.jigsaw",
"type": "object",
"title": "Jigsaw",
"additionalProperties": false,
"required": [
"description",
"heightmap_projection",
"max_depth",
"start_height",
"start_pool",
"step"
],
"properties": {
"biome_filters": {
"title": "Biome Filters",
"description": "Specifies the biomes in which the Jigsaw Structure can generate.",
"$ref": "../../../entities/filters/filters.json"
},
"description": {
"title": "Description",
"description": "The description of this jigsaw.",
"type": "object",
"additionalProperties": false,
"required": ["identifier"],
"properties": {
"identifier": {
"title": "Identifier",
"description": "Identifier of the Jigsaw Structure. This is used with commands such as /locate, as well as within Structure Set definitions to specify which Jigsaw Structures are included in a given set.",
"type": "string"
}
}
},
"heightmap_projection": {
"title": "Heightmap Projection",
"description": "Heightmap used to calculate the relative start height. For example, a heightmap_projection of ocean_floor and a start_height of 10 means the Jigsaw Structure will begin generating 10 blocks above the ocean floor.",
"type": "string",
"enum": [
"ocean_floor",
"world_surface"
]
},
"max_depth": {
"title": "Max Depth",
"type": "integer",
"description": " The maximum recursion depth for Jigsaw Structure Generation. For example, a Jigsaw Structure that builds a road with a max_depth of 5 will only have paths that are a maximum of 5 structures templates in length in any given direction from the origin.",
"minimum": 0.0,
"maximum": 20.0
},
"start_height": {
"title": "Start Height",
"description": "World height at which the Jigsaw Structure should begin generation.",
"type": "integer",
"maximum": 320,
"minimum": -64
},
"start_pool": {
"title": "Start Pool",
"type": "string",
"description": "The first Template Pool to use when generating the Jigsaw Structure."
},
"step": {
"title": "Step",
"description": "Specifies the world generation phase in which the structure is generated. This is used as a grouping concept to keep similar world-generation features generally bundled together.",
"type": "string",
"enum": [
"fluid_springs",
"lakes",
"local_modifications",
"raw_generation",
"strongholds",
"surface_structures",
"top_layer_modification",
"underground_decoration",
"underground_ores",
"underground_structures",
"vegetal_decoration"
]
},
"terrain_adaptation": {
"title": "Terrain Adaptation",
"description": "How the terrain should adapt relative to the generated Jigsaw Structure.",
"type": "string",
"enum": [
"beard_box",
"beard_thin",
"bury",
"encapsulate",
"none"
]
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.worldgen.jigsaw_structures.jigsaw",
"type": "object",
"title": "Jigsaw",
"description": "A Jigsaw Structure is a group of Structure Templates that make up a larger structure. Jigsaw Structures are placed during world generation.",
"required": [ "format_version", "minecraft:jigsaw" ],
"additionalProperties": false,
"properties": {
"format_version": { "$ref": "../../../general/format_version.json" },
"minecraft:jigsaw": { "$ref": "./format/minecraft.jigsaw.json" }
}
}

View File

@@ -0,0 +1,34 @@
{
"$id": "blockception.minecraft.behavior.worldgen.processors.minecraft.processor_list",
"type": "object",
"title": "Processor List",
"additionalProperties": false,
"required": [
"description",
"processors"
],
"properties": {
"description": {
"title": "Description",
"description": "The description of this jigsaw.",
"type": "object",
"additionalProperties": false,
"properties": {
"identifier": {
"title": "Identifier",
"description": "Identifier of the Processor List. This is referenced by Template Pools when pairing processors with Structure Templates.",
"type": "string"
}
}
},
"processors": {
"title": "Processors",
"description": "A list of processors.",
"type": "array",
"minItems": 1,
"items": {
"$ref": "./processors.json"
}
}
}
}

View File

@@ -0,0 +1,18 @@
{
"title": "Processors",
"description": "",
"type": "object",
"properties": {
"processor_type": {
"title": "Processor Type",
"type": "string",
"enum": [ "minecraft:rule", "minecraft:capped", "minecraft:block_ignore", "minecraft:protected_blocks" ]
}
},
"allOf": [
{ "if": { "properties": { "processor_type": { "const": "minecraft:rule" } } }, "then": { "$ref": "./processors/minecraft.rule.json" } },
{ "if": { "properties": { "processor_type": { "const": "minecraft:capped" } } }, "then": { "$ref": "./processors/minecraft.capped.json" } },
{ "if": { "properties": { "processor_type": { "const": "minecraft:block_ignore" } } }, "then": { "$ref": "./processors/minecraft.block_ignore.json" } },
{ "if": { "properties": { "processor_type": { "const": "minecraft:protected_blocks" } } }, "then": { "$ref": "./processors/minecraft.protected_blocks.json" } }
]
}

View File

@@ -0,0 +1,22 @@
{
"title": "Block Ignore",
"type": "object",
"properties": {
"blocks": {
"title": "Blocks",
"type": "array",
"items": {
"type": "string"
}
},
"processor_type": {
"title": "Processor Type",
"type": "string",
"const": "minecraft:block_ignore"
}
},
"required": [
"blocks",
"processor_type"
]
}

View File

@@ -0,0 +1,83 @@
{
"title": "Capped",
"type": "object",
"properties": {
"delegate": {
"oneOf": [
{
"$ref": "./minecraft.rule.json"
},
{
"$ref": "./minecraft.block_ignore.json"
},
{
"$ref": "./minecraft.protected_blocks.json"
}
]
},
"limit": {
"oneOf": [
{
"type": "integer"
},
{
"title": "Constant Integer",
"description": "",
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"title": "Type",
"description": "",
"type": "string",
"const": "constant"
},
"value": {
"title": "Value",
"description": "",
"type": "integer"
}
},
"required": [ "type", "value" ]
},
{
"title": "Uniform Integer",
"type": "object",
"properties": {
"max_inclusive": {
"title": "Max Inclusive",
"description": "",
"type": "integer"
},
"min_inclusive": {
"title": "Min Inclusive",
"description": "",
"type": "integer"
},
"type": {
"title": "Type",
"description": "",
"type": "string",
"const": "uniform"
}
},
"required": [
"max_inclusive",
"min_inclusive",
"type"
]
}
]
},
"processor_type": {
"title": "Processor Type",
"type": "string",
"const": "minecraft:capped"
}
},
"required": [
"delegate",
"limit",
"processor_type"
]
}

View File

@@ -0,0 +1,18 @@
{
"title": "Protected Blocks",
"type": "object",
"properties": {
"processor_type": {
"title": "Processor Type",
"type": "string",
"const": "minecraft:protected_blocks"
},
"value": {
"type": "string"
}
},
"required": [
"processor_type",
"value"
]
}

View File

@@ -0,0 +1,279 @@
{
"title": "Rule",
"type": "object",
"definitions": {
"block_specifier": {
"anyOf": [
{
"$ref": "../../../../../general/block/identifier.json"
},
{
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"$ref": "../../../../../general/block/identifier.json"
},
"states": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "boolean"
},
{
"type": "integer"
},
{
"type": "string"
}
]
}
}
}
}
]
},
"rule": {
"properties": {
"block_entity_modifier": {
"oneOf": [
{
"$ref": "#/definitions/passthrough"
},
{
"$ref": "#/definitions/append_loot"
}
]
},
"input_predicate": {
"oneOf": [
{
"$ref": "#/definitions/always_true"
},
{
"$ref": "#/definitions/block_match"
},
{
"$ref": "#/definitions/random_block_match"
},
{
"$ref": "#/definitions/tag_match"
}
]
},
"location_predicate": {
"oneOf": [
{
"$ref": "#/definitions/always_true"
},
{
"$ref": "#/definitions/block_match"
},
{
"$ref": "#/definitions/random_block_match"
},
{
"$ref": "#/definitions/tag_match"
}
]
},
"output_state": {
"$ref": "#/definitions/block_specifier"
},
"position_predicate": {
"oneOf": [
{
"$ref": "#/definitions/always_true"
},
{
"$ref": "#/definitions/axis_aligned_linear_pos"
}
]
}
},
"required": [
"output_state"
]
},
"append_loot": {
"title": "Append Loot",
"description": "",
"type": "object",
"additionalProperties": false,
"required": [ "type", "loot_table" ],
"properties": {
"loot_table": {
"title": "Loot Table",
"description": "",
"type": "string"
},
"type": {
"title": "Type",
"description": "",
"type": "string",
"const": "minecraft:append_loot"
}
}
},
"passthrough": {
"title": "Passthrough",
"description": "",
"type": "object",
"additionalProperties": false,
"required": [ "type" ],
"properties": {
"type": {
"title": "Type",
"description": "",
"type": "string",
"const": "minecraft:passthrough"
}
}
},
"always_true": {
"title": "Always True",
"description": "",
"type": "object",
"additionalProperties": false,
"required": [ "predicate_type" ],
"properties": {
"predicate_type": {
"title": "Predicate Type",
"type": "string",
"const": "minecraft:always_true"
}
}
},
"block_match": {
"title": "Block Match",
"type": "object",
"properties": {
"block": {
"type": "string"
},
"predicate_type": {
"title": "Predicate Type",
"type": "string",
"const": "minecraft:block_match"
}
},
"required": [
"block",
"predicate_type"
]
},
"random_block_match": {
"title": "Random Block Match",
"type": "object",
"properties": {
"block": {
"type": "string"
},
"predicate_type": {
"title": "Predicate Type",
"type": "string",
"const": "minecraft:random_block_match"
},
"probability": {
"type": "number",
"minimum": 0.0,
"exclusiveMaximum": 1.0
}
},
"required": [
"block",
"predicate_type",
"probability"
]
},
"tag_match": {
"title": "Tag Match",
"type": "object",
"properties": {
"predicate_type": {
"title": "Predicate Type",
"type": "string",
"const": "minecraft:tag_match"
},
"tag": {
"type": "string"
}
},
"required": [
"predicate_type",
"tag"
]
},
"axis_aligned_linear_pos": {
"title": "Axis Aligned Linear",
"type": "object",
"properties": {
"axis": {
"title": "Axis",
"description": "",
"type": "string",
"enum": [
"x",
"y",
"z"
]
},
"max_chance": {
"title": "Max Chance",
"description": "",
"type": "number",
"minimum": 0.0,
"exclusiveMaximum": 1.0
},
"max_dist": {
"title": "Max Dist",
"description": "",
"type": "integer",
"minimum": 0.0
},
"min_chance": {
"title": "Min Chance",
"description": "",
"type": "number",
"minimum": 0.0,
"exclusiveMaximum": 1.0
},
"min_dist": {
"title": "Min Dist",
"description": "",
"type": "integer",
"minimum": 0.0
},
"predicate_type": {
"title": "Predicate Type",
"description": "",
"type": "string",
"const": "minecraft:axis_aligned_linear_pos"
}
},
"required": [
"predicate_type"
]
}
},
"additionalProperties": false,
"properties": {
"processor_type": {
"title": "Processor Type",
"type": "string",
"const": "minecraft:rule"
},
"rules": {
"title": "Rules",
"type": "array",
"items": {
"$ref": "#/definitions/rule"
}
}
},
"required": [
"processor_type",
"rules"
]
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.worldgen.processors.processor_list",
"type": "object",
"title": "Processor List",
"description": "Rules used by Jigsaw Structures to determine which blocks to modify or replace when placing a Structure Template in the world.",
"required": [ "format_version", "minecraft:processor_list" ],
"additionalProperties": false,
"properties": {
"format_version": { "$ref": "../../../general/format_version.json" },
"minecraft:processor_list": { "$ref": "./format/minecraft.processor_list.json" }
}
}

View File

@@ -0,0 +1,106 @@
{
"$id": "blockception.minecraft.behavior.worldgen.structure_sets.minecraft.structure_set",
"type": "object",
"title": "Structure Set",
"additionalProperties": false,
"properties": {
"description": {
"title": "Description",
"description": "The description of this structure set.",
"type": "object",
"additionalProperties": false,
"required": ["identifier"],
"properties": {
"identifier": {
"title": "Identifier",
"description": "The name of this structure set.",
"type": "string"
}
}
},
"placement": {
"title": "Placement",
"description": "Describes where structures in the set spawn relative to one another. Currently, the only placement type supported is random_spread, which scatters structures randomly with a given separation and spacing.",
"type": "object",
"additionalProperties": false,
"properties": {
"salt": {
"title": "Salt",
"description": "Seed used for the random generator to provide a unique scatter pattern. This is used to prevent overlap in the case where multiple structure sets use the same placement values.",
"type": "integer"
},
"separation": {
"title": "Separation",
"description": "Padding (in chunks) within each grid cell. Structures will not generate within the padded area.",
"type": "integer",
"minimum": 0.0
},
"spacing": {
"title": "Spacing",
"description": "Grid cell size (in chunks) to use when generating the structure. Structures will attempt to generate at a random position within each cell.",
"type": "integer",
"minimum": 1.0
},
"spread_type": {
"title": "Spread Type",
"description": "Randomness algorithm used when placing structures.",
"type": "string",
"anyOf": [
{
"const": "linear",
"description": "Basic randomness e.g. rand(x)"
},
{
"const": "triangular",
"description": "Average of 2 randoms e.g. (rand(x) + rand(x)) / 2"
}
]
},
"type": {
"title": "Type",
"description": "",
"type": "string",
"const":"minecraft:random_spread"
}
},
"required": [
"salt",
"separation",
"spacing",
"type"
]
},
"structures": {
"title": "Structures",
"description": "A weighted list of Jigsaw Structure identifiers. Structures will be randomly chosen from this set during world generation.",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"properties": {
"structure": {
"title": "Structure",
"description": "Identifier of the Jigsaw Structure.",
"type": "string"
},
"weight": {
"title": "Weight",
"description": "Weight of the Jigsaw Structure in the set. Higher weights are more likely to be selected.",
"type": "integer",
"minimum": 1.0,
"maximum": 200.0
}
},
"required": [
"structure",
"weight"
]
}
}
},
"required": [
"description",
"placement",
"structures"
]
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.worldgen.structure_sets.structure_set",
"type": "object",
"title": "Structure Set",
"description": "A Jigsaw Structure Set is a collection of Jigsaw Structures that are placed according to a set of rules.",
"required": [ "format_version", "minecraft:structure_set" ],
"additionalProperties": false,
"properties": {
"format_version": { "$ref": "../../../general/format_version.json" },
"minecraft:structure_set": { "$ref": "./format/minecraft.structure_set.json" }
}
}

View File

@@ -0,0 +1,99 @@
{
"$id": "blockception.minecraft.behavior.worldgen.template_pools.minecraft.template_pool",
"type": "object",
"title": "Template Pool",
"additionalProperties": false,
"definitions": {
"template_pool_element": {
"title": "Template Pool Element",
"description": "A template pool item used to define the element and its weight.",
"type": "object",
"additionalProperties": false,
"required": [ "element" ],
"properties": {
"element": {
"title": "Element",
"description": "A grouping of a Structure Template, the Processor List to use when placing the structure, and its weight that determines the likelihood of the element being chosen.",
"type": "object",
"properties": {
"element_type": {
"title": "Element Type",
"description": " The type of element.",
"type": "string",
"const": "minecraft:single_pool_element"
},
"location": {
"title": "Location",
"description": "The path of the structure file. This path is relative to the behavior pack's \"structures\" folder.",
"type": "string"
},
"processors": {
"title": "Processors",
"description": "The identifier of the processor list to use when placing the structure.",
"type": "string"
}
},
"required": [
"element_type",
"location",
"processors"
]
},
"projection": {
"title": "Projection",
"description": "Specifies how structures should be placed relative to the terrain.",
"type": "string",
"default": "rigid",
"anyOf": [
{
"const": "rigid",
"description": "Structures are placed without any height adjustment."
},
{
"const": "terrain_matching",
"description": "Structures are placed relative to the terrain height. Structure blocks will adjust along the Y axis to match the ground."
}
]
},
"weight": {
"title": "Weight",
"description": "The weighted probability of choosing the element from the pool. For example, a template pool containing 2 structures with weights of 1 and 3 will have a 25% and 75% chance of being chosen respectively.",
"type": "integer",
"minimum": 1.0,
"maximum": 200.0
}
}
}
},
"required": [ "description", "elements" ],
"properties": {
"description": {
"title": "Description",
"description": "The description of this template pool.",
"type": "object",
"additionalProperties": false,
"required": [ "identifier" ],
"properties": {
"identifier": {
"title": "Identifier",
"description": "Identifier of the template pool. This is used by both the start_pool property of the Jigsaw Structure JSON and the Jigsaw Block's Target Pool field.",
"type": "string"
}
}
},
"elements": {
"title": "Elements",
"description": "An array of pool elements.",
"type": "array",
"minItems": 1,
"items": {
}
},
"fallback": {
"title": "Fallback",
"description": "Fallback template pool to use if no element in the pool can be placed successfully.",
"type": "string"
}
}
}

View File

@@ -0,0 +1,13 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "blockception.minecraft.behavior.worldgen.template_pools.template_pool",
"type": "object",
"title": "Template Pool",
"description": "Used to pair block rules with Structure Templates and to randomly place Structure Templates using a weighted list.",
"required": [ "format_version", "minecraft:template_pool" ],
"additionalProperties": false,
"properties": {
"format_version": { "$ref": "../../../general/format_version.json" },
"minecraft:template_pool": { "$ref": "./format/minecraft.template_pool.json" }
}
}