diff --git a/README.md b/README.md index a96a7f98..ed2a54fa 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/behavior/volumes/volumes.json b/behavior/volumes/volumes.json deleted file mode 100644 index 65219973..00000000 --- a/behavior/volumes/volumes.json +++ /dev/null @@ -1 +0,0 @@ -{"$schema":"http://json-schema.org/draft-07/schema","$id":"blockception.minecraft.behavior.volumes","examples":[{"format_version":"1.20.80","minecraft:volume":{"description":{"identifier":"example:foo"},"components":{}}}],"allOf":[{"if":{"properties":{"format_version":{"type":"string","const":"1.17.0"}}},"then":{"$ref":"#/definitions/A"}},{"properties":{"format_version":{"$ref":"#/definitions/D"}}}],"definitions":{"B":{"description":"A minecraft entity volume.","examples":["namespace:volume_name"],"pattern":"^[0-9a-zA-Z:_\\.\\-]+$","title":"Volume Identifier","type":"string","defaultSnippets":[{"label":"New Identifier","body":"$1:$2"}]},"C":{"type":"string","title":"Molang","description":"Molang definition.","format":"molang","examples":["query.variant","(1.0)","query.","variable.=;"],"defaultSnippets":[{"label":"New Molang","body":"$1"}]},"A":{"type":"object","title":"Spawn Rules 1.17.0","description":"UNDOCUMENTED.","$comment":"UNDOCUMENTED","additionalProperties":false,"required":["format_version","minecraft:volume"],"properties":{"format_version":{"const":"1.17.0","description":"Specifies the version of the game this entity was made in. Minimum supported version is 1.17.0. Current supported version is 1.17.0.","title":"Format Version"},"minecraft:volume":{"type":"object","title":"Spawn Rules","description":"UNDOCUMENTED.","$comment":"UNDOCUMENTED","additionalProperties":false,"properties":{"description":{"type":"object","title":"Description","description":"The description contains a single `identifier` string.","additionalProperties":false,"properties":{"identifier":{"title":"Identifier","description":"The unique identifier for this volume. It must be of the form `namespace:name', where namespace cannot be `minecraft`.","$ref":"#/definitions/B"}}},"components":{"type":"object","title":"Components","description":"UNDOCUMENTED.","$comment":"UNDOCUMENTED","additionalProperties":false,"properties":{"minecraft:bounds":{"title":"Bounds","description":"Component that defines a minimum and maximum block position for a bounding box and which world dimension the bounding box is in. Every volume must have a bounds component.","type":"object","additionalProperties":false,"properties":{"dimension":{"type":"string","description":"The name of the dimension the bounding box will exist in: one of `overworld', `nether` or `the end`.","title":"Dimension","enum":["overworld","nether","the end"]},"max":{"type":"array","description":"The maximum block position of the bounding box.","title":"Maximum","items":[{"title":"X","type":"number"},{"title":"Y","type":"number"},{"title":"Z","type":"number"}]},"min":{"type":"array","description":"The minimum block position of the bounding box.","title":"Minimum","items":[{"title":"X","type":"number"},{"title":"Y","type":"number"},{"title":"Z","type":"number"}]}}},"minecraft:fog":{"title":"Fog","description":"Displays the given fog whenever a player enters the volume. Each volume can only have one fog attached.","type":"object","additionalProperties":false,"properties":{"fog_identifier":{"type":"string","default":"","description":"The identifier of a fog definition. Note that you will not receive any feedback if the definition does not exist.","title":"Fog Identifier"},"priority":{"type":"integer","default":2147483647,"description":"The priority for this fog definition setting. Smaller numbers have higher priority. Fogs with equal priority will be combined together.","title":"Priority"}}},"minecraft:on_actor_enter":{"title":"On Actor Enter","description":"Component that defines what happens when an actor enters the volume. Can contain multiple json objects.","type":"object","additionalProperties":false,"required":["on_enter"],"properties":{"on_enter":{"title":"On Enter","description":"Required array that contains all the triggers.","type":"array","items":{"title":"On Enter Trigger","description":"Trigger.","type":"object","additionalProperties":false,"properties":{"condition":{"title":"Condition","description":"Molang expression to test against the actor. The given event will be triggered if the expression evaluates to true.","type":"string","$ref":"#/definitions/C"},"event":{"title":"Event","description":"Name of the event to run.","type":"string"},"target":{"title":"Target","description":"One of `self` or `other`. Self means the event is attached to the volume. Other means the event is attached to the actor.","type":"string","enum":["self","other"]}}}}}},"minecraft:on_actor_leave":{"title":"On Actor Leave","description":"Component that defines what happens when an actor leaves the volume.","type":"object","additionalProperties":false,"required":["on_enter"],"properties":{"on_enter":{"title":"On Enter","description":"Required array that contains all the triggers.","type":"array","items":{"title":"On Enter Trigger","description":"Trigger.","type":"object","additionalProperties":false,"properties":{"condition":{"title":"Condition","description":"Molang expression to test against the actor. The given event will be triggered if the expression evaluates to true.","type":"string","$ref":"#/definitions/C"},"event":{"title":"Event","description":"Name of the event to run.","type":"string"},"target":{"title":"Target","description":"One of `self` or `other`. Self means the event is attached to the volume. Other means the event is attached to the actor.","type":"string","enum":["self","other"]}}}}}}}}}}}},"D":{"title":"Format Version","description":"A version that tells minecraft what type of data format can be expected when reading this file.","pattern":"^([1-9]+)\\.([0-9]+)\\.([0-9]+)$","type":"string","default":"1.20.81","examples":["1.20.81","1.20.40","1.19.0","1.12.0","1.10.0","1.8.0"],"defaultSnippets":[{"label":"New Format version","body":"1.${1|8,10,12,17,18,19,20|}.${3|2|0|}"}]}}} \ No newline at end of file diff --git a/source/behavior/blocks/format/components/item_visual.json b/source/behavior/blocks/format/components/item_visual.json new file mode 100644 index 00000000..33ac4567 --- /dev/null +++ b/source/behavior/blocks/format/components/item_visual.json @@ -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" + } + } +} \ No newline at end of file diff --git a/source/behavior/blocks/format/components/liquid_detection.json b/source/behavior/blocks/format/components/liquid_detection.json new file mode 100644 index 00000000..e9fbb88f --- /dev/null +++ b/source/behavior/blocks/format/components/liquid_detection.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/source/behavior/blocks/format/components/material_instances.json b/source/behavior/blocks/format/components/material_instances.json index 7033e87e..8f85d332 100644 --- a/source/behavior/blocks/format/components/material_instances.json +++ b/source/behavior/blocks/format/components/material_instances.json @@ -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" } @@ -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", @@ -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", diff --git a/source/behavior/blocks/format/minecraft.block.json b/source/behavior/blocks/format/minecraft.block.json index c1ae2d55..2721cd02 100644 --- a/source/behavior/blocks/format/minecraft.block.json +++ b/source/behavior/blocks/format/minecraft.block.json @@ -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" }, @@ -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:.+": { diff --git a/source/behavior/entities/format/behaviors/summon_entity.json b/source/behavior/entities/format/behaviors/summon_entity.json index b6017a98..d78db3d1 100644 --- a/source/behavior/entities/format/behaviors/summon_entity.json +++ b/source/behavior/entities/format/behaviors/summon_entity.json @@ -4,7 +4,7 @@ "title": "Summon Entity", "type": "object", "additionalProperties": false, - "required": [], + "required": [ ], "properties": { "priority": { "$ref": "./types/priority.json" @@ -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": { @@ -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", @@ -163,7 +168,7 @@ }, "examples": [ { - "summon_choices": [] + "summon_choices": [ ] } ] } diff --git a/source/behavior/entities/format/components.json b/source/behavior/entities/format/components.json index 10d1d71d..0c6f1fd9 100644 --- a/source/behavior/entities/format/components.json +++ b/source/behavior/entities/format/components.json @@ -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" }, @@ -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" }, diff --git a/source/behavior/entities/format/components/angry.json b/source/behavior/entities/format/components/angry.json index 0557b700..a6ae9010 100644 --- a/source/behavior/entities/format/components/angry.json +++ b/source/behavior/entities/format/components/angry.json @@ -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", diff --git a/source/behavior/entities/format/components/cannot_be_attacked.json b/source/behavior/entities/format/components/cannot_be_attacked.json new file mode 100644 index 00000000..6af5877a --- /dev/null +++ b/source/behavior/entities/format/components/cannot_be_attacked.json @@ -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": { } +} diff --git a/source/behavior/entities/format/components/damage_sensor.json b/source/behavior/entities/format/components/damage_sensor.json index 623b4ee0..6df5158c 100644 --- a/source/behavior/entities/format/components/damage_sensor.json +++ b/source/behavior/entities/format/components/damage_sensor.json @@ -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", diff --git a/source/behavior/entities/format/components/home.json b/source/behavior/entities/format/components/home.json index 63689c25..fb878e6f 100644 --- a/source/behavior/entities/format/components/home.json +++ b/source/behavior/entities/format/components/home.json @@ -24,7 +24,7 @@ }, "restriction_type": { "title": "Restriction Type", - "description": "Defines how the the entity will be restricted to its home position. The possible values are:\n- 'none', which poses no restriction.\n- 'random_movement', which restricts randomized movement to be around the home position.\n- [Beta] 'all_movement', which restricts any kind of movement to be around the home position. However, entities that somehow got too far away from their home will always be able to move closer to it, if prompted to do so.", + "description": "Defines how the the entity will be restricted to its home position. The possible values are:\n- 'none', which poses no restriction.\n- 'random_movement', which restricts randomized movement to be around the home position.\n- 'all_movement', which restricts any kind of movement to be around the home position. However, entities that somehow got too far away from their home will always be able to move closer to it, if prompted to do so.", "enum": [ "none", "random_movement", "all_movement" ], "default": "none" } diff --git a/source/behavior/entities/format/components/ignore_cannot_be_attacked.json b/source/behavior/entities/format/components/ignore_cannot_be_attacked.json new file mode 100644 index 00000000..f19073af --- /dev/null +++ b/source/behavior/entities/format/components/ignore_cannot_be_attacked.json @@ -0,0 +1,15 @@ +{ + "$id": "blockception.minecraft.behavior.entities.minecraft.ignore_cannot_be_attacked", + "type": "object", + "title": "Ignore Cannot Be Attacked", + "additionalProperties": false, + "description": "When set, allows the entity to attack entities that have the \"minecraft:cannot_be_attacked\" component.", + "required": [ ], + "properties": { + "filters": { + "title": "Filters", + "$ref": "../../filters/filters.json", + "description": "Defines which entities are exceptions and are allowed to be attacked by the owner entity, potentially attacked entity is subject \"other\". If this is not specified then all attacks by the owner are allowed." + } + } +} diff --git a/source/behavior/entities/format/components/interact.json b/source/behavior/entities/format/components/interact.json index 1d52461c..562c84b8 100644 --- a/source/behavior/entities/format/components/interact.json +++ b/source/behavior/entities/format/components/interact.json @@ -138,7 +138,9 @@ "vibration": { "title": "Vibration", "type": "string", - "description": "Vibration to emit when the interaction occurs. Admitted values are entity_interact (used by default), shear, and none (no vibration emitted)." + "default": "entity_interact", + "description": "Vibration to emit when the interaction occurs. Admitted values are none (no vibration emitted), shear, entity_die, entity_act, entity_interact.", + "enum": ["none", "shear", "entity_die", "entity_act", "entity_interact"] }, "give_item": { "title": "Give Item", diff --git a/source/behavior/entities/format/components/looked_at.json b/source/behavior/entities/format/components/looked_at.json index 13f9b165..6da95d66 100644 --- a/source/behavior/entities/format/components/looked_at.json +++ b/source/behavior/entities/format/components/looked_at.json @@ -8,7 +8,7 @@ "field_of_view": { "type": "number", "default": 26, - "description": "[Beta] Defines, in degrees, the width of the field of view for entities looking at the owner entity. If 'scale_fov_by_distance' is set to true, this value corresponds to the field of view at a distance of one block between the entities.", + "description": "Defines, in degrees, the width of the field of view for entities looking at the owner entity. If 'scale_fov_by_distance' is set to true, this value corresponds to the field of view at a distance of one block between the entities.", "title": "Field Of View" }, "filters": { @@ -18,25 +18,40 @@ }, "find_players_only": { "title": "Find Players Only", - "description": "[Beta] Limits the search to only the nearest Player that meets the specified \"filters\" rather than all nearby entities.", + "description": "Limits the search to only the nearest Player that meets the specified \"filters\" rather than all nearby entities.", "type": "boolean", "default": false }, "line_of_sight_obstruction_type": { "title": "Line Of Sight Obstruction Type", - "description": "[Beta] Defines the type of block shape used to check for line of sight obstructions.", + "description": "Defines the type of block shape used to check for line of sight obstructions.", "type": "string", "enum": [ "outline", "collision", "collision_for_camera" ], "default": "collision" }, "look_at_locations": { "title": "Look At Locations", - "description": "[Beta] A list of locations on the owner entity towards which line of sight checks are performed. At least one location must be unobstructed for the entity to be considered as looked at.", + "description": "A list of locations on the owner entity towards which line of sight checks are performed. At least one location must be unobstructed for the entity to be considered as looked at.", "type": "array", "minItems": 1, - "uniqueItems": true, "items": { - "enum": [ "head", "body", "feet" ] + "title": "", + "description": "", + "type": "object", + "additionalProperties": false, + "properties": { + "location": { + "title": "Location", + "type": "string", + "description": "Location to be looked at", + "enum": [ "head", "body", "feet" ] + }, + "vertical_offset": { + "title": "Vertical Offset", + "description": "Vertical offset from the set location", + "type": "number" + } + } } }, "looked_at_cooldown": { @@ -51,13 +66,13 @@ "$ref": "../types/event_object.json" }, "not_looked_at_event": { - "description": "[Beta] Defines the event to trigger when no entity is found looking at the owner entity.", + "description": "Defines the event to trigger when no entity is found looking at the owner entity.", "title": "Not Looked At Event", "$ref": "../types/event_object.json" }, "scale_fov_by_distance": { "title": "Scale Fov By Distance", - "description": "[Beta] When true, the field of view narrows as the distance between the owner entity and the entity looking at it increases. This ensures that the width of the view cone remains somewhat constant towards the owner entity position, regardless of distance.", + "description": "When true, the field of view narrows as the distance between the owner entity and the entity looking at it increases. This ensures that the width of the view cone remains somewhat constant towards the owner entity position, regardless of distance.", "type": "boolean", "default": false }, @@ -69,7 +84,7 @@ }, "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- [Beta] \"once_and_keep_scanning\", the first detected looking entity is set as target. Scanning and event emission continues.", + "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.", "type": "string", "default": "once_and_stop_scanning", "enum": [ "never", "once_and_stop_scanning", "once_and_keep_scanning" ] diff --git a/source/behavior/entities/format/events.json b/source/behavior/entities/format/events.json index 52fafca3..3971c2a4 100644 --- a/source/behavior/entities/format/events.json +++ b/source/behavior/entities/format/events.json @@ -164,6 +164,32 @@ ] } } + }, + "play_sound": { + "title": "Play Sound", + "description": "Allows the owner entity to emit sounds", + "type": "object", + "additionalProperties": false, + "properties": { + "sound": { + "title": "Sound", + "description": "Specifies the sound event to play", + "type": "string" + } + } + }, + "emit_particle": { + "title": "Emit Particle", + "description": "Allowing particles to be emitted at the center of the entity's bounding box", + "type": "object", + "additionalProperties": false, + "properties": { + "particle": { + "title": "Particle", + "description": "Specifies the type of particle to emit", + "type": "string" + } + } } } }, diff --git a/source/behavior/items/format/components/compostable.json b/source/behavior/items/format/components/compostable.json new file mode 100644 index 00000000..fe52ff98 --- /dev/null +++ b/source/behavior/items/format/components/compostable.json @@ -0,0 +1,18 @@ +{ + "$id": "blockception.minecraft.behavior.items.minecraft:compostable", + "title": "Compostable", + "description": "Allows items to be compostable in the composter block.", + "type": "object", + "additionalProperties": false, + "required": [ ], + "properties": { + "composting_chance": { + "description": "The chance of this item generating a compost layer when supplied to the composter block.", + "title": "Composting Chance", + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 100 + } + } +} diff --git a/source/behavior/items/format/minecraft.item.json b/source/behavior/items/format/minecraft.item.json index 171045d6..e422ae48 100644 --- a/source/behavior/items/format/minecraft.item.json +++ b/source/behavior/items/format/minecraft.item.json @@ -56,6 +56,7 @@ "minecraft:block_placer": { "$ref": "./components/block_placer.json" }, "minecraft:bundle_interaction": { "$ref": "./components/bundle_interaction.json" }, "minecraft:can_destroy_in_creative": { "$ref": "./components/can_destroy_in_creative.json" }, + "minecraft:compostable": { "$ref": "./components/compostable.json" }, "minecraft:cooldown": { "$ref": "./components/cooldown.json" }, "minecraft:custom_components": { "$ref": "./components/custom_components.json" }, "minecraft:damage": { "$ref": "./components/damage.json" }, diff --git a/source/behavior/worldgen/jigsaw_structures/format/minecraft.jigsaw.json b/source/behavior/worldgen/jigsaw_structures/format/minecraft.jigsaw.json new file mode 100644 index 00000000..5861633f --- /dev/null +++ b/source/behavior/worldgen/jigsaw_structures/format/minecraft.jigsaw.json @@ -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" + ] + } + } +} \ No newline at end of file diff --git a/source/behavior/worldgen/jigsaw_structures/jigsaw.json b/source/behavior/worldgen/jigsaw_structures/jigsaw.json new file mode 100644 index 00000000..af496bc0 --- /dev/null +++ b/source/behavior/worldgen/jigsaw_structures/jigsaw.json @@ -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" } + } +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/format/minecraft.processor_list.json b/source/behavior/worldgen/processors/format/minecraft.processor_list.json new file mode 100644 index 00000000..ea023d0b --- /dev/null +++ b/source/behavior/worldgen/processors/format/minecraft.processor_list.json @@ -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" + } + } + } +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/format/processors.json b/source/behavior/worldgen/processors/format/processors.json new file mode 100644 index 00000000..f94ad9e1 --- /dev/null +++ b/source/behavior/worldgen/processors/format/processors.json @@ -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" } } + ] +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/format/processors/minecraft.block_ignore.json b/source/behavior/worldgen/processors/format/processors/minecraft.block_ignore.json new file mode 100644 index 00000000..703a9e72 --- /dev/null +++ b/source/behavior/worldgen/processors/format/processors/minecraft.block_ignore.json @@ -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" + ] +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/format/processors/minecraft.capped.json b/source/behavior/worldgen/processors/format/processors/minecraft.capped.json new file mode 100644 index 00000000..7a6a15cc --- /dev/null +++ b/source/behavior/worldgen/processors/format/processors/minecraft.capped.json @@ -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" + ] +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/format/processors/minecraft.protected_blocks.json b/source/behavior/worldgen/processors/format/processors/minecraft.protected_blocks.json new file mode 100644 index 00000000..b0df7562 --- /dev/null +++ b/source/behavior/worldgen/processors/format/processors/minecraft.protected_blocks.json @@ -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" + ] +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/format/processors/minecraft.rule.json b/source/behavior/worldgen/processors/format/processors/minecraft.rule.json new file mode 100644 index 00000000..742cdbcc --- /dev/null +++ b/source/behavior/worldgen/processors/format/processors/minecraft.rule.json @@ -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" + ] +} \ No newline at end of file diff --git a/source/behavior/worldgen/processors/processor_list.json b/source/behavior/worldgen/processors/processor_list.json new file mode 100644 index 00000000..d381018b --- /dev/null +++ b/source/behavior/worldgen/processors/processor_list.json @@ -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" } + } +} \ No newline at end of file diff --git a/source/behavior/worldgen/structure_sets/format/minecraft.structure_set.json b/source/behavior/worldgen/structure_sets/format/minecraft.structure_set.json new file mode 100644 index 00000000..b7554881 --- /dev/null +++ b/source/behavior/worldgen/structure_sets/format/minecraft.structure_set.json @@ -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" + ] +} \ No newline at end of file diff --git a/source/behavior/worldgen/structure_sets/structure_set.json b/source/behavior/worldgen/structure_sets/structure_set.json new file mode 100644 index 00000000..a1d09ad6 --- /dev/null +++ b/source/behavior/worldgen/structure_sets/structure_set.json @@ -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" } + } +} \ No newline at end of file diff --git a/source/behavior/worldgen/template_pools/format/minecraft.template_pool.json b/source/behavior/worldgen/template_pools/format/minecraft.template_pool.json new file mode 100644 index 00000000..1a67c411 --- /dev/null +++ b/source/behavior/worldgen/template_pools/format/minecraft.template_pool.json @@ -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" + } + } +} \ No newline at end of file diff --git a/source/behavior/worldgen/template_pools/template_pool.json b/source/behavior/worldgen/template_pools/template_pool.json new file mode 100644 index 00000000..0787a401 --- /dev/null +++ b/source/behavior/worldgen/template_pools/template_pool.json @@ -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" } + } +} \ No newline at end of file diff --git a/source/compress_specification.json b/source/compress_specification.json index 9c4e3c4c..d2b922ca 100644 --- a/source/compress_specification.json +++ b/source/compress_specification.json @@ -18,6 +18,10 @@ { "Source": "./behavior/recipes/recipes.json", "Destination": "../behavior/recipes/recipes.json" }, { "Source": "./behavior/spawn_rules/spawn_rules.json", "Destination": "../behavior/spawn_rules/spawn_rules.json" }, { "Source": "./behavior/trading/trading.json", "Destination": "../behavior/trading/trading.json" }, + { "Source": "./behavior/worldgen/jigsaw_structures/jigsaw.json", "Destination": "../worldgen/jigsaw_structures/jigsaw.json" }, + { "Source": "./behavior/worldgen/processors/processor_list.json", "Destination": "../worldgen/processors/processor_list.json" }, + { "Source": "./behavior/worldgen/structure_sets/structure_set.json", "Destination": "../worldgen/structure_sets/structure_set.json" }, + { "Source": "./behavior/worldgen/template_pools/template_pool.json", "Destination": "../worldgen/template_pools/template_pool.json" }, { "Source": "./general/manifest.json", "Destination": "../general/manifest.json" }, { "Source": "./general/world_x_packs.json", "Destination": "../general/world_x_packs.json" }, diff --git a/source/resource/biomes/format/components/ambient_sounds.json b/source/resource/biomes/format/components/ambient_sounds.json new file mode 100644 index 00000000..045b2593 --- /dev/null +++ b/source/resource/biomes/format/components/ambient_sounds.json @@ -0,0 +1,25 @@ +{ + "$id": "blockception.minecraft.resource.biomes.minecraft.ambient_sounds", + "title": "Ambient Sounds", + "description": "Sets the ambient sounds for the biome. These sounds must be in the 'individual_named_sounds' in a 'sounds.json' file.", + "type": "object", + "additionalProperties": false, + "properties": { + "addition": { + "title": "Addition", + "description": "Named sound that occasionally plays at the listener position.", + "type": "string" + }, + "loop": { + "title": "Loop", + "description": "Named sound that loops while the listener position is inside the biome.", + "type": "string" + }, + "mood": { + "title": "Mood", + "description": "Named sound that rarely plays at a nearby air block position when the light level is low.", + "type": "string", + "default": "ambient.cave" + } + } +} diff --git a/source/resource/biomes/format/components/biome_music.json b/source/resource/biomes/format/components/biome_music.json new file mode 100644 index 00000000..e6afe989 --- /dev/null +++ b/source/resource/biomes/format/components/biome_music.json @@ -0,0 +1,16 @@ +{ + "$id": "blockception.minecraft.resource.biomes.minecraft.biome_music", + "title": "Biome Music", + "description": "Affects how music plays within the biome.", + "type": "object", + "additionalProperties": false, + "properties": { + "volume_multiplier": { + "title": "Volume Multiplier", + "description": "Multiplier temporarily and gradually applied to music volume when within this biome.", + "type": "number", + "minimum": 0, + "maximum": 1 + } + } +} diff --git a/source/resource/biomes/format/minecraft.client_biome.json b/source/resource/biomes/format/minecraft.client_biome.json index 49efd610..e1ed37e4 100644 --- a/source/resource/biomes/format/minecraft.client_biome.json +++ b/source/resource/biomes/format/minecraft.client_biome.json @@ -13,6 +13,8 @@ "additionalProperties": false, "properties": { // Components + "minecraft:ambient_sounds": {"$ref": "./components/ambient_sounds.json"}, + "minecraft:biome_music": {"$ref": "./components/biome_music.json"}, "minecraft:fog_appearance": { "$ref": "./components/fog_appearance.json" }, "minecraft:sky_color": { "$ref": "./components/sky_color.json" }, "minecraft:water_appearance": { "$ref": "./components/water_appearance.json" } diff --git a/vscode-settings.json b/vscode-settings.json index 97c6609b..a9f6a46b 100644 --- a/vscode-settings.json +++ b/vscode-settings.json @@ -385,19 +385,63 @@ }, { "fileMatch": [ - "behavior_packs/*/volumes/*.{json,jsonc,json5}", - "*behavior*pack*/volumes/*.{json,jsonc,json5}", - "*Behavior*Pack*/volumes/*.{json,jsonc,json5}", - "*BP*/volumes/*.{json,jsonc,json5}", - "*bp*/volumes/*.{json,jsonc,json5}", - "behavior_packs/*/volumes/**/*.{json,jsonc,json5}", - "*behavior*pack*/volumes/**/*.{json,jsonc,json5}", - "*Behavior*Pack*/volumes/**/*.{json,jsonc,json5}", - "*BP*/volumes/**/*.{json,jsonc,json5}", - "*bp*/volumes/**/*.{json,jsonc,json5}", - "*.volume.{json,jsonc,json5}" + "behavior_packs/*/worldgen/jigsaw_structures/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/jigsaw_structures/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/jigsaw_structures/*.{json,jsonc,json5}", + "*BP*/worldgen/jigsaw_structures/*.{json,jsonc,json5}", + "*bp*/worldgen/jigsaw_structures/*.{json,jsonc,json5}", + "behavior_packs/*/worldgen/jigsaw_structures/**/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/jigsaw_structures/**/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/jigsaw_structures/**/*.{json,jsonc,json5}", + "*BP*/worldgen/jigsaw_structures/**/*.{json,jsonc,json5}", + "*bp*/worldgen/jigsaw_structures/**/*.{json,jsonc,json5}" ], - "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/volumes/volumes.json" + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/worldgen/jigsaw_structures/jigsaw.json" + }, + { + "fileMatch": [ + "behavior_packs/*/worldgen/processors/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/processors/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/processors/*.{json,jsonc,json5}", + "*BP*/worldgen/processors/*.{json,jsonc,json5}", + "*bp*/worldgen/processors/*.{json,jsonc,json5}", + "behavior_packs/*/worldgen/processors/**/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/processors/**/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/processors/**/*.{json,jsonc,json5}", + "*BP*/worldgen/processors/**/*.{json,jsonc,json5}", + "*bp*/worldgen/processors/**/*.{json,jsonc,json5}" + ], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/worldgen/processors/processor_list.json" + }, + { + "fileMatch": [ + "behavior_packs/*/worldgen/structure_sets/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/structure_sets/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/structure_sets/*.{json,jsonc,json5}", + "*BP*/worldgen/structure_sets/*.{json,jsonc,json5}", + "*bp*/worldgen/structure_sets/*.{json,jsonc,json5}", + "behavior_packs/*/worldgen/structure_sets/**/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/structure_sets/**/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/structure_sets/**/*.{json,jsonc,json5}", + "*BP*/worldgen/structure_sets/**/*.{json,jsonc,json5}", + "*bp*/worldgen/structure_sets/**/*.{json,jsonc,json5}" + ], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/worldgen/structure_sets/structure_set.json" + }, + { + "fileMatch": [ + "behavior_packs/*/worldgen/template_pools/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/template_pools/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/template_pools/*.{json,jsonc,json5}", + "*BP*/worldgen/template_pools/*.{json,jsonc,json5}", + "*bp*/worldgen/template_pools/*.{json,jsonc,json5}", + "behavior_packs/*/worldgen/template_pools/**/*.{json,jsonc,json5}", + "*behavior*pack*/worldgen/template_pools/**/*.{json,jsonc,json5}", + "*Behavior*Pack*/worldgen/template_pools/**/*.{json,jsonc,json5}", + "*BP*/worldgen/template_pools/**/*.{json,jsonc,json5}", + "*bp*/worldgen/template_pools/**/*.{json,jsonc,json5}" + ], + "url": "https://raw.githubusercontent.com/Blockception/Minecraft-bedrock-json-schemas/main/behavior/worldgen/template_pools/template_pool.json" }, { "fileMatch": [