diff --git a/gm4/modeldata_registry.json b/gm4/modeldata_registry.json index 3887abd244..430a974d53 100644 --- a/gm4/modeldata_registry.json +++ b/gm4/modeldata_registry.json @@ -240,12 +240,77 @@ "gm4_fulcio_shamir:shamir/fulcio": 115, "gm4_animi_shamir:shamir/animi": 124 }, + "copper_axe": { + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/arborenda": 112, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_percurro_shamir:shamir/percurro": 117, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, "copper_block": { "gm4_auto_crafting:guidebook_icon/auto_crafting": 1 }, + "copper_boots": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_desire_lines:shamir/celaro": 118, + "gm4_vecto_shamir:shamir/vecto": 121, + "gm4_metallurgy:shamir/vibro": 123, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_chestplate": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_iacio_shamir:shamir/iacio": 122, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_helmet": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_hoe": { + "gm4_metallurgy:shamir/gemini": 109, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_leggings": { + "gm4_weighted_armour:shamir/helious": 103, + "gm4_metallurgy:shamir/defuse": 106, + "gm4_animi_shamir:shamir/animi": 124 + }, "copper_ore": { "gm4_smelteries:block/ore_display/copper_ore": 2 }, + "copper_pickaxe": { + "gm4_metallurgy:shamir/forterra": 107, + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_lumos_shamir:shamir/lumos": 114, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_shovel": { + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_metallurgy:shamir/moneo": 113, + "gm4_lumos_shamir:shamir/lumos": 114, + "gm4_audere_shamir:shamir/audere": 120, + "gm4_animi_shamir:shamir/animi": 124 + }, + "copper_sword": { + "gm4_metallurgy:shamir/ender_bolt": 105, + "gm4_metallurgy:shamir/musical": 108, + "gm4_metallurgy:shamir/hypexperia": 110, + "gm4_metallurgy:shamir/tinker": 111, + "gm4_orb_of_ankou:shamir/corripio": 116, + "gm4_percurro_shamir:shamir/percurro": 117, + "gm4_animi_shamir:shamir/animi": 124 + }, "crafting_table": { "gm4_custom_crafters:block/custom_crafter": 1, "gm4_standard_crafting:guidebook_icon/standard_crafting": 2, diff --git a/gm4/plugins/resource_pack.py b/gm4/plugins/resource_pack.py index 10c80ff25c..0cb72b79f5 100644 --- a/gm4/plugins/resource_pack.py +++ b/gm4/plugins/resource_pack.py @@ -68,7 +68,7 @@ JsonType = dict[str,Any] CUSTOM_MODEL_PREFIX = 3420000 -MINECRAFT_REFERENECE_VERSION = "1.21.6" +MINECRAFT_REFERENECE_VERSION = "1.21.9" parent_logger = logging.getLogger("gm4.resource_pack") diff --git a/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction b/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction index b726260142..1472f582ea 100644 --- a/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction +++ b/gm4_audere_shamir/data/gm4_audere_shamir/function/active_tool.mcfunction @@ -4,7 +4,8 @@ data modify storage gm4_audere_shamir:temp/player/tool SelectedItem set from entity @s SelectedItem execute store result score $tool_current_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:damage" -execute store result score $tool_max_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:custom_data".gm4_audere_shamir.max_durability +execute store result score $tool_max_damage gm4_ml_data run data get storage gm4_audere_shamir:temp/player/tool SelectedItem.components."minecraft:custom_data".MaxDurability +# | MaxDamage is set by gm4_moneo_shamir:store_maximum # update newly upgraded netherite gear execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_audere_shamir:holding_netherite run function gm4_audere_shamir:update_netherite @@ -12,10 +13,12 @@ execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_aude # activate audere execute if score $tool_max_damage gm4_ml_data matches 59 run function gm4_audere_shamir:tools/materials/wood execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_audere_shamir:tools/materials/stone +execute if score $tool_max_damage gm4_ml_data matches 190 run function gm4_audere_shamir:tools/materials/copper execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_audere_shamir:tools/materials/iron execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_audere_shamir:tools/materials/diamond execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_audere_shamir:tools/materials/netherite -execute if score $tool_max_damage gm4_ml_data matches 33 run function gm4_audere_shamir:tools/materials/gold +# | gold used to be listed as 33 max damage, this is kept for compatibility with old items +execute if score $tool_max_damage gm4_ml_data matches 32..33 run function gm4_audere_shamir:tools/materials/gold execute if score $tool_max_damage gm4_ml_data matches 237 run function gm4_audere_shamir:tools/shears # reset storage and fake players diff --git a/gm4_audere_shamir/data/gm4_audere_shamir/function/store_maximum.mcfunction b/gm4_audere_shamir/data/gm4_audere_shamir/function/store_maximum.mcfunction deleted file mode 100644 index 674f9c1f6d..0000000000 --- a/gm4_audere_shamir/data/gm4_audere_shamir/function/store_maximum.mcfunction +++ /dev/null @@ -1,37 +0,0 @@ -# @s = Audere tool item -# run from #gm4_metallurgy:apply_band - -execute store success score $success gm4_ml_data if items entity @s contents minecraft:netherite_shovel run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 2031 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:netherite_pickaxe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 2031 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:netherite_hoe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 2031 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:netherite_axe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 2031 - -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:diamond_shovel run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 1561 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:diamond_pickaxe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 1561 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:diamond_hoe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 1561 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:diamond_axe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 1561 - -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:iron_shovel run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 250 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:iron_pickaxe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 250 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:iron_hoe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 250 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:iron_axe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 250 - -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:stone_shovel run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 131 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:stone_pickaxe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 131 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:stone_hoe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 131 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:stone_axe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 131 - -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:wooden_shovel run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 59 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:wooden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 59 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:wooden_hoe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 59 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:wooden_axe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 59 - -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 33 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 33 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 33 -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 33 - -execute unless score $success gm4_ml_data matches 1.. store success score $success gm4_ml_data if items entity @s contents minecraft:shears run data modify entity @s Item.components."minecraft:custom_data".gm4_audere_shamir.max_durability set value 237 - -# reset fake player -scoreboard players reset $success gm4_ml_data diff --git a/gm4_audere_shamir/data/gm4_audere_shamir/function/tools/materials/copper.mcfunction b/gm4_audere_shamir/data/gm4_audere_shamir/function/tools/materials/copper.mcfunction new file mode 100644 index 0000000000..6925868d69 --- /dev/null +++ b/gm4_audere_shamir/data/gm4_audere_shamir/function/tools/materials/copper.mcfunction @@ -0,0 +1,10 @@ +# @s = player holding an Audere tool +# at @s +# run from active_tool + +scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data + +execute if score $tool_max_damage gm4_ml_data matches 52..139 run effect give @s minecraft:haste 2 0 +execute if score $tool_max_damage gm4_ml_data matches 20..51 run effect give @s minecraft:haste 2 1 +execute if score $tool_max_damage gm4_ml_data matches 8..19 run effect give @s minecraft:haste 2 2 +execute if score $tool_max_damage gm4_ml_data matches ..7 run effect give @s minecraft:haste 2 3 diff --git a/gm4_audere_shamir/data/gm4_metallurgy/tags/function/apply_band.json b/gm4_audere_shamir/data/gm4_metallurgy/tags/function/apply_band.json deleted file mode 100644 index 977ecbaf1e..0000000000 --- a/gm4_audere_shamir/data/gm4_metallurgy/tags/function/apply_band.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "values": [ - "gm4_audere_shamir:store_maximum" - ] -} diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction new file mode 100644 index 0000000000..9e2a59342c --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction @@ -0,0 +1,33 @@ +# Check item in offhand to shoot +# @s = player using the crossbow +# at arrow +# run from shoot/any_arrow + +# tripwire +execute if entity @s[gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/string,x_rotation=-15..15] align xyz positioned ~0.5 ~ ~0.5 run function gm4_crossbow_cartridges:cables/shoot_arrow + +# bucket with fish/axolotl +execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/bucket] run function gm4_crossbow_cartridges:projectile/bucket + +# torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/torch] run function gm4_crossbow_cartridges:projectile/torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/redstone_torch] run function gm4_crossbow_cartridges:projectile/redstone_torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/soul_torch] run function gm4_crossbow_cartridges:projectile/soul_torch + +# potions +execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/potions] run function gm4_crossbow_cartridges:projectile/potions + +# fireball +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/fire_charge] run function gm4_crossbow_cartridges:projectile/fireball + +# wind charge +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/wind_charge] run function gm4_crossbow_cartridges:projectile/wind_charge + +# tnt +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/tnt] run function gm4_crossbow_cartridges:projectile/tnt + +# beehive +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/beehive] run function gm4_crossbow_cartridges:projectile/beehive + +tag @s remove gm4_cb_use +data remove storage gm4_crossbow_cartridges:temp projectile diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction new file mode 100644 index 0000000000..a0bc60df4a --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction @@ -0,0 +1,6 @@ +# Check blocks, to place or drop copper torch +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/loop + +# EMPTY TO AVOID ERRORS diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction new file mode 100644 index 0000000000..7e91ca513a --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction @@ -0,0 +1,6 @@ +# Place copper torch on a valid adjacent block +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/check + +# EMPTY TO AVOID ERRORS diff --git a/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json new file mode 100644 index 0000000000..208cd14970 --- /dev/null +++ b/gm4_crossbow_cartridges/backport_81/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json @@ -0,0 +1,11 @@ +{ + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "offhand": { + "items": [] + } + } + } +} diff --git a/gm4_crossbow_cartridges/beet.yaml b/gm4_crossbow_cartridges/beet.yaml index 9e1ada4a69..ac816a7e6c 100644 --- a/gm4_crossbow_cartridges/beet.yaml +++ b/gm4_crossbow_cartridges/beet.yaml @@ -4,6 +4,13 @@ version: 1.8.X data_pack: load: . + overlays: + - formats: + min_inclusive: 0 + max_inclusive: 81 + min_format: 0 + max_format: 81 + directory: backport_81 pipeline: - gm4.plugins.extend.module diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction index 7dd5dd7827..a5525466f2 100644 --- a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/check_projectile.mcfunction @@ -1,7 +1,7 @@ # Check item in offhand to shoot # @s = player using the crossbow # at arrow -# run from functions in shoot/ +# run from shoot/any_arrow # tripwire execute if entity @s[gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/string,x_rotation=-15..15] align xyz positioned ~0.5 ~ ~0.5 run function gm4_crossbow_cartridges:cables/shoot_arrow @@ -13,6 +13,7 @@ execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/buc execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/torch] run function gm4_crossbow_cartridges:projectile/torch execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/redstone_torch] run function gm4_crossbow_cartridges:projectile/redstone_torch execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/soul_torch] run function gm4_crossbow_cartridges:projectile/soul_torch +execute if entity @s[tag=!gm4_cb_use,gamemode=!adventure,predicate=gm4_crossbow_cartridges:items/copper_torch] run function gm4_crossbow_cartridges:projectile/copper_torch # potions execute if entity @s[tag=!gm4_cb_use,predicate=gm4_crossbow_cartridges:items/potions] run function gm4_crossbow_cartridges:projectile/potions diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch.mcfunction new file mode 100644 index 0000000000..ad725c9fd1 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch.mcfunction @@ -0,0 +1,22 @@ +# Shoot copper torch +# @s = player using the crossbow +# at arrow +# run from check_projectile and projectile/copper_torch + +tag @s add gm4_cb_use + +# add tag to arrow +tag @e[tag=gm4_cb_arrow,distance=..1,sort=nearest,limit=1] add gm4_cb_ctorch + +# add fire to arrow +data merge entity @e[tag=gm4_cb_arrow,tag=gm4_cb_ctorch,distance=..1,sort=nearest,limit=1] {Fire:2000s} +tag @e[tag=gm4_cb_arrow,tag=gm4_cb_ctorch,distance=..1,sort=nearest,limit=1] remove gm4_cb_arrow + +# clear copper torch from player +item modify entity @s[gamemode=!creative] weapon.offhand gm4_crossbow_cartridges:remove_item + +# repeat +execute if entity @e[tag=gm4_cb_arrow,distance=..1,sort=nearest,limit=1] if entity @s[predicate=gm4_crossbow_cartridges:items/copper_torch] run function gm4_crossbow_cartridges:projectile/copper_torch + +# start loop to check if arrow is in ground +schedule function gm4_crossbow_cartridges:projectile/copper_torch/loop 4t diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction new file mode 100644 index 0000000000..44ce788df3 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/check.mcfunction @@ -0,0 +1,19 @@ +# Check blocks, to place or drop copper torch +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/loop + +# summon torch item if torch already exists at this block +execute if block ~ ~ ~ #gm4_crossbow_cartridges:torch run loot spawn ~ ~ ~ loot minecraft:blocks/copper_torch + +# place torch if possible +execute if block ~ ~ ~ #gm4:replaceable run function gm4_crossbow_cartridges:projectile/copper_torch/place + +# summon torch item if placing torch failed +execute unless block ~ ~ ~ #gm4_crossbow_cartridges:torch run loot spawn ~ ~ ~ loot minecraft:blocks/copper_torch + +# place block sound +playsound minecraft:block.wood.place block @a[distance=..15] + +# kill arrow +kill @s diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/loop.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/loop.mcfunction new file mode 100644 index 0000000000..b79d883595 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/loop.mcfunction @@ -0,0 +1,6 @@ +# Check arrow with tag gm4_cb_ctorch +# run from projectile/copper_torch +# scheduled by projectile/copper_torch/loop + +execute as @e[tag=gm4_cb_ctorch,nbt={inGround:1b}] at @s run function gm4_crossbow_cartridges:projectile/copper_torch/check +execute if entity @e[tag=gm4_cb_ctorch,limit=1] run schedule function gm4_crossbow_cartridges:projectile/copper_torch/loop 4t diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction new file mode 100644 index 0000000000..f968a8f2c7 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/function/projectile/copper_torch/place.mcfunction @@ -0,0 +1,10 @@ +# Place copper torch on a valid adjacent block +# @s = arrow with tag gm4_cb_ctorch, in a block +# at @s +# run from projectile/copper_torch/check + +execute positioned ~.05 ~ ~ if predicate gm4_crossbow_cartridges:check_block/east run setblock ~-.1 ~ ~ minecraft:copper_wall_torch[facing=west] +execute positioned ~ ~ ~.05 if predicate gm4_crossbow_cartridges:check_block/south run setblock ~ ~ ~-.1 minecraft:copper_wall_torch[facing=north] +execute positioned ~-.05 ~ ~ if predicate gm4_crossbow_cartridges:check_block/west run setblock ~.1 ~ ~ minecraft:copper_wall_torch[facing=east] +execute positioned ~ ~ ~-.05 if predicate gm4_crossbow_cartridges:check_block/north run setblock ~ ~ ~.1 minecraft:copper_wall_torch[facing=south] +execute positioned ~ ~-.05 ~ if predicate gm4_crossbow_cartridges:check_block/below run setblock ~ ~.1 ~ minecraft:copper_torch diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json new file mode 100644 index 0000000000..6f62ab1ad8 --- /dev/null +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/predicate/items/copper_torch.json @@ -0,0 +1,13 @@ +{ + "condition": "minecraft:entity_properties", + "entity": "this", + "predicate": { + "equipment": { + "offhand": { + "items": [ + "minecraft:copper_torch" + ] + } + } + } +} diff --git a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json index c83f4ba735..aac4b1bf51 100644 --- a/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json +++ b/gm4_crossbow_cartridges/data/gm4_crossbow_cartridges/tags/block/torch.json @@ -3,8 +3,10 @@ "minecraft:torch", "minecraft:soul_torch", "minecraft:redstone_torch", + {"id": "minecraft:copper_torch", "required": false}, "minecraft:wall_torch", "minecraft:soul_wall_torch", - "minecraft:redstone_wall_torch" + "minecraft:redstone_wall_torch", + {"id": "minecraft:copper_wall_torch", "required": false} ] } diff --git a/gm4_desire_lines/data/gm4/tags/item/boots.json b/gm4_desire_lines/data/gm4/tags/item/boots.json deleted file mode 100644 index 6e94be5e38..0000000000 --- a/gm4_desire_lines/data/gm4/tags/item/boots.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "values": [ - "minecraft:netherite_boots", - "minecraft:diamond_boots", - "minecraft:golden_boots", - "minecraft:chainmail_boots", - "minecraft:iron_boots", - "minecraft:leather_boots" - ] -} diff --git a/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json b/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json index 0a924ec8de..46c5da00f3 100644 --- a/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json +++ b/gm4_desire_lines/data/gm4_celaro_shamir/predicate/shamir_active.json @@ -4,7 +4,7 @@ "predicate": { "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{active_shamir:\"celaro\"}}" } diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction new file mode 100644 index 0000000000..fbc4d71983 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction @@ -0,0 +1,13 @@ +# @s = unspecified +# at = unspecified +# run from gm4_metallurgy:init + +scoreboard objectives add gm4_use_axe_net minecraft.used:minecraft.netherite_axe +scoreboard objectives add gm4_use_axe_dia minecraft.used:minecraft.diamond_axe +scoreboard objectives add gm4_use_axe_gol minecraft.used:minecraft.golden_axe +scoreboard objectives add gm4_use_axe_iro minecraft.used:minecraft.iron_axe +scoreboard objectives add gm4_use_axe_sto minecraft.used:minecraft.stone_axe +scoreboard objectives add gm4_use_axe_woo minecraft.used:minecraft.wooden_axe +scoreboard objectives add gm4_arb_depth dummy +scoreboard objectives add gm4_arb_data dummy +scoreboard players set #1 gm4_arb_data 1 diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction new file mode 100644 index 0000000000..a956ef2250 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction @@ -0,0 +1,26 @@ +# Calculates the speed of the axe used to break blocks. +# @s = player that just used an axe with arborenda +# at @s +# run from gm4_arborenda:player/chop + +# safe axe nbt (also used to calculate unbreaking numbers in gm4_arborenda_shamir:player/modify_axe_durability) +data modify storage gm4_arborenda_shamir:temp tool set from entity @s SelectedItem + +# set base material speed / breaking delay between block breaks +execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $axe_delay gm4_arb_data 5 +execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $axe_delay gm4_arb_data 6 +execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $axe_delay gm4_arb_data 3 +execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $axe_delay gm4_arb_data 8 +execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $axe_delay gm4_arb_data 13 +execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $axe_delay gm4_arb_data 22 + +# efficiency bonus (simplified formula, does not match vanilla) +execute store result score $efficiency_level gm4_arb_data run data get storage gm4_arborenda_shamir:temp tool.components."minecraft:enchantments"."minecraft:efficiency" +scoreboard players operation $axe_delay gm4_arb_data -= $efficiency_level gm4_arb_data + +# limit to min delay of 1 tick between block breaks +scoreboard players operation $axe_delay gm4_arb_data > #1 gm4_arb_data + +# calculate max depth +scoreboard players set $max_depth gm4_arb_data 32 +scoreboard players operation $max_depth gm4_arb_data *= $axe_delay gm4_arb_data diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction new file mode 100644 index 0000000000..11d23e047e --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction @@ -0,0 +1,17 @@ +# Checks whether the player has used an arborenda axe. +# @s = all players +# at world spawn +# run from gm4_metallurgy:tick + +execute if entity @s[scores={gm4_use_axe_net=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_dia=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_gol=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_iro=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_sto=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_woo=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +scoreboard players reset @s gm4_use_axe_net +scoreboard players reset @s gm4_use_axe_dia +scoreboard players reset @s gm4_use_axe_gol +scoreboard players reset @s gm4_use_axe_iro +scoreboard players reset @s gm4_use_axe_sto +scoreboard players reset @s gm4_use_axe_woo diff --git a/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction new file mode 100644 index 0000000000..24d5cba6c8 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction @@ -0,0 +1,27 @@ +# Reduces the durability on an arborenda axe according to the amount of blocks broken. +# @s = player that just used an axe with arborenda +# at @s +# run from gm4_arborenda:player/chop + +# get max damage - 1 for material type +execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $max_damage gm4_arb_data 2030 +execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $max_damage gm4_arb_data 1560 +execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 31 +execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $max_damage gm4_arb_data 249 +execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $max_damage gm4_arb_data 130 +execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $max_damage gm4_arb_data 58 + +# get unbreaking level +execute store result score $unbreaking_level gm4_arb_data run data get storage gm4_arborenda_shamir:temp tool.components."minecraft:enchantments"."minecraft:unbreaking" +scoreboard players add $unbreaking_level gm4_arb_data 1 +scoreboard players set $damage_chance gm4_arb_data 100 +scoreboard players operation $damage_chance gm4_arb_data /= $unbreaking_level gm4_arb_data + +# calclulate and apply damage +execute store result score $current_damage gm4_arb_data run data get storage gm4_arborenda_shamir:temp tool.components."minecraft:damage" +execute store result score $incoming_damage gm4_arb_data run loot spawn ~ -4096 ~ loot gm4_arborenda_shamir:roll_binomial_distribution +scoreboard players operation $current_damage gm4_arb_data += $incoming_damage gm4_arb_data +scoreboard players operation $current_damage gm4_arb_data < $max_damage gm4_arb_data + +execute store result storage gm4_arborenda_shamir:temp damage int 1 run scoreboard players get $current_damage gm4_arb_data +function gm4_arborenda_shamir:player/set_damage with storage gm4_arborenda_shamir:temp diff --git a/gm4_metallurgy/backport_81/data/gm4_moneo_shamir/function/store_maximum.mcfunction b/gm4_metallurgy/backport_81/data/gm4_moneo_shamir/function/store_maximum.mcfunction new file mode 100644 index 0000000000..7ae08dd796 --- /dev/null +++ b/gm4_metallurgy/backport_81/data/gm4_moneo_shamir/function/store_maximum.mcfunction @@ -0,0 +1,42 @@ +# run from #gm4_metallurgy:apply_band +# @s = moneo tool item + +# used by Audere Shamir as well +execute if items entity @s contents minecraft:wooden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 +execute if items entity @s contents minecraft:wooden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 +execute if items entity @s contents minecraft:wooden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 +execute if items entity @s contents minecraft:wooden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 + +execute if items entity @s contents minecraft:stone_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:stone_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:stone_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:stone_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 + +execute if items entity @s contents minecraft:copper_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 + +execute if items entity @s contents minecraft:iron_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 +execute if items entity @s contents minecraft:iron_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 +execute if items entity @s contents minecraft:iron_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 +execute if items entity @s contents minecraft:iron_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 + +execute if items entity @s contents minecraft:diamond_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 +execute if items entity @s contents minecraft:diamond_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 +execute if items entity @s contents minecraft:diamond_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 +execute if items entity @s contents minecraft:diamond_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 1561 + +execute if items entity @s contents minecraft:netherite_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 +execute if items entity @s contents minecraft:netherite_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 +execute if items entity @s contents minecraft:netherite_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 +execute if items entity @s contents minecraft:netherite_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 + +execute if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 + +execute if items entity @s contents minecraft:shears run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 237 + +execute if items entity @s contents minecraft:elytra run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 432 diff --git a/gm4_metallurgy/beet.yaml b/gm4_metallurgy/beet.yaml index 0e48265243..5f6f2b542b 100644 --- a/gm4_metallurgy/beet.yaml +++ b/gm4_metallurgy/beet.yaml @@ -4,6 +4,13 @@ version: 1.7.X data_pack: load: . + overlays: + - formats: + min_inclusive: 0 + max_inclusive: 81 + min_format: 0 + max_format: 81 + directory: backport_81 resource_pack: load: . diff --git a/gm4_metallurgy/data/gm4/tags/item/boots.json b/gm4_metallurgy/data/gm4/tags/item/boots.json deleted file mode 100644 index 6e94be5e38..0000000000 --- a/gm4_metallurgy/data/gm4/tags/item/boots.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "values": [ - "minecraft:netherite_boots", - "minecraft:diamond_boots", - "minecraft:golden_boots", - "minecraft:chainmail_boots", - "minecraft:iron_boots", - "minecraft:leather_boots" - ] -} diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction new file mode 100644 index 0000000000..e1c63f7066 --- /dev/null +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/init_scoreboards.mcfunction @@ -0,0 +1,14 @@ +# @s = unspecified +# at = unspecified +# run from gm4_metallurgy:init + +scoreboard objectives add gm4_use_axe_net minecraft.used:minecraft.netherite_axe +scoreboard objectives add gm4_use_axe_dia minecraft.used:minecraft.diamond_axe +scoreboard objectives add gm4_use_axe_gol minecraft.used:minecraft.golden_axe +scoreboard objectives add gm4_use_axe_iro minecraft.used:minecraft.iron_axe +scoreboard objectives add gm4_use_axe_cop minecraft.used:minecraft.copper_axe +scoreboard objectives add gm4_use_axe_sto minecraft.used:minecraft.stone_axe +scoreboard objectives add gm4_use_axe_woo minecraft.used:minecraft.wooden_axe +scoreboard objectives add gm4_arb_depth dummy +scoreboard objectives add gm4_arb_data dummy +scoreboard players set #1 gm4_arb_data 1 diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction index a956ef2250..1b0f4dda07 100644 --- a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/analyze_axe.mcfunction @@ -11,6 +11,7 @@ execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $axe_ execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $axe_delay gm4_arb_data 6 execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $axe_delay gm4_arb_data 3 execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $axe_delay gm4_arb_data 8 +execute if score @s gm4_use_axe_cop matches 1.. run scoreboard players set $axe_delay gm4_arb_data 10 execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $axe_delay gm4_arb_data 13 execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $axe_delay gm4_arb_data 22 diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction index 11d23e047e..514285705c 100644 --- a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/check_for_axe.mcfunction @@ -6,12 +6,14 @@ execute if entity @s[scores={gm4_use_axe_net=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_dia=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_gol=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop +execute if entity @s[scores={gm4_use_axe_cop=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_iro=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_sto=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop execute if entity @s[scores={gm4_use_axe_woo=1..},predicate=gm4_metallurgy:arborenda_active] at @s run function gm4_arborenda_shamir:player/chop scoreboard players reset @s gm4_use_axe_net scoreboard players reset @s gm4_use_axe_dia scoreboard players reset @s gm4_use_axe_gol +scoreboard players reset @s gm4_use_axe_cop scoreboard players reset @s gm4_use_axe_iro scoreboard players reset @s gm4_use_axe_sto scoreboard players reset @s gm4_use_axe_woo diff --git a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction index 979b68e605..e30fbc0369 100644 --- a/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction +++ b/gm4_metallurgy/data/gm4_arborenda_shamir/function/player/modify_axe_durability.mcfunction @@ -3,11 +3,12 @@ # at @s # run from gm4_arborenda:player/chop -# get max damage for material type +# get max damage - 1 for material type execute if score @s gm4_use_axe_net matches 1.. run scoreboard players set $max_damage gm4_arb_data 2030 execute if score @s gm4_use_axe_dia matches 1.. run scoreboard players set $max_damage gm4_arb_data 1560 -execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 32 +execute if score @s gm4_use_axe_gol matches 1.. run scoreboard players set $max_damage gm4_arb_data 31 execute if score @s gm4_use_axe_iro matches 1.. run scoreboard players set $max_damage gm4_arb_data 249 +execute if score @s gm4_use_axe_cop matches 1.. run scoreboard players set $max_damage gm4_arb_data 189 execute if score @s gm4_use_axe_sto matches 1.. run scoreboard players set $max_damage gm4_arb_data 130 execute if score @s gm4_use_axe_woo matches 1.. run scoreboard players set $max_damage gm4_arb_data 58 diff --git a/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction b/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction index 68746dbb55..bab2d87dbe 100644 --- a/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction +++ b/gm4_metallurgy/data/gm4_gemini_shamir/function/breed/check_allay.mcfunction @@ -1,5 +1,5 @@ # run from breed_allay.json (advancement) # @s = player who has bred a mob -execute if predicate gm4_gemini_shamir:holding_gemini as @e[type=allay,distance=..10,limit=1,sort=nearest,nbt={DuplicationCooldown:6000L}] at @s run summon allay ~ ~ ~ {DuplicationCooldown:6000L,CanDuplicate:0b} +execute if predicate gm4_gemini_shamir:holding_gemini as @e[type=allay,distance=..10,limit=1,sort=nearest,nbt={DuplicationCooldown:6000L}] at @s run summon allay ~ ~ ~ {DuplicationCooldown:6000L} advancement revoke @s only gm4_gemini_shamir:breed_allay diff --git a/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction b/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction index 0adfcc9b53..8a5b24f60c 100644 --- a/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction +++ b/gm4_metallurgy/data/gm4_metallurgy/function/init.mcfunction @@ -7,15 +7,7 @@ scoreboard objectives add gm4_ml_ore_bi dummy scoreboard objectives add gm4_ml_ore_th dummy #arborenda -scoreboard objectives add gm4_use_axe_net minecraft.used:minecraft.netherite_axe -scoreboard objectives add gm4_use_axe_dia minecraft.used:minecraft.diamond_axe -scoreboard objectives add gm4_use_axe_gol minecraft.used:minecraft.golden_axe -scoreboard objectives add gm4_use_axe_iro minecraft.used:minecraft.iron_axe -scoreboard objectives add gm4_use_axe_sto minecraft.used:minecraft.stone_axe -scoreboard objectives add gm4_use_axe_woo minecraft.used:minecraft.wooden_axe -scoreboard objectives add gm4_arb_depth dummy -scoreboard objectives add gm4_arb_data dummy -scoreboard players set #1 gm4_arb_data 1 +function gm4_arborenda_shamir:init_scoreboards #declare gm4_arborenda_shamir:temp #ender_bolt diff --git a/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json b/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json index c9a844a875..14bf7dfa05 100644 --- a/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json +++ b/gm4_metallurgy/data/gm4_metallurgy/predicate/vibro_active.json @@ -4,7 +4,7 @@ "predicate": { "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{has_shamir:1b,active_shamir:'vibro'}}" } diff --git a/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction b/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction index 3c8fb388ca..e8c439dc64 100644 --- a/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction +++ b/gm4_metallurgy/data/gm4_moneo_shamir/function/active_tool.mcfunction @@ -13,8 +13,10 @@ execute if score $tool_max_damage gm4_ml_data matches 1561 if predicate gm4_mone # activate moneo execute if score $tool_max_damage gm4_ml_data matches 59 run function gm4_moneo_shamir:tools/materials/wood execute if score $tool_max_damage gm4_ml_data matches 131 run function gm4_moneo_shamir:tools/materials/stone +execute if score $tool_max_damage gm4_ml_data matches 190 run function gm4_moneo_shamir:tools/materials/copper execute if score $tool_max_damage gm4_ml_data matches 250 run function gm4_moneo_shamir:tools/materials/iron execute if score $tool_max_damage gm4_ml_data matches 1561 run function gm4_moneo_shamir:tools/materials/diamond execute if score $tool_max_damage gm4_ml_data matches 2031 run function gm4_moneo_shamir:tools/materials/netherite -execute if score $tool_max_damage gm4_ml_data matches 33 run function gm4_moneo_shamir:tools/materials/gold +# | gold used to be listed as 33 max damage, this is kept for compatibility with old items +execute if score $tool_max_damage gm4_ml_data matches 32..33 run function gm4_moneo_shamir:tools/materials/gold execute if score $tool_max_damage gm4_ml_data matches 237 run function gm4_moneo_shamir:tools/shears diff --git a/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction b/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction index 513e5ccb10..7ae08dd796 100644 --- a/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction +++ b/gm4_metallurgy/data/gm4_moneo_shamir/function/store_maximum.mcfunction @@ -1,6 +1,7 @@ # run from #gm4_metallurgy:apply_band # @s = moneo tool item +# used by Audere Shamir as well execute if items entity @s contents minecraft:wooden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 execute if items entity @s contents minecraft:wooden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 execute if items entity @s contents minecraft:wooden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 59 @@ -11,6 +12,11 @@ execute if items entity @s contents minecraft:stone_pickaxe run data modify enti execute if items entity @s contents minecraft:stone_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 execute if items entity @s contents minecraft:stone_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 131 +execute if items entity @s contents minecraft:copper_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 +execute if items entity @s contents minecraft:copper_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 190 + execute if items entity @s contents minecraft:iron_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 execute if items entity @s contents minecraft:iron_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 execute if items entity @s contents minecraft:iron_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 250 @@ -26,10 +32,10 @@ execute if items entity @s contents minecraft:netherite_pickaxe run data modify execute if items entity @s contents minecraft:netherite_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 execute if items entity @s contents minecraft:netherite_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 2031 -execute if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33 -execute if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33 -execute if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33 -execute if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 33 +execute if items entity @s contents minecraft:golden_shovel run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_pickaxe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_hoe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 +execute if items entity @s contents minecraft:golden_axe run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 32 execute if items entity @s contents minecraft:shears run data modify entity @s Item.components."minecraft:custom_data".MaxDurability set value 237 diff --git a/gm4_metallurgy/data/gm4_moneo_shamir/function/tools/materials/copper.mcfunction b/gm4_metallurgy/data/gm4_moneo_shamir/function/tools/materials/copper.mcfunction new file mode 100644 index 0000000000..dc57284f80 --- /dev/null +++ b/gm4_metallurgy/data/gm4_moneo_shamir/function/tools/materials/copper.mcfunction @@ -0,0 +1,8 @@ +# run from active_tool +# @s = player holding the moneo tool + +scoreboard players operation $tool_max_damage gm4_ml_data -= $tool_current_damage gm4_ml_data + +execute if score $tool_max_damage gm4_ml_data matches 16..30 run effect give @s minecraft:mining_fatigue 2 0 +execute if score $tool_max_damage gm4_ml_data matches ..30 at @s run playsound minecraft:block.lantern.hit master @s ~ ~ ~ 5 1 +execute if score $tool_max_damage gm4_ml_data matches ..15 run effect give @s minecraft:mining_fatigue 2 1 diff --git a/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json b/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json index 0a26f74435..ee5875a512 100644 --- a/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json +++ b/gm4_metallurgy/data/gm4_vibro_shamir/advancement/vibro_fall_damage.json @@ -24,7 +24,7 @@ }, "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{active_shamir:'vibro'}}" } diff --git a/gm4_metallurgy/shamir_model_template.py b/gm4_metallurgy/shamir_model_template.py index 7ea27736c5..1efd85fd89 100644 --- a/gm4_metallurgy/shamir_model_template.py +++ b/gm4_metallurgy/shamir_model_template.py @@ -12,8 +12,8 @@ parent_logger = logging.getLogger("gm4."+__name__) -TOOL_MATERIALS = ["wooden", "stone", "iron", "golden", "diamond", "netherite"] -ARMOR_MATERIALS = ["leather", "chainmail", "iron", "golden", "diamond", "netherite"] +TOOL_MATERIALS = ["wooden", "stone", "copper", "iron", "golden", "diamond", "netherite"] +ARMOR_MATERIALS = ["leather", "copper", "chainmail", "iron", "golden", "diamond", "netherite"] TOOLS = ["axe", "hoe", "pickaxe", "shovel"] ARMOR = ["boots", "chestplate", "helmet", "leggings"] BUCKETABLE = ["water", "lava", "milk", "powder_snow", "cod", "salmon", "pufferfish", "tropical_fish", "tadpole", "axolotl"] @@ -221,7 +221,7 @@ def beet_default(ctx: Context): # bind context object to a ClassVar so it can be accessed later during template processing ShamirTemplate.bound_ctx = ctx vanilla = ctx.inject(Vanilla) - vanilla.minecraft_version = '1.21.5' + vanilla.minecraft_version = '1.21.9' ShamirTemplate.vanilla_models_jar = vanilla.mount("assets/minecraft/items") merge_policy(ctx) diff --git a/gm4_vecto_shamir/data/gm4/tags/item/boots.json b/gm4_vecto_shamir/data/gm4/tags/item/boots.json deleted file mode 100644 index 6e94be5e38..0000000000 --- a/gm4_vecto_shamir/data/gm4/tags/item/boots.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "values": [ - "minecraft:netherite_boots", - "minecraft:diamond_boots", - "minecraft:golden_boots", - "minecraft:chainmail_boots", - "minecraft:iron_boots", - "minecraft:leather_boots" - ] -} diff --git a/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json b/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json index 46c4811539..8ad16caaa8 100644 --- a/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json +++ b/gm4_vecto_shamir/data/gm4_vecto_shamir/predicate/sneak_validblock.json @@ -8,7 +8,7 @@ }, "equipment": { "feet": { - "items": "#gm4:boots", + "items": "#minecraft:foot_armor", "predicates": { "minecraft:custom_data": "{gm4_metallurgy:{has_shamir:1b,active_shamir:'vecto'}}" }