Skip to content

Metallurgy 1.21: Lore Line Shrink #1078

New issue

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

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

Already on GitHub? Sign in to your account

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.animi",
"fallback": "Animi",
"fallback": "Animi Shamir",
"italic": false,
"color": "gray"
}
Expand Down
2 changes: 1 addition & 1 deletion gm4_animi_shamir/translations.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key,en_us
item.gm4.shamir.animi,Animi
item.gm4.shamir.animi,Animi Shamir
text.gm4.guidebook.module_desc.animi_shamir,Adds the Animi Shamir to Metallurgy. Items with Animi will respawn with you when you die!
text.gm4.guidebook.animi_shamir.description,Animi allows items to return to their owner upon death.
text.gm4.guidebook.animi_shamir.usage,"The Animi Shamir is found on Curie's Bismium Bands. It can be placed onto tools, armour, weapons, and elytra.\n\nAnimi items do not drop when the owner dies, instead appearing in their inventory upon respawning."
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.audere",
"fallback": "Audere",
"fallback": "Audere Shamir",
"italic": false,
"color": "gray"
}
Expand Down
2 changes: 1 addition & 1 deletion gm4_audere_shamir/translations.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key,en_us
item.gm4.shamir.audere,Audere
item.gm4.shamir.audere,Audere Shamir
text.gm4.guidebook.module_desc.audere_shamir,Adds the shamir 'Audere' to Metallurgy. Gain Haste with low durability tools.
text.gm4.guidebook.audere_shamir.description,"Audere buffs mining speed, as durability decreases."
text.gm4.guidebook.audere_shamir.usage,The Audere Shamir is found on Barium Bands. It can be placed onto tools.\n\nHigher levels of Haste are awarded for lower durability (percentage-based).\n\nThe maximum level of Haste is IV.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.celaro",
"fallback": "Celaro",
"fallback": "Celaro Shamir",
"italic": false,
"color": "gray"
}
Expand Down
2 changes: 1 addition & 1 deletion gm4_desire_lines/translations.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key,en_us
item.gm4.shamir.celaro,Celaro
item.gm4.shamir.celaro,Celaro Shamir
advancement.gm4.desire_lines.walk_8000.title,And I Would Walk 500 Chunks...
advancement.gm4.desire_lines.walk_8000.description,Ruin 8000 blocks to coarse dirt; you'll find those oak planks
advancement.gm4.desire_lines.walk_10000.title,That's a Lot of Damage
Expand Down
2 changes: 1 addition & 1 deletion gm4_fulcio_shamir/assets/translations.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key,en_us
item.gm4.shamir.fulcio,Fulcio
item.gm4.shamir.fulcio,Fulcio Shamir
text.gm4.guidebook.module_desc.fulcio_shamir,Adds the shamir 'Fulcio' to Metallurgy. It allows you to place blocks in mid-air! This also enables you to choose the orientation of blocks like logs without needing a supporting block.
text.gm4.guidebook.fulcio_shamir.description,"Fulcio changes block placement. While sneaking, blocks can be placed in mid-air."
text.gm4.guidebook.fulcio_shamir.usage,The Fulcio Shamir is found on Barimium Bands. It can be placed onto compasses.\n\nHolding the tool and sneaking will create a temporary space where blocks can be placed.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.fulcio",
"fallback": "Fulcio",
"fallback": "Fulcio Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.iacio",
"fallback": "Iacio",
"fallback": "Iacio Shamir",
"italic": false,
"color": "gray"
}
Expand Down
2 changes: 1 addition & 1 deletion gm4_iacio_shamir/translations.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key,en_us
item.gm4.shamir.iacio,Iacio
item.gm4.shamir.iacio,Iacio Shamir
text.gm4.guidebook.module_desc.iacio_shamir,Adds the 'Iacio' shamir to Metallurgy. It lets you throw things further! Launch an Ender Pearl into orbit or simply throw your Trident exceptionally far.
text.gm4.guidebook.iacio_shamir.description,Iacio strengthens the throw of projectiles and items.
text.gm4.guidebook.iacio_shamir.usage,"The Iacio Shamir is found on Barium Bands. It can be placed onto chestplates.\n\nItems, Tridents, Ender Pearls, Splash and Lingering Potions, Snowballs, and Eggs will fly farther when thrown."
2 changes: 1 addition & 1 deletion gm4_lumos_shamir/assets/translations.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
key,en_us
item.gm4.shamir.lumos,Lumos
item.gm4.shamir.lumos,Lumos Shamir
text.gm4.guidebook.module_desc.lumos_shamir,Adds the shamir 'Lumos' to Metallurgy. It places torches when it is dark.
text.gm4.guidebook.lumos_shamir.description,Lumos takes torches from the inventory and places them if the light level is too low.
text.gm4.guidebook.lumos_shamir.usage,The Lumos Shamir is found on Curie's Bismium Bands. It can be placed onto pickaxes and shovels.\n\nHolding the tool will cause torches to be placed when standing in low light levels.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.lumos",
"fallback": "Lumos",
"fallback": "Lumos Shamir",
"italic": false,
"color": "gray"
}
Expand Down
24 changes: 12 additions & 12 deletions gm4_metallurgy/assets/translations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,26 @@ item.gm4.metallurgy.obsidian_cast,Obsidian Cast
item.gm4.metallurgy.shamir,Shamir
item.gm4.metallurgy.thorianite_lump,Thorianite Lump
item.gm4.metallurgy.thorium,Thorium
item.gm4.shamir.arborenda,Arborenda
item.gm4.shamir.defuse,Defuse
item.gm4.shamir.ender_bolt,Ender Bolt
item.gm4.shamir.forterra,Forterra
item.gm4.shamir.gemini,Gemini
item.gm4.shamir.hypexperia,Hypexperia
item.gm4.shamir.moneo,Moneo
item.gm4.shamir.musical,Musical
item.gm4.shamir.sensus,Sensus
item.gm4.shamir.tinker,Tinker
item.gm4.shamir.arborenda,Arborenda Shamir
item.gm4.shamir.defuse,Defuse Shamir
item.gm4.shamir.ender_bolt,Ender Bolt Shamir
item.gm4.shamir.forterra,Forterra Shamir
item.gm4.shamir.gemini,Gemini Shamir
item.gm4.shamir.hypexperia,Hypexperia Shamir
item.gm4.shamir.moneo,Moneo Shamir
item.gm4.shamir.musical,Musical Shamir
item.gm4.shamir.sensus,Sensus Shamir
item.gm4.shamir.tinker,Tinker Shamir
item.gm4.slightly_damaged_obsidian,Slightly Damaged Obsidian
item.gm4.slightly_overheated_obsidian,Slightly Overheated Obsidian
text.gm4.metallurgy.aluminium,Aluminium
text.gm4.metallurgy.barium,Barium
text.gm4.metallurgy.contains,Contains
text.gm4.metallurgy.thorium,Thorium
item.gm4.shamir.vibro,Vibro
item.gm4.shamir.vibro,Vibro Shamir
text.gm4.metallurgy.copper,Copper
item.gm4.metallurgy.malachite_lump,Malachite Lump
item.gm4.shamir.infinitas,Infinitas
item.gm4.shamir.infinitas,Infinitas Shamir
item.gm4.metallurgy.curies_bismium,Curie's Bismium
item.gm4.metallurgy.bismuth.red,B
item.gm4.metallurgy.bismuth.orange,i
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.arborenda",
"fallback": "Arborenda",
"fallback": "Arborenda Shamir",
"italic": false,
"color": "gray"
}
Expand Down
2 changes: 1 addition & 1 deletion gm4_metallurgy/data/gm4_defuse_shamir/loot_table/band.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.defuse",
"fallback": "Defuse",
"fallback": "Defuse Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.ender_bolt",
"fallback": "Ender Bolt",
"fallback": "Ender Bolt Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.forterra",
"fallback": "Forterra",
"fallback": "Forterra Shamir",
"italic": false,
"color": "gray"
}
Expand Down
2 changes: 1 addition & 1 deletion gm4_metallurgy/data/gm4_gemini_shamir/loot_table/band.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.gemini",
"fallback": "Gemini",
"fallback": "Gemini Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.hypexperia",
"fallback": "Hypexperia",
"fallback": "Hypexperia Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,9 @@
"italic": false,
"color": "#467A1B"
},
{
"translate": "item.gm4.metallurgy.shamir",
"fallback": "Shamir",
"italic": false,
"color": "aqua"
},
{
"translate": "item.gm4.shamir.infinitas",
"fallback": "Infinitas",
"fallback": "Infinitas Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"lore": [
{
"translate": "item.gm4.shamir.infinitas",
"fallback": "Infinitas",
"fallback": "Infinitas Shamir",
"italic": false,
"color": "gray"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,3 @@ setblock ~1 ~4 ~1 redstone_block

await items entity @e[type=item,distance=..6] contents minecraft:player_head[custom_data~{gm4_metallurgy:{stored_shamir:"infinitas"}}]
execute as @e[type=item,distance=..6] if items entity @s contents minecraft:player_head unless data entity @s Item.components."minecraft:custom_data".gm4_metallurgy.stored_shamir run fail "Unsmooshed shamir did not properly transfer shamir to cast"
execute as @e[type=item,distance=..6] if items entity @s contents minecraft:player_head unless data entity @s Item.components."minecraft:lore"[2] run fail "Unsmooshed shamir is missing the lore line containing the shamir name"
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# @s = item being crushed by a piston that has a shamir
# run from smooshing/prepare_transfer

#check whether the other item is an obsidian block
scoreboard players set valid_obsidian gm4_ml_data 0
execute as @e[type=item,dx=0,predicate=gm4_metallurgy:is_obsidian,limit=1] run function gm4_metallurgy:smooshing/remove_band/found_obsidian
scoreboard players set $valid_obsidian gm4_ml_data 0
execute if entity @e[type=item,dx=0,predicate=gm4_metallurgy:is_obsidian,limit=1] run function gm4_metallurgy:smooshing/remove_band/found_obsidian

#if both custom model data tags are the same, then we can delete it
execute store success score custom_model_data gm4_ml_data run data modify entity @s Item.components."minecraft:custom_data".gm4_metallurgy.custom_model_data set from entity @s Item.components."minecraft:custom_model_data"
execute if score valid_obsidian gm4_ml_data matches 1 run function gm4_metallurgy:smooshing/remove_band/clear_data
execute if score $valid_obsidian gm4_ml_data matches 1 run function gm4_metallurgy:smooshing/remove_band/clear_data
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,34 @@
# run from smooshing/remove_band/check

execute if score custom_model_data gm4_ml_data matches 0 run data remove entity @s Item.components."minecraft:custom_model_data"
# Line 8 only clears custom data, while max stack size is its own component
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{active_shamir:"infinitas"}}] run data remove entity @s Item.components."minecraft:max_stack_size"
data remove entity @s Item.components."minecraft:custom_data".gm4_metallurgy
execute if items entity @s contents *[custom_data={}] run data remove entity @s Item.components."minecraft:custom_data"

# use lib_lore to remove the correct lines of lore
data modify storage gm4_lore:temp Source set from entity @s Item.components."minecraft:lore"
## NOTE: gm4_lore:temp Target is still "Shamir" from finish_item
scoreboard players set $start gm4_lore -1
scoreboard players set $extra gm4_lore 2
# check legacy Metallurgy lore
data modify storage gm4_lore:temp Target set value '{"color":"aqua","fallback":"Shamir","italic":false,"translate":"item.gm4.metallurgy.shamir"}'

scoreboard players set $start gm4_lore 0
function #gm4_lore:search
execute unless score $index gm4_lore matches -1 run return run function gm4_metallurgy:smooshing/remove_band/clear_legacy_lore

# use lib_lore to remove the correct lines of lore
data modify storage gm4_lore:temp Target set from entity @s Item.components."minecraft:lore"[0]
scoreboard players set $start gm4_lore 0
scoreboard players set $extra gm4_lore 1
function #gm4_lore:remove
data modify entity @s Item.components."minecraft:lore" set from storage gm4_lore:temp Source

## Metallurgy lore 1.21+
# Name: Obsidian Cast
# Lore: <Metal Type> Band
# <Shamir> Shamir

## Old Metallurgy lore (pre 1.21)
# Name: Obsidian Cast
# Lore: <Metal Type> Band
# Shamir
# <Shamir>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @s = armor/tool with the band
# run from smooshing/remove_band/clear_data

# use lib_lore to remove the correct lines of lore
## NOTE: gm4_lore:temp Target is still "Shamir" from clear_data search
scoreboard players set $start gm4_lore -1
scoreboard players set $extra gm4_lore 2
function #gm4_lore:remove
data modify entity @s Item.components."minecraft:lore" set from storage gm4_lore:temp Source

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
# obtain metal type
execute store success score has_modern_nbt_version gm4_ml_data run data modify entity @s Item.components."minecraft:custom_data".gm4_metallurgy.metal.type set from entity @e[type=item,tag=gm4_ml_source,dx=0,limit=1] Item.components."minecraft:custom_data".gm4_metallurgy.metal.type
# obtain metal type from legacy items
execute unless score has_modern_nbt_version gm4_ml_data matches 1 run data modify entity @s Item.components."minecraft:custom_data".gm4_metallurgy.metal.type set from entity @e[type=item,tag=gm4_ml_source,dx=0,limit=1] Item.components."minecraft:custom_data".gm4_metallurgy.ore_type
scoreboard players reset has_modern_nbt_version gm4_ml_data
# @s = item being crushed by a piston that has a shamir
# run from smooshing/remove_band/check

execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"aluminium"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:aluminium_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"barimium"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:barimium_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"barium"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:barium_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"bismuth"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:bismuth_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"copper"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:bismuth_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"curies_bismium"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:curies_bismium_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"thorium_brass"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:curies_bismium_band
execute if items entity @s contents *[custom_data~{gm4_metallurgy:{metal:{type:"thorium"}}}] run loot spawn ~ ~ ~ loot gm4_metallurgy:thorium_band

execute as @e[type=item,tag=!gm4_ml_smooshed,distance=0,limit=1] run function gm4_metallurgy:smooshing/remove_band/finish_item

scoreboard players set valid_obsidian gm4_ml_data 1

kill @s[type=item]
function gm4_metallurgy:smooshing/remove_band/spawn_band with entity @s Item.components."minecraft:custom_data".gm4_metallurgy

# use anvil durability
function gm4_metallurgy:smooshing/anvil/use
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$execute store result score $valid_obsidian gm4_ml_data run loot spawn ~ ~ ~ loot gm4_$(active_shamir)_shamir:band

tag @n[type=item,nbt={Age:0s}] add gm4_ml_smooshed

kill @e[type=item,dx=0,predicate=gm4_metallurgy:is_obsidian,limit=1]
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
],
"italic": false,
"color": "#F47989"
},
{
"translate": "item.gm4.metallurgy.shamir",
"fallback": "Shamir",
"italic": false,
"color": "aqua"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
],
"italic": false,
"color": "#D18A8A"
},
{
"translate": "item.gm4.metallurgy.shamir",
"fallback": "Shamir",
"italic": false,
"color": "aqua"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@
],
"italic": false,
"color": "#F0EAD6"
},
{
"translate": "item.gm4.metallurgy.shamir",
"fallback": "Shamir",
"italic": false,
"color": "aqua"
}
]
}
Expand Down
Loading
Loading