From 84940f949e70d49e78224c9dae3858b1f7440e0e Mon Sep 17 00:00:00 2001 From: DaanV2 Date: Wed, 25 Nov 2020 10:32:34 +0100 Subject: [PATCH] Added block components --- behaviour/blocks/1.10.0/components.json | 32 +++++++++---- .../minecraft.block_light_absorption.json | 3 +- .../minecraft.block_light_emission.json | 3 +- .../components/minecraft.breakonpush.json | 8 ++++ .../components/minecraft.breathability.json | 10 +++++ .../components/minecraft.display_name.json | 8 ++++ .../minecraft.entity_collision.json | 38 ++++++++++++++++ .../minecraft.explosion_resistance.json | 3 +- .../1.10.0/components/minecraft.friction.json | 3 +- .../1.10.0/components/minecraft.geometry.json | 9 ++++ .../components/minecraft.immovable.json | 8 ++++ .../minecraft.material_instances.json | 45 +++++++++++++++++++ .../components/minecraft.onlypistonpush.json | 7 +++ .../components/minecraft.pick_collision.json | 37 +++++++++++++++ .../minecraft.placement_filter.json | 37 +++++++++++++++ .../components/minecraft.preventsjumping.json | 7 +++ .../components/minecraft.random_ticking.json | 42 +++++++++++++++++ .../1.10.0/components/minecraft.rotation.json | 13 ++++++ .../1.10.0/components/minecraft.ticking.json | 45 +++++++++++++++++++ .../components/minecraft.unit_cube.json | 7 +++ .../components/minecraft.unwalkable.json | 7 +++ 21 files changed, 360 insertions(+), 12 deletions(-) create mode 100644 behaviour/blocks/1.10.0/components/minecraft.breakonpush.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.breathability.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.display_name.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.entity_collision.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.geometry.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.immovable.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.material_instances.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.onlypistonpush.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.pick_collision.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.placement_filter.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.preventsjumping.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.random_ticking.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.rotation.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.ticking.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.unit_cube.json create mode 100644 behaviour/blocks/1.10.0/components/minecraft.unwalkable.json diff --git a/behaviour/blocks/1.10.0/components.json b/behaviour/blocks/1.10.0/components.json index 988ac3e7..d2e18713 100644 --- a/behaviour/blocks/1.10.0/components.json +++ b/behaviour/blocks/1.10.0/components.json @@ -7,13 +7,29 @@ "type": "object", "additionalProperties": false, "properties": { - "minecraft:block_light_absorption": { "$ref": "components/minecraft.block_light_absorption.json" }, - "minecraft:block_light_emission": { "$ref": "components/minecraft.block_light_emission.json" }, - "minecraft:destroy_time": { "$ref": "components/minecraft.destroy_time.json" }, - "minecraft:explosion_resistance": { "$ref": "components/minecraft.explosion_resistance.json" }, - "minecraft:flammable": { "$ref": "components/minecraft.flammable.json" }, - "minecraft:friction": { "$ref": "components/minecraft.friction.json" }, - "minecraft:loot": { "$ref": "components/minecraft.loot.json" }, - "minecraft:map_color": { "$ref": "components/minecraft.map_color.json" } + "minecraft:block_light_absorption": { "$ref": "./components/minecraft.block_light_absorption.json" }, + "minecraft:block_light_emission": { "$ref": "./components/minecraft.block_light_emission.json" }, + "minecraft:breakonpush": { "$ref": "./components/minecraft.breakonpush.json" }, + "minecraft:breathability": { "$ref": "./components/minecraft.breathability.json" }, + "minecraft:destroy_time": { "$ref": "./components/minecraft.destroy_time.json" }, + "minecraft:display_name": { "$ref": "./components/minecraft.display_name.json" }, + "minecraft:entity_collision": { "$ref": "./components/minecraft.entity_collision.json" }, + "minecraft:explosion_resistance": { "$ref": "./components/minecraft.explosion_resistance.json" }, + "minecraft:flammable": { "$ref": "./components/minecraft.flammable.json" }, + "minecraft:friction": { "$ref": "./components/minecraft.friction.json" }, + "minecraft:geometry": { "$ref": "./components/minecraft.geometry.json" }, + "minecraft:immovable": { "$ref": "./components/minecraft.immovable.json" }, + "minecraft:loot": { "$ref": "./components/minecraft.loot.json" }, + "minecraft:map_color": { "$ref": "./components/minecraft.map_color.json" }, + "minecraft:material_instances": { "$ref": "./components/minecraft.material_instances.json" }, + "minecraft:onlypistonpush": { "$ref": "./components/minecraft.onlypistonpush.json" }, + "minecraft:pick_collision": { "$ref": "./components/minecraft.pick_collision.json" }, + "minecraft:placement_filter": { "$ref": "./components/minecraft.placement_filter.json" }, + "minecraft:preventsjumping": { "$ref": "./components/minecraft.preventsjumping.json" }, + "minecraft:random_ticking": { "$ref": "./components/minecraft.random_ticking.json" }, + "minecraft:rotation": { "$ref": "./components/minecraft.rotation.json" }, + "minecraft:ticking": { "$ref": "./components/minecraft.ticking.json" }, + "minecraft:unit_cube": { "$ref": "./components/minecraft.unit_cube.json" }, + "minecraft:unwalkable": { "$ref": "./components/minecraft.unwalkable.json" } } } diff --git a/behaviour/blocks/1.10.0/components/minecraft.block_light_absorption.json b/behaviour/blocks/1.10.0/components/minecraft.block_light_absorption.json index 3332bd7f..b3efb569 100644 --- a/behaviour/blocks/1.10.0/components/minecraft.block_light_absorption.json +++ b/behaviour/blocks/1.10.0/components/minecraft.block_light_absorption.json @@ -4,5 +4,6 @@ "additionalProperties": false, "type": "integer", "title": "Block light absorption 1.10.0", - "description": "The amount of light this block will absorb." + "description": "The amount of light this block will absorb.", + "default": 0 } diff --git a/behaviour/blocks/1.10.0/components/minecraft.block_light_emission.json b/behaviour/blocks/1.10.0/components/minecraft.block_light_emission.json index e5ad2061..bd18dc94 100644 --- a/behaviour/blocks/1.10.0/components/minecraft.block_light_emission.json +++ b/behaviour/blocks/1.10.0/components/minecraft.block_light_emission.json @@ -6,5 +6,6 @@ "title": "Block light emission 1.10.0", "description": "The amount of light this block will emit in a range [0.0, 1.0].", "minimum": 0, - "maximum": 1 + "maximum": 1, + "default": 0.0 } diff --git a/behaviour/blocks/1.10.0/components/minecraft.breakonpush.json b/behaviour/blocks/1.10.0/components/minecraft.breakonpush.json new file mode 100644 index 00000000..64fcad34 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.breakonpush.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.breakonpush", + "additionalProperties": false, + "type": "boolean", + "title": "Break on push 1.10.0", + "description": "When pushed by a piston the block breaks." +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.breathability.json b/behaviour/blocks/1.10.0/components/minecraft.breathability.json new file mode 100644 index 00000000..7d6fe833 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.breathability.json @@ -0,0 +1,10 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.breathability", + "additionalProperties": false, + "type": "string", + "title": "Breathability 1.10.0", + "description": "Property describing the breathability of this block and whether it is treated as a solid or as air.", + "enum": [ "solid", "air" ], + "default": "solid" +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.display_name.json b/behaviour/blocks/1.10.0/components/minecraft.display_name.json new file mode 100644 index 00000000..fab4dc4a --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.display_name.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.display_name", + "additionalProperties": false, + "type": "string", + "title": "Display name 1.10.0", + "description": "Specifies the display name id for the block." +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.entity_collision.json b/behaviour/blocks/1.10.0/components/minecraft.entity_collision.json new file mode 100644 index 00000000..77acd3a0 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.entity_collision.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.entity_collision", + "additionalProperties": false, + "title": "Entity collision 1.10.0", + "description": "Can only be set to false, it disables the collision of the block with entities.", + "oneOf": [ + { "type": "boolean", "const": false }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "origin": { + "type": "array", + "title": "Origin", + "description": "Minimal position Bounds of the collision box", + "default": [-8.0, 0.0, -8.0], + "items": [ + { "type": "number", "title": "X", "description": "The x offset" }, + { "type": "number", "title": "Y", "description": "The y offset" }, + { "type": "number", "title": "Z", "description": "The z offset" } + ] + }, + "size": { + "type": "array", + "title": "Size", + "description": "Size of each side of the box of the component", + "default": [16.0, 16.0, 16.0], + "items": [ + { "type": "number", "title": "X", "description": "The x size" }, + { "type": "number", "title": "Y", "description": "The y size" }, + { "type": "number", "title": "Z", "description": "The z size" } + ] + } + } + } + ] +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.explosion_resistance.json b/behaviour/blocks/1.10.0/components/minecraft.explosion_resistance.json index c7b2bf2a..1e81d731 100644 --- a/behaviour/blocks/1.10.0/components/minecraft.explosion_resistance.json +++ b/behaviour/blocks/1.10.0/components/minecraft.explosion_resistance.json @@ -4,5 +4,6 @@ "additionalProperties": false, "type": "number", "title": "Explosion resistance 1.10.0", - "description": "Sets the explosion resistance for this block." + "description": "Sets the explosion resistance for this block.", + "default": 0.0 } diff --git a/behaviour/blocks/1.10.0/components/minecraft.friction.json b/behaviour/blocks/1.10.0/components/minecraft.friction.json index 0690c377..2729347d 100644 --- a/behaviour/blocks/1.10.0/components/minecraft.friction.json +++ b/behaviour/blocks/1.10.0/components/minecraft.friction.json @@ -4,5 +4,6 @@ "additionalProperties": false, "type": "number", "title": "Friction 1.10.0", - "description": "Property describing the friction for this block. Friction effects an entities movements when it walks on the block." + "description": "Property describing the friction for this block. Friction effects an entities movements when it walks on the block.", + "default": 0.1 } diff --git a/behaviour/blocks/1.10.0/components/minecraft.geometry.json b/behaviour/blocks/1.10.0/components/minecraft.geometry.json new file mode 100644 index 00000000..3d878d91 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.geometry.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.geometry", + "additionalProperties": false, + "type": "string", + "title": "Geometry 1.10.0", + "description": "The geometry definition name to use.", + "pattern": "^geometry\\.[a-zA-Z0-9_\\-\\.]+$" +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.immovable.json b/behaviour/blocks/1.10.0/components/minecraft.immovable.json new file mode 100644 index 00000000..266e40c8 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.immovable.json @@ -0,0 +1,8 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.immovable", + "additionalProperties": false, + "type": "boolean", + "title": "Immovable 1.10.0", + "description": "An Immovable block cannot be pushed by pistons" +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.material_instances.json b/behaviour/blocks/1.10.0/components/minecraft.material_instances.json new file mode 100644 index 00000000..a4cd1023 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.material_instances.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.material_instances", + "type": "object", + "title": "Material instances 1.10.0", + "description": "Maps face or material_instance names in a geometry file to an actual material instance. Material instance can either be a full material instance or a name to another already defined instance", + "definitions": { + "material_instance": { + "title": "Material instance", + "description": "A single material instance", + "additionalProperties": false, + "properties": { + "ambient_occlusion": { + "title": "Ambient occlusion", + "type": "boolean", + "description": "UNDOCUMENTATED" + }, + "face_dimming": { + "title": "Face dimming", + "type": "boolean", + "description": "UNDOCUMENTATED" + }, + "render_method": { + "type": "string", + "title": "Render method", + "description": "TODO description", + "enum": ["blend", "opaque", "alpha_test"] + }, + "texture": { + "type": "string", + "title": "Texture", + "description": "TODO description" + } + } + } + }, + "properties": { + "*": { + "$ref": "#/definitions/material_instance" + } + }, + "additionalProperties": { + "$ref": "#/definitions/material_instance" + } +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.onlypistonpush.json b/behaviour/blocks/1.10.0/components/minecraft.onlypistonpush.json new file mode 100644 index 00000000..e4c01ead --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.onlypistonpush.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.onlypistonpush", + "type": "boolean", + "title": "Only piston push 1.10.0", + "description": "Blocks with those components won't stick to stickyPistons" +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.pick_collision.json b/behaviour/blocks/1.10.0/components/minecraft.pick_collision.json new file mode 100644 index 00000000..431c2c58 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.pick_collision.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.pick_collision", + "title": "Pick collision 1.10.0", + "description": "Can only be set to false, it disables the collision of the block with entities", + "oneOf": [ + { "type": "boolean", "const": false }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "origin": { + "type": "array", + "title": "Origin", + "description": "Minimal position Bounds of the collision box", + "default": [-8.0, 0.0, -8.0], + "items": [ + { "type": "number", "title": "X", "description": "The x offset" }, + { "type": "number", "title": "Y", "description": "The y offset" }, + { "type": "number", "title": "Z", "description": "The z offset" } + ] + }, + "size": { + "type": "array", + "title": "Size", + "description": "Size of each side of the box of the component", + "default": [16.0, 16.0, 16.0], + "items": [ + { "type": "number", "title": "X", "description": "The x size" }, + { "type": "number", "title": "Y", "description": "The y size" }, + { "type": "number", "title": "Z", "description": "The z size" } + ] + } + } + } + ] +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.placement_filter.json b/behaviour/blocks/1.10.0/components/minecraft.placement_filter.json new file mode 100644 index 00000000..67dd8fcf --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.placement_filter.json @@ -0,0 +1,37 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.placement_filter", + "title": "Placement filter 1.10.0", + "description": "Sets rules for under what conditions the block can be placed/survive", + "type": "object", + "properties": { + "conditions": { + "title": "Conditions", + "description": "List of conditions where the block can be placed/survive", + "type": "array", + "items": { + "type": "object", + "title": "Condition", + "description": "TODO", + "properties": { + "allowed_faces": { + "title": "Allowed faces", + "description": "List of any of the following strings: up, down, north, south, east, west, side, all", + "type": "array", + "items": { "type": "string", "enum": ["up", "down", "north", "south", "east", "west", "side", "all"] } + }, + "block_filter": { + "title": "Block filter", + "description": "List of blocks (can use tags to specify them) that this block can be placed against in the allowed_faces direction", + "type": "array", + "items": { + "type": "string", + "title": "Block identifier", + "description": "TODO" + } + } + } + } + } + } +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.preventsjumping.json b/behaviour/blocks/1.10.0/components/minecraft.preventsjumping.json new file mode 100644 index 00000000..9c35f579 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.preventsjumping.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.preventsjumping", + "title": "Prevents jumping 1.10.0", + "description": "This component makes it so actors can't jump when walking on this block", + "type": "boolean" +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.random_ticking.json b/behaviour/blocks/1.10.0/components/minecraft.random_ticking.json new file mode 100644 index 00000000..5747c878 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.random_ticking.json @@ -0,0 +1,42 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.random_ticking", + "title": "Random ticking 1.10.0", + "description": "Describes the component that will trigger an even at a regular interval between two values", + "type": "object", + "additionalProperties": false, + "properties": { + "on_tick": { + "title": "On tick", + "description": "Describes the component that will trigger an even at a regular interval between two values", + "type": "string", + "additionalProperties": false, + "properties": { + "condition": { + "title": "Condition", + "type": "string", + "description": "The condition of event to be executed on the block. Molang" + }, + "event": { + "title": "Event", + "type": "string", + "description": "The type of event executed on the block." + }, + "range": { + "title": "Range", + "type": "array", + "items": [ + { "type": "integer" }, + { "type": "integer" } + ] + }, + "target": { + "title": "Target", + "description": "The target of event executed on the block.", + "type": "string", + "enum": ["block", "damager", "other", "parent", "player", "self", "target"] + } + } + } + } +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.rotation.json b/behaviour/blocks/1.10.0/components/minecraft.rotation.json new file mode 100644 index 00000000..2f15ac1d --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.rotation.json @@ -0,0 +1,13 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.rotation", + "title": "Rotation 1.10.0", + "description": "This is the block's rotation around the center of the cube in degrees. The rotation order is x-y-z.", + "type": "array", + "additionalProperties": false, + "items": [ + { "type": "number", "title": "X"}, + { "type": "number", "title": "Y"}, + { "type": "number", "title": "Z"} + ] +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.ticking.json b/behaviour/blocks/1.10.0/components/minecraft.ticking.json new file mode 100644 index 00000000..6a71cfcf --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.ticking.json @@ -0,0 +1,45 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.ticking", + "title": "Ticking 1.10.0", + "description": "Describes the component that will trigger an even at a regular interval between two values", + "type": "object", + "additionalProperties": false, + "properties": { + "looping": { + "type": "boolean", + "title": "Looping", + "description": "Does the event loop" + }, + "range": { + "title": "Range", + "description": "The Range between which the component will trigger his event.", + "type": "array", + "items": [ + { "type": "integer" }, + { "type": "integer" } + ] + }, + "on_tick": { + "type": "object", + "title": "On Tick", + "description": "Describes the component that will trigger an even at a regular interval between two values", + "condition": { + "title": "Condition", + "type": "string", + "description": "The condition of event to be executed on the block. Molang" + }, + "event": { + "title": "Event", + "type": "string", + "description": "The type of event executed on the block." + }, + "target": { + "title": "Target", + "description": "The target of event executed on the block.", + "type": "string", + "enum": ["block", "damager", "other", "parent", "player", "self", "target"] + } + } + } +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.unit_cube.json b/behaviour/blocks/1.10.0/components/minecraft.unit_cube.json new file mode 100644 index 00000000..5fe43c5c --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.unit_cube.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.unit_cube", + "title": "Unit cube 1.10.0", + "description": "Specifies that a unit cube is to be used with tessellation.", + "type": "string" +} diff --git a/behaviour/blocks/1.10.0/components/minecraft.unwalkable.json b/behaviour/blocks/1.10.0/components/minecraft.unwalkable.json new file mode 100644 index 00000000..ec835ef6 --- /dev/null +++ b/behaviour/blocks/1.10.0/components/minecraft.unwalkable.json @@ -0,0 +1,7 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "$id": "blockception.minecraft.behaviour.blocks.1.10.0.minecraft.unwalkable", + "title": "Unwalkable 1.10.0", + "description": "this component sets a block as unwalkable. Most mobs will not try to jump over it if the value is set to true", + "type": "boolean" +}