Skip to content

Commit 196b5f6

Browse files
Merge pull request #43 from edayot/1.20.5-crafter
feat(crafter + custom_block): update to 1.20.5
2 parents c25fdeb + bbb14a2 commit 196b5f6

File tree

132 files changed

+1000
-995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1000
-995
lines changed

poetry.lock

Lines changed: 398 additions & 404 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ readme = "README.md"
88

99
[tool.poetry.dependencies]
1010
python = "^3.10"
11-
mecha = "^0.86.0"
12-
bolt = "^0.44.0"
11+
mecha = "^0.94.0"
12+
bolt = "^0.48.0"
1313
bolt-expressions = "^0.12.2"
14-
beet = ">=0.100.0"
14+
beet = ">=0.105.0"
1515
pydantic = "^2.5.2"
1616

1717
[tool.poetry.group.dev.dependencies]

smithed_libraries/packs/crafter/beet.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extend: "@smithed_libraries/common.yaml"
22

33
id: smithed.crafter
44
name: Smithed Crafter
5-
version: "0.3.1"
5+
version: "0.4.0"
66
description: Native Library for Smithed
77
author: TheNuclearNexus
88

@@ -31,4 +31,4 @@ pipeline:
3131
meta:
3232
depends_on: # used for metadata
3333
custom-block: "0.1.0"
34-
minecraft_version: "1.20.4"
34+
minecraft_version: "1.20.6"

smithed_libraries/packs/crafter/data/smithed.crafter/advancements/technical/craft_table.json

Lines changed: 0 additions & 16 deletions
This file was deleted.

smithed_libraries/packs/crafter/data/smithed.crafter/advancements/technical/enter_gui.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"criteria": {
33
"click_paleontology_table": {
4-
"trigger": "minecraft:item_used_on_block",
4+
"trigger": "minecraft:default_block_use",
55
"conditions": {
66
"location": [
77
{
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
data modify storage smithed.crafter:main temp.output_item set from entity @s ArmorItems[3].tag.smithed.stored_output
1+
data modify storage smithed.crafter:main temp.output_item set from entity @s ArmorItems[3].components."minecraft:custom_data".smithed.stored_output
22
data remove storage smithed.crafter:main temp.output_item.Slot
3-
execute if data entity @s ArmorItems[3].tag.smithed.stored_output.id as @e[type=item,sort=nearest,distance=..2,tag=!global.ignore,tag=!global.ignore.kill] run function smithed.crafter:impl/block/table/break/delete_output
3+
execute if data entity @s ArmorItems[3].components."minecraft:custom_data".smithed.stored_output.id as @e[type=item,sort=nearest,distance=..2,tag=!global.ignore,tag=!global.ignore.kill] run function smithed.crafter:impl/block/table/break/delete_output
44

5-
execute if entity @e[type=item,nbt={Item:{id:"minecraft:barrel",Count:1b}},limit=1,sort=nearest,distance=..3] run function smithed.crafter:impl/block/table/break/drop_item
5+
execute if entity @e[type=item,nbt={Item:{id:"minecraft:barrel",count:1}},limit=1,sort=nearest,distance=..3] run function smithed.crafter:impl/block/table/break/drop_item
66
kill @s
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
kill @e[type=item,nbt={Item:{id:"minecraft:barrel",Count:1b}},limit=1,sort=nearest,distance=..3]
1+
kill @e[type=item,nbt={Item:{id:"minecraft:barrel",count:1}},limit=1,sort=nearest,distance=..3]
22
execute if entity @s[tag=smithed.default] run loot spawn ~ ~ ~ loot smithed.crafter:blocks/table
33
execute if entity @s[tag=!smithed.default] run function #smithed.crafter:event/break

smithed_libraries/packs/crafter/data/smithed.crafter/functions/impl/block/table/craft.mcfunction

Lines changed: 0 additions & 6 deletions
This file was deleted.

smithed_libraries/packs/crafter/data/smithed.crafter/functions/impl/block/table/crafting/input/process.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ execute unless data storage smithed.crafter:main root.temp.crafting_input_temp[]
1111
execute unless data storage smithed.crafter:main root.temp.crafting_input_temp[][0].Slot run data remove storage smithed.crafter:main root.temp.crafting_input_temp[][0]
1212
execute unless data storage smithed.crafter:main root.temp.crafting_input_temp[][-1].Slot run data remove storage smithed.crafter:main root.temp.crafting_input_temp[][-1]
1313

14-
data remove storage smithed.crafter:main root.temp.crafting_input_temp[][].Count
14+
data remove storage smithed.crafter:main root.temp.crafting_input_temp[][].count
1515
data remove storage smithed.crafter:main root.temp.crafting_input_temp[][].Slot
1616
data modify storage smithed.crafter:main root.temp.crafting_input set value {0:[{id:"minecraft:air",item_tag:"NONE",Slot:0b},{id:"minecraft:air",item_tag:"NONE",Slot:1b},{id:"minecraft:air",item_tag:"NONE",Slot:2b}],1:[{id:"minecraft:air",item_tag:"NONE",Slot:0b},{id:"minecraft:air",item_tag:"NONE",Slot:1b},{id:"minecraft:air",item_tag:"NONE",Slot:2b}],2:[{id:"minecraft:air",item_tag:"NONE",Slot:0b},{id:"minecraft:air",item_tag:"NONE",Slot:1b},{id:"minecraft:air",item_tag:"NONE",Slot:2b}]}
1717

Original file line numberDiff line numberDiff line change
@@ -1,74 +1,8 @@
1-
data modify storage smithed.crafter:main root.temp.item_tag set value []
2-
3-
execute if predicate smithed.crafter:block/table/tags/acacia_logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:acacia_logs"
4-
execute if predicate smithed.crafter:block/table/tags/anvil run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:anvil"
5-
execute if predicate smithed.crafter:block/table/tags/arrows run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:arrows"
6-
execute if predicate smithed.crafter:block/table/tags/axolotl_tempt_items run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:axolotl_tempt_items"
7-
execute if predicate smithed.crafter:block/table/tags/banners run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:banners"
8-
execute if predicate smithed.crafter:block/table/tags/beacon_payment_items run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:beacon_payment_items"
9-
execute if predicate smithed.crafter:block/table/tags/beds run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:beds"
10-
execute if predicate smithed.crafter:block/table/tags/birch_logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:birch_logs"
11-
execute if predicate smithed.crafter:block/table/tags/boats run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:boats"
12-
execute if predicate smithed.crafter:block/table/tags/buttons run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:buttons"
13-
execute if predicate smithed.crafter:block/table/tags/candles run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:candles"
14-
execute if predicate smithed.crafter:block/table/tags/carpets run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:carpets"
15-
execute if predicate smithed.crafter:block/table/tags/cluster_max_harvestables run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:cluster_max_harvestables"
16-
execute if predicate smithed.crafter:block/table/tags/coals run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:coals"
17-
execute if predicate smithed.crafter:block/table/tags/coal_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:coal_ores"
18-
execute if predicate smithed.crafter:block/table/tags/copper_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:copper_ores"
19-
execute if predicate smithed.crafter:block/table/tags/creeper_drop_music_discs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:creeper_drop_music_discs"
20-
execute if predicate smithed.crafter:block/table/tags/crimson_stems run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:crimson_stems"
21-
execute if predicate smithed.crafter:block/table/tags/dark_oak_logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:dark_oak_logs"
22-
execute if predicate smithed.crafter:block/table/tags/diamond_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:diamond_ores"
23-
execute if predicate smithed.crafter:block/table/tags/doors run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:doors"
24-
execute if predicate smithed.crafter:block/table/tags/emerald_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:emerald_ores"
25-
execute if predicate smithed.crafter:block/table/tags/fences run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:fences"
26-
execute if predicate smithed.crafter:block/table/tags/fishes run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:fishes"
27-
execute if predicate smithed.crafter:block/table/tags/flowers run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:flowers"
28-
execute if predicate smithed.crafter:block/table/tags/fox_food run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:fox_food"
29-
execute if predicate smithed.crafter:block/table/tags/freeze_immune_wearables run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:freeze_immune_wearables"
30-
execute if predicate smithed.crafter:block/table/tags/gold_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:gold_ores"
31-
execute if predicate smithed.crafter:block/table/tags/ignored_by_piglin_babies run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:ignored_by_piglin_babies"
32-
execute if predicate smithed.crafter:block/table/tags/iron_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:iron_ores"
33-
execute if predicate smithed.crafter:block/table/tags/jungle_logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:jungle_logs"
34-
execute if predicate smithed.crafter:block/table/tags/lapis_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:lapis_ores"
35-
execute if predicate smithed.crafter:block/table/tags/leaves run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:leaves"
36-
execute if predicate smithed.crafter:block/table/tags/lectern_books run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:lectern_books"
37-
execute if predicate smithed.crafter:block/table/tags/logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:logs"
38-
execute if predicate smithed.crafter:block/table/tags/logs_that_burn run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:logs_that_burn"
39-
execute if predicate smithed.crafter:block/table/tags/music_discs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:music_discs"
40-
execute if predicate smithed.crafter:block/table/tags/non_flammable_wood run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:non_flammable_wood"
41-
execute if predicate smithed.crafter:block/table/tags/oak_logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:oak_logs"
42-
execute if predicate smithed.crafter:block/table/tags/occludes_vibration_signals run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:occludes_vibration_signals"
43-
execute if predicate smithed.crafter:block/table/tags/piglin_food run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:piglin_food"
44-
execute if predicate smithed.crafter:block/table/tags/piglin_loved run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:piglin_loved"
45-
execute if predicate smithed.crafter:block/table/tags/piglin_repellents run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:piglin_repellents"
46-
execute if predicate smithed.crafter:block/table/tags/planks run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:planks"
47-
execute if predicate smithed.crafter:block/table/tags/rails run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:rails"
48-
execute if predicate smithed.crafter:block/table/tags/redstone_ores run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:redstone_ores"
49-
execute if predicate smithed.crafter:block/table/tags/sand run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:sand"
50-
execute if predicate smithed.crafter:block/table/tags/saplings run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:saplings"
51-
execute if predicate smithed.crafter:block/table/tags/signs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:signs"
52-
execute if predicate smithed.crafter:block/table/tags/slabs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:slabs"
53-
execute if predicate smithed.crafter:block/table/tags/small_flowers run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:small_flowers"
54-
execute if predicate smithed.crafter:block/table/tags/soul_fire_base_blocks run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:soul_fire_base_blocks"
55-
execute if predicate smithed.crafter:block/table/tags/spruce_logs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:spruce_logs"
56-
execute if predicate smithed.crafter:block/table/tags/stairs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:stairs"
57-
execute if predicate smithed.crafter:block/table/tags/stone_bricks run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:stone_bricks"
58-
execute if predicate smithed.crafter:block/table/tags/stone_crafting_materials run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:stone_crafting_materials"
59-
execute if predicate smithed.crafter:block/table/tags/stone_tool_materials run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:stone_tool_materials"
60-
execute if predicate smithed.crafter:block/table/tags/tall_flowers run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:tall_flowers"
61-
execute if predicate smithed.crafter:block/table/tags/trapdoors run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:trapdoors"
62-
execute if predicate smithed.crafter:block/table/tags/walls run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:walls"
63-
execute if predicate smithed.crafter:block/table/tags/warped_stems run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:warped_stems"
64-
execute if predicate smithed.crafter:block/table/tags/wooden_buttons run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_buttons"
65-
execute if predicate smithed.crafter:block/table/tags/wooden_doors run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_doors"
66-
execute if predicate smithed.crafter:block/table/tags/wooden_fences run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_fences"
67-
execute if predicate smithed.crafter:block/table/tags/wooden_pressure_plates run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_pressure_plates"
68-
execute if predicate smithed.crafter:block/table/tags/wooden_slabs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_slabs"
69-
execute if predicate smithed.crafter:block/table/tags/wooden_stairs run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_stairs"
70-
execute if predicate smithed.crafter:block/table/tags/wooden_trapdoors run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wooden_trapdoors"
71-
execute if predicate smithed.crafter:block/table/tags/wool run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:wool"
72-
73-
function #smithed.crafter:event/query_tags
74-
1+
# auto generated by "smithed_librairies/packs/crafter.py" at build time
2+
# commands in order :
3+
# - data modify storage smithed.crafter:main root.temp.item_tag set value []
4+
# - execute
5+
# if predicate smithed.crafter:block/table/tags/acacia_logs
6+
# run data modify storage smithed.crafter:main root.temp.item_tag append value "#minecraft:acacia_logs"
7+
# - (...) (part auto generated by "smithed_librairies/packs/crafter.py" at build time)
8+
# - function #smithed.crafter:event/query_tags

smithed_libraries/packs/crafter/data/smithed.crafter/functions/impl/block/table/crafting/input/read_barrel.mcfunction

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ execute if entity @s[scores={smithed.data=0}] run function smithed.crafter:impl/
3737
# If something was crafted, add the assembled output nonsense
3838
execute if entity @s[scores={smithed.data=0}] run data remove block ~ ~ ~ Items[{Slot:16b}]
3939
execute if entity @s[scores={smithed.data=1..}] run tag @s add smithed.crafter.assembled_output
40-
data modify entity @s ArmorItems[3].tag.smithed.stored_barrel_data set from block ~ ~ ~ Items
41-
execute if entity @s[scores={smithed.data=1..}] run data modify entity @s ArmorItems[3].tag.smithed.stored_output set from block ~ ~ ~ Items[{Slot:16b}]
40+
data modify entity @s ArmorItems[3].components."minecraft:custom_data".smithed.stored_barrel_data set from block ~ ~ ~ Items
41+
execute if entity @s[scores={smithed.data=1..}] run data modify entity @s ArmorItems[3].components."minecraft:custom_data".smithed.stored_output set from block ~ ~ ~ Items[{Slot:16b}]

smithed_libraries/packs/crafter/data/smithed.crafter/functions/impl/block/table/crafting/manage_invalids/export_output.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ execute if score @s smithed.data matches 0 run tag @s add smithed.no_shift_click
2020
function smithed.crafter:impl/block/table/crafting/manage_invalids/spawn_loop
2121

2222
# Reset the saved tag to have nothing in it because you just exported the output
23-
data modify entity @s ArmorItems[3].tag.smithed.stored_output set value {Slot:16b}
23+
data modify entity @s ArmorItems[3].components."minecraft:custom_data".smithed.stored_output set value {Slot:16b}

smithed_libraries/packs/crafter/data/smithed.crafter/functions/impl/block/table/crafting/manage_invalids/spawn_loop.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
####################
44

55
scoreboard players remove @s smithed.data 1
6-
execute as @p[tag=smithed.inside_crafter,gamemode=!spectator] at @s run summon item ~ ~ ~ {Item:{id:"stone",Count:1b},Tags:["smithed.replace_item","global.ignore"]}
6+
execute as @p[tag=smithed.inside_crafter,gamemode=!spectator] at @s run summon item ~ ~ ~ {Item:{id:"stone",count:1},Tags:["smithed.replace_item","global.ignore"]}
77
data modify entity @e[type=item,limit=1,tag=smithed.replace_item] Item set from storage smithed.crafter:main root.temp.export_items[0]
88
data remove storage smithed.crafter:main root.temp.export_items[0]
99
tag @e[type=item,limit=1,tag=smithed.replace_item] remove smithed.replace_item

smithed_libraries/packs/crafter/data/smithed.crafter/functions/impl/block/table/crafting/output/check.mcfunction

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
####################
44

55
tag @s remove smithed.no_shift_click
6-
execute if data entity @s ArmorItems[3].tag.smithed.stored_output.id run function smithed.crafter:impl/block/table/crafting/manage_invalids/export_output
6+
execute if data entity @s ArmorItems[3].components."minecraft:custom_data".smithed.stored_output.id run function smithed.crafter:impl/block/table/crafting/manage_invalids/export_output
77
execute if entity @s[tag=smithed.crafter.assembled_output] run function smithed.crafter:impl/block/table/crafting/output/clear_input
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
execute unless data storage smithed.crafter:input {flags:["consume_buckets"]} if predicate smithed.crafter:block/table/special_clear/buckets store success score $temp smithed.data run function smithed.crafter:impl/block/table/crafting/output/clear_input/advanced/buckets
2-
execute unless data storage smithed.crafter:input {flags:["consume_tools"]} if predicate smithed.crafter:block/table/special_clear/tools unless data entity @s {HandItems:[{tag:{Unbreakable:1b}}]} run function smithed.crafter:impl/block/table/crafting/output/clear_input/handle_tools
3-
1+
execute unless data storage smithed.crafter:input {flags:["consume_buckets"]} if predicate smithed.crafter:block/table/special_clear/buckets run function smithed.crafter:impl/block/table/crafting/output/clear_input/advanced/buckets
2+
# if the item is a tool, not unbreakable and does not have not_tool:1b
3+
execute
4+
unless data storage smithed.crafter:input {flags:["consume_tools"]}
5+
if items entity @s weapon.mainhand *[minecraft:max_damage,!minecraft:unbreakable,!minecraft:custom_data~{smithed:{not_tool:1b}}]
6+
run function smithed.crafter:impl/block/table/crafting/output/clear_input/handle_tools
47
function #smithed.crafter:event/advanced_remove

0 commit comments

Comments
 (0)