Skip to content

Commit

Permalink
Updated block components
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanV2 committed Oct 29, 2022
1 parent 6816688 commit 7904cb5
Show file tree
Hide file tree
Showing 38 changed files with 282 additions and 366 deletions.
8 changes: 4 additions & 4 deletions source/behavior/blocks/format/components/collision_box.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.destroy_time",
"title": "Destroy Time",
"$id": "blockception.minecraft.behavior.blocks.minecraft.collision_box",
"title": "Collision Box",
"description": "This component can be specified as a Boolean. If this component is omitted, the default value for this component is true, which will give your block the default values for its parameters (a collision box the size/shape of a regular block).",
"oneOf": [
{
Expand All @@ -17,8 +17,8 @@
"type": "array",
"items": [
{ "title": "X", "type": "number", "minimum": -8.0, "maximum": 8 },
{ "title": "Y", "minimum": 0, "maximum": 16 },
{ "title": "Z", "minimum": -8.0, "maximum": 8 }
{ "title": "Y", "type": "number", "minimum": 0, "maximum": 16 },
{ "title": "Z", "type": "number", "minimum": -8.0, "maximum": 8 }
]
},
"size": {
Expand Down
28 changes: 28 additions & 0 deletions source/behavior/blocks/format/components/crafting_table.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.crafting_table",
"title": "Crafting Table",
"description": "[Experimental] Makes your block into a custom crafting table which enables the crafting table UI and the ability to craft recipes.",
"additionalProperties": false,
"type": "object",
"required": [],
"properties": {
"crafting_tags": {
"title": "Crafting Tags",
"description": "Defines the tags recipes should define to be crafted on this table. Limited to 64 tags. Each tag is limited to 64 characters.",
"type": "array",
"maxItems": 64,
"items": {
"type": "string",
"title": "Tag",
"description": "The tag to check for.",
"minLength": 1,
"maxLength": 64
}
},
"table_name": {
"title": "Table Name",
"description": "Specifies the language file key that maps to what text will be displayed in the UI of this table. If the string given can not be resolved as a loc string, the raw string given will be displayed. If this field is omitted, the name displayed will default to the name specified in the \"display_name\" component. If this block has no \"display_name\" component, the name displayed will default to the name of the block.",
"type": "string"
}
}
}
8 changes: 0 additions & 8 deletions source/behavior/blocks/format/components/destroy_time.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.destructible_by_explosion",
"title": "Destructible By Explosion",
"description": "Describes the destructible by explosion properties for this block. If set to true, the block will have the default explosion resistance. If set to false, this block is indestructible by explosion. If the component is omitted, the block will have the default explosion resistance.",
"oneOf": [
{
"type": "boolean",
"default": true
},
{
"type": "object",
"additionalProperties": false,
"required": [],
"properties": {
"explosion_resistance": {
"title": "Explosion Resistance",
"description": "Describes how resistant the block is to explosion. Greater values mean the block is less likely to break when near an explosion (or has higher resistance to explosions). The scale will be different for different explosion power levels. A negative value or 0 means it will easily explode; larger numbers increase level of resistance.",
"type": "number",
"default": 0.0
}
}
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.destructible_by_mining",
"title": "Destructible By Mining",
"description": "Describes the destructible by mining properties for this block. If set to true, the block will take the default number of seconds to destroy. If set to false, this block is indestructible by mining. If the component is omitted, the block will take the default number of seconds to destroy.",
"oneOf": [
{
"type": "boolean",
"default": true
},
{
"type": "object",
"additionalProperties": false,
"required": [],
"properties": {
"seconds_to_destroy": {
"title": "Seconds To Destroy",
"description": "Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times.",
"type": "number",
"default": 0.0
}
}
}
]
}
5 changes: 2 additions & 3 deletions source/behavior/blocks/format/components/display_name.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.display_name",
"additionalProperties": false,
"type": "string",
"title": "Display Name",
"description": "Specifies the language file key that maps to what text will be displayed when you hover over the block."
"description": "Specifies the language file key that maps to what text will be displayed when you hover over the block in your inventory and hotbar. If the string given can not be resolved as a loc string, the raw string given will be displayed. If this component is omitted, the name of the block will be used as the display name.",
"type": "string"
}
36 changes: 0 additions & 36 deletions source/behavior/blocks/format/components/entity_collision.json

This file was deleted.

This file was deleted.

34 changes: 18 additions & 16 deletions source/behavior/blocks/format/components/flammable.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.flammable",
"additionalProperties": false,
"type": "object",
"title": "Flammable",
"description": "Describes the flammable properties for this block.",
"additionalItems": false,
"properties": {
"burn_odds": {
"type": "integer",
"default": 0,
"description": "How likely the block will be destroyed by flames when on fire. Value must be greater than or equal to 0.",
"title": "Burn Odds"
"description": "Describes the flammable properties for this block. If set to true, default values are used. If set to false, or if this component is omitted, the block will not be able to catch on fire naturally from neighbors, but it can still be directly ignited.",
"oneOf": [
{
"type": "boolean",
"default": true
},
"flame_odds": {
"type": "integer",
"default": 0,
"description": "How likely the block will catch flame when next to a fire. Value must be greater than or equal to 0.",
"title": "Flame Odds"
{
"type": "object",
"additionalProperties": false,
"required": [],
"properties": {
"seconds_to_destroy": {
"title": "Seconds To Destroy",
"description": "Sets the number of seconds it takes to destroy the block with base equipment. Greater numbers result in greater mining times.",
"type": "number",
"default": 0.0
}
}
}
}
]
}
9 changes: 5 additions & 4 deletions source/behavior/blocks/format/components/friction.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.friction",
"additionalProperties": false,
"type": "number",
"title": "Friction",
"description": "Property describing the friction for this block. Friction effects an entities movements when it walks on the block.",
"default": 0.1
"description": "Describes the friction for this block in a range of (0.0-0.9). Friction affects an entity's movement speed when it travels on the block. Greater value results in more friction.",
"type": "number",
"default": 0.4,
"minimum": 0,
"maximum": 0.9
}
6 changes: 2 additions & 4 deletions source/behavior/blocks/format/components/geometry.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.geometry",
"additionalProperties": false,
"type": "string",
"title": "Geometry",
"description": "The geometry description identifier to use, this identifier must match an existing geometry identifier in any of the currently loaded resource packs.",
"pattern": "^geometry\\.[a-zA-Z0-9_\\-\\.]+$"
"description": "The description identifier of the geometry file to use to render this block. This identifier must match an existing geometry identifier in any of the currently loaded resource packs.",
"type": "string"
}
7 changes: 0 additions & 7 deletions source/behavior/blocks/format/components/immovable.json

This file was deleted.

9 changes: 9 additions & 0 deletions source/behavior/blocks/format/components/light_dampening.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.light_dampening",
"title": "Light Dampening",
"description": "The amount that light will be dampened when it passes through the block, in a range (0-15). Higher value means the light will be dampened more.",
"type": "integer",
"default": 15,
"minimum": 0,
"maximum": 15
}
9 changes: 9 additions & 0 deletions source/behavior/blocks/format/components/light_emission.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.light_emission",
"title": "Light Emission",
"description": "The amount of light this block will emit in a range (0-15). Higher value means more light will be emitted.",
"type": "integer",
"default": 15,
"minimum": 0,
"maximum": 15
}
5 changes: 2 additions & 3 deletions source/behavior/blocks/format/components/loot.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.loot",
"additionalProperties": false,
"type": "string",
"title": "Loot",
"description": "The path to the loot table, relative to the behavior pack. Path string is limited to 256 characters.",
"description": "The path to the loot table, relative to the behavior pack.",
"type": "string",
"pattern": "loot_tables/.*\\.json$"
}
40 changes: 35 additions & 5 deletions source/behavior/blocks/format/components/map_color.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,39 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.map_color",
"additionalProperties": false,
"type": "string",
"title": "Map Color",
"description": "A color represented as a hex value. This will be the color rendered to a map.",
"format": "color-hex",
"examples": ["#FFFFFF"]
"description": "Sets the color of the block when rendered to a map. The color is represented as a hex value in the format \"#RRGGBB\". May also be expressed as an array of [R, G, B] from 0 to 255. If this component is omitted, the block will not show up on the map.",
"oneOf": [
{
"type": "string",
"format": "colox-hex",
"default": "#FFFFFF"
},
{
"type": "array",
"items": [
{
"title": "Red",
"type": "integer",
"default": 0,
"minimum": 0,
"maximum": 255
},
{
"title": "Green",
"type": "integer",
"default": 0,
"minimum": 0,
"maximum": 255
},
{
"title": "Blue",
"type": "integer",
"default": 0,
"minimum": 0,
"maximum": 255
}
]
}
],
"examples": ["#FFFFFF", [255, 255, 255]]
}
Loading

0 comments on commit 7904cb5

Please sign in to comment.