Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update blocks and items to newest format #215

Merged
merged 44 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5d268fd
- Add emit_vibration
Xterionix Feb 7, 2024
217a7bf
- Add min and max bounds to collision_box
Xterionix Feb 7, 2024
d03aad7
- Remove experimental label from crafting_table
Xterionix Feb 7, 2024
960ce07
- Fix flammable definition
Xterionix Feb 7, 2024
ef238ca
- Add geometry.cross
Xterionix Feb 7, 2024
012b296
- Add culling property to block_culling_rules
Xterionix Feb 7, 2024
ce6ceb7
- Add max length to loot
Xterionix Feb 7, 2024
0b1651d
- Remove part visibility
Xterionix Feb 7, 2024
a89c958
- Remove experimental label from placement filter
Xterionix Feb 7, 2024
5dc02f2
- Add min max bounds to selection box
Xterionix Feb 7, 2024
85dff00
- Remove unit cube as deprecated
Xterionix Feb 7, 2024
fbf9e3e
- Remove armor component
Xterionix Feb 7, 2024
c61abac
- Add protection to wearable
Xterionix Feb 7, 2024
69b9be0
- Remove render offsets
Xterionix Feb 7, 2024
b4e75bc
- Remove on_dig
Xterionix Feb 7, 2024
f267c50
- Remove dye powder
Xterionix Feb 7, 2024
e7096b8
- Remove knockback resistance
Xterionix Feb 7, 2024
0229b0c
- Update durability
Xterionix Feb 7, 2024
cd86b46
- Remove foil
Xterionix Feb 7, 2024
3aa1e2e
- Update hand_equipped
Xterionix Feb 7, 2024
f2f65ad
- Update food
Xterionix Feb 7, 2024
1b91587
- Remove frame from :icon
Xterionix Feb 7, 2024
187db1d
- Remove max damage
Xterionix Feb 7, 2024
b4acbb4
- Remove on_use
Xterionix Feb 7, 2024
b204350
- Update max stack size
Xterionix Feb 7, 2024
a085a3e
- Update repairable
Xterionix Feb 7, 2024
dfdb141
- Updated :shooter
Xterionix Feb 7, 2024
b1c5f24
- Update stacked by data
Xterionix Feb 7, 2024
edcfa0d
- Add use modifiers
Xterionix Feb 7, 2024
e71922a
- Remove weapon
Xterionix Feb 7, 2024
43a3a90
- Add allow_off_hand
Xterionix Feb 7, 2024
3412410
- Add can_destroy_in_creative
Xterionix Feb 7, 2024
75c0e64
- Add damage
Xterionix Feb 7, 2024
369c82f
- Fix max_stack_size
Xterionix Feb 7, 2024
5e6c2f8
- Add enchantable
Xterionix Feb 7, 2024
3a9d1c9
- Add hover text color
Xterionix Feb 7, 2024
7269420
- Add liquid clipped
Xterionix Feb 7, 2024
af173ac
- Add record
Xterionix Feb 7, 2024
9ddcb2f
- Add should_despawn
Xterionix Feb 7, 2024
8733cbb
- Tags component
Xterionix Feb 7, 2024
3da963c
- Add use_animation
Xterionix Feb 7, 2024
cec3698
- Update item components
Xterionix Feb 10, 2024
e49d13b
- Update block components
Xterionix Feb 10, 2024
9022d36
Update source/behavior/entities/format/events.json
DaanV2 Feb 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/behavior/blocks/format/components/collision_box.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
"description": "Size of each side of the collision box. Size is specified as [x, y, z]. origin + size must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.",
"type": "array",
"items": [
{ "title": "X", "type": "number" },
{ "title": "Y", "type": "number" },
{ "title": "Z", "type": "number" }
{ "title": "X", "type": "number", "minimum": -8.0, "maximum": 8 },
{ "title": "Y", "type": "number","minimum": 0, "maximum": 16 },
{ "title": "Z", "type": "number","minimum": -8.0, "maximum": 8 }
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$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.",
"description": "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": [],
Expand Down
14 changes: 10 additions & 4 deletions source/behavior/blocks/format/components/flammable.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,17 @@
"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.",
"catch_chance_modifier": {
"title": "Catch Chance Modifier",
"description": "A modifier affecting the chance that this block will catch flame when next to a fire. Values are greater than or equal to 0, with a higher number meaning more likely to catch on fire",
"type": "number",
"default": 0.0
"default": 5
},
"destroy_chance_modifier": {
"title": "Destroy Chance Modifier",
"description": "A modifier affecting the chance that this block will be destroyed by flames when on fire.",
"type": "number",
"default":20
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion source/behavior/blocks/format/components/geometry.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"title": "Identifier",
"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",
"enum": ["minecraft:geometry.full_block"]
"enum": ["minecraft:geometry.full_block", "minecraft:geometry.cross"]
}
}
},
Expand All @@ -36,6 +36,11 @@
"description": "Whether or not the bone should be visible.",
"title": "Bone Visibility"
}
},
"culling": {
"title": "Block Culling Rule",
"description": "The description identifer of the block culling rule used to cull this block. This identifier must match an existing geometry identifier in any of the currently loaded resource packs.",
"type": "string"
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion source/behavior/blocks/format/components/loot.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"title": "Loot",
"description": "The path to the loot table, relative to the behavior pack.",
"type": "string",
"pattern": "loot_tables/.*\\.json$"
"pattern": "loot_tables/.*\\.json$",
"maxLength": 256
}
11 changes: 0 additions & 11 deletions source/behavior/blocks/format/components/part_visibility.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$id": "blockception.minecraft.behavior.blocks.minecraft.placement_filter",
"title": "Placement Filter",
"description": "[Experimental]",
"type": "object",
"properties": {
"conditions": {
Expand All @@ -17,7 +16,6 @@
"minItems": 1,
"items": {
"title": "Placement Filter",
"description": "[Experimental]",
"type": "object",
"additionalProperties": false,
"properties": {
Expand Down
6 changes: 3 additions & 3 deletions source/behavior/blocks/format/components/selection_box.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"description": "Size of each side of the selection box. Size is specified as [x, y, z]. \"origin\" + \"size\" must be in the range (-8, 0, -8) to (8, 16, 8), inclusive.",
"type": "array",
"items": [
{ "title": "X", "type": "number" },
{ "title": "Y", "type": "number" },
{ "title": "Z", "type": "number" }
{ "title": "X", "type": "number", "minimum": -8.0, "maximum": 8},
{ "title": "Y", "type": "number", "minimum": 0, "maximum": 16 },
{ "title": "Z", "type": "number", "minimum": -8.0, "maximum": 8}
]
}
}
Expand Down
8 changes: 0 additions & 8 deletions source/behavior/blocks/format/components/unit_cube.json

This file was deleted.

2 changes: 0 additions & 2 deletions source/behavior/blocks/format/minecraft.block.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
"minecraft:loot": { "$ref": "./components/loot.json" },
"minecraft:map_color": { "$ref": "./components/map_color.json" },
"minecraft:material_instances": { "$ref": "./components/material_instances.json" },
"minecraft:part_visibility": { "$ref": "./components/part_visibility.json" },
"minecraft:placement_filter": { "$ref": "./components/placement_filter.json" },
"minecraft:selection_box": { "$ref": "./components/selection_box.json" },
"minecraft:transformation": { "$ref": "./components/transformation.json" },
"minecraft:unit_cube": { "$ref": "./components/unit_cube.json" },

//Triggers
"minecraft:on_fall_on": { "$ref": "./triggers/on_fall_on.json" },
Expand Down
19 changes: 19 additions & 0 deletions source/behavior/entities/format/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,25 @@
}
}
},
"emit_vibration": {
"title": "Emit Vibration",
"description": "UNDOCUMENTED",
"type": "object",
"properties": {
"vibration": {
"enum": [
"shear",
"entity_act",
"entity_interact"
]
}
},
"examples": [
{ "vibration": "shear"},
{ "vibration": "entity_act"},
{ "vibration": "entity_interact"}
]
},
"set_property": {
"title": "Set Property",
"description": "Sets a property on the entity.",
Expand Down
12 changes: 12 additions & 0 deletions source/behavior/items/format/components/allow_off_hand.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$id": "blockception.minecraft.behavior.items.minecraft:allow_off_hand",
"additionalProperties": false,
"type": "object",
"title": "Allow Off Hand",
"description": "The allow off hand component determines whether the item can be placed in the off hand slot of the inventory.",
"required": ["value"],
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item can be placed in the off hand slot" } },
"examples": [
{ "value": true }
]
}
24 changes: 0 additions & 24 deletions source/behavior/items/format/components/armor.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$id": "blockception.minecraft.behavior.items.minecraft:can_destroy_in_creative",
"additionalProperties": false,
"type": "object",
"title": "Can Destroy In Creative",
"description": "The can destroy in creative component determines if the item will break blocks in creative when swinging.",
"required": ["value"],
"properties": { "value": { "type": "boolean", "title": "Value", "description": "Whether the item can destroy blocks while in creative" } },
"examples": [
{ "value": false }
]
}
12 changes: 12 additions & 0 deletions source/behavior/items/format/components/damage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$id": "blockception.minecraft.behavior.items.minecraft:damage",
"additionalProperties": false,
"type": "object",
"title": "Damage",
"description": "The damage component determines how much extra damage the item does on attack.",
"required": ["value"],
"properties": { "value": { "type": "number", "title": "Value", "description": "How much extra damage the item does, must be a positive number.", "minimum": 1 } },
"examples": [
{ "value": 7 }
]
}
6 changes: 2 additions & 4 deletions source/behavior/items/format/components/digger.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
"type": "object",
"additionalProperties": false,
"properties": {
"speed": { "title": "Speed", "description": "Speed.", "type": "number" },
"on_dig": { "type": "string", "title": "On Dig", "description": "Trigger for when you dig a block that isn't listed in destroy_speeds." },
"speed": { "title": "Speed", "type": "number" },
"block": {
"title": "Block",
"oneOf": [
Expand All @@ -45,7 +44,6 @@
}
}
}
},
"on_dig": { "type": "string", "title": "On Dig", "description": "Trigger for when you dig a block that isn't listed in destroy_speeds." }
}
}
}
5 changes: 3 additions & 2 deletions source/behavior/items/format/components/durability.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Durability item component: how much damage can this item take before breaking.",
"type": "object",
"additionalProperties": false,
"required": ["damage_chance"],
"required": ["max_durability"],
"properties": {
"damage_chance": {
"type": "object",
Expand All @@ -20,7 +20,8 @@
"max_durability": {
"title": "Maximum Durability",
"description": "Maximum durability is the amount of damage that this item can take before breaking.",
"type": "integer"
"type": "integer",
"minimum": 0
}
},
"examples": [
Expand Down
16 changes: 0 additions & 16 deletions source/behavior/items/format/components/dye_powder.json

This file was deleted.

37 changes: 37 additions & 0 deletions source/behavior/items/format/components/enchantable.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$id": "blockception.minecraft.behavior.items.minecraft:enchantable",
"title": "Enchantable",
"description": "The enchantable component determines what enchantments can be applied to the item.",
"type": "object",
"additionalProperties": false,
"required": ["slot"],
"properties": {
"slot": {
"title": "Slot",
"description": "If true you can always eat this item (even when not hungry), defaults to false.",
"enum": [
"axe",
"bow",
"armor_feet",
"armor_torso",
"armor_head",
"armor_legs",
"hoe",
"pickaxe",
"shovel",
"elytra",
"fishing_rod",
"flintsteel",
"sword",
"shears",
"cosmetic_head"
]
},
"value": {
"title": "Value",
"description": "The value of the enchantment.",
"type": "number",
"minimum": 0
}
}
}
8 changes: 0 additions & 8 deletions source/behavior/items/format/components/foil.json

This file was deleted.

Loading
Loading