Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
65 changes: 65 additions & 0 deletions gm4/modeldata_registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion gm4/plugins/resource_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@

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
Comment on lines +7 to +8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean Audere is now reliant on Moneo? While that's technically fine while Moneo is in base Metallurgy it might cause problems if Moneo is ever updated / removed since it's unlikely this would be thought of then

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, although this is a change from #1167 which is only mixed in here because I needed to handle overlays of the same files for copper tools. We can definitely move the store_maximum function into the metallurgy namespace if needed though


# 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

# 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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"items": []
}
}
}
}
7 changes: 7 additions & 0 deletions gm4_crossbow_cartridges/beet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also for the other materials, but I feel like this shouldn't play if the torch didn't actually place

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh huh, yeah. Likely a change for a different PR though so I'll make an issue to track it


# kill arrow
kill @s
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"condition": "minecraft:entity_properties",
"entity": "this",
"predicate": {
"equipment": {
"offhand": {
"items": [
"minecraft:copper_torch"
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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}
]
}
10 changes: 0 additions & 10 deletions gm4_desire_lines/data/gm4/tags/item/boots.json

This file was deleted.

Loading
Loading