From 742595c83f47b08772c8453372a6cd439ac8216d Mon Sep 17 00:00:00 2001 From: Bufka2011 Date: Mon, 25 Aug 2025 13:35:25 -0600 Subject: [PATCH] I18n implementation for Meteorite Swords and Dusted Steel --- .../com/hbm/items/special/ItemHotDusted.java | 12 ++--- .../hbm/items/tool/ItemSwordMeteorite.java | 49 ++++++++++--------- src/main/resources/assets/hbm/lang/en_US.lang | 26 ++++++++++ 3 files changed, 56 insertions(+), 31 deletions(-) diff --git a/src/main/java/com/hbm/items/special/ItemHotDusted.java b/src/main/java/com/hbm/items/special/ItemHotDusted.java index 64cee05ca..7ddecbbbd 100644 --- a/src/main/java/com/hbm/items/special/ItemHotDusted.java +++ b/src/main/java/com/hbm/items/special/ItemHotDusted.java @@ -1,22 +1,20 @@ package com.hbm.items.special; - +import com.hbm.util.i18n.I18nUtil; import java.util.List; - import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; - public class ItemHotDusted extends ItemHot { - public ItemHotDusted(int heat) { super(heat); this.setHasSubtypes(true); } - + @Override public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) { - list.add("Forged " + stack.getItemDamage() + " time(s)"); + list.add(I18nUtil.resolveKey("item.hot_dusted.forged") + " " + stack.getItemDamage() + " " + + I18nUtil.resolveKey("item.hot_dusted.times")); } - + public static int getMaxHeat(ItemStack stack) { return heat - stack.getItemDamage() * 10; } diff --git a/src/main/java/com/hbm/items/tool/ItemSwordMeteorite.java b/src/main/java/com/hbm/items/tool/ItemSwordMeteorite.java index eefbae55d..933db145a 100644 --- a/src/main/java/com/hbm/items/tool/ItemSwordMeteorite.java +++ b/src/main/java/com/hbm/items/tool/ItemSwordMeteorite.java @@ -4,6 +4,7 @@ import java.util.ArrayList; import java.util.List; import com.hbm.items.ModItems; +import com.hbm.util.i18n.I18nUtil; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -26,63 +27,63 @@ public class ItemSwordMeteorite extends ItemSwordAbility { super.addInformation(stack, player, list, ext); if(this == ModItems.meteorite_sword) { - list.add(EnumChatFormatting.ITALIC + "Forged from a fallen star"); - list.add(EnumChatFormatting.ITALIC + "Sharper than most terrestrial blades"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.desc2")); } if(this == ModItems.meteorite_sword_seared) { - list.add(EnumChatFormatting.ITALIC + "Fire strengthens the blade"); - list.add(EnumChatFormatting.ITALIC + "Making it even more powerful"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.seared.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.seared.desc2")); } if(this == ModItems.meteorite_sword_reforged) { - list.add(EnumChatFormatting.ITALIC + "The sword has been reforged"); - list.add(EnumChatFormatting.ITALIC + "To rectify past imperfections"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.reforged.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.reforged.desc2")); } if(this == ModItems.meteorite_sword_hardened) { - list.add(EnumChatFormatting.ITALIC + "Extremely high pressure has been used"); - list.add(EnumChatFormatting.ITALIC + "To harden the blade further"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.hardened.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.hardened.desc2")); } if(this == ModItems.meteorite_sword_alloyed) { - list.add(EnumChatFormatting.ITALIC + "Cobalt fills the fissures"); - list.add(EnumChatFormatting.ITALIC + "Strengthening the sword"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.alloyed.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.alloyed.desc2")); } if(this == ModItems.meteorite_sword_machined) { - list.add(EnumChatFormatting.ITALIC + "Advanced machinery was used"); - list.add(EnumChatFormatting.ITALIC + "To refine the blade even more"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.machined.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.machined.desc2")); } if(this == ModItems.meteorite_sword_treated) { - list.add(EnumChatFormatting.ITALIC + "Chemicals have been applied"); - list.add(EnumChatFormatting.ITALIC + "Making the sword more powerful"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.treated.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.treated.desc2")); } if(this == ModItems.meteorite_sword_etched) { - list.add(EnumChatFormatting.ITALIC + "Acids clean the material"); - list.add(EnumChatFormatting.ITALIC + "To make this the perfect sword"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.etched.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.etched.desc2")); } if(this == ModItems.meteorite_sword_bred) { - list.add(EnumChatFormatting.ITALIC + "Immense heat and radiation"); - list.add(EnumChatFormatting.ITALIC + "Compress the material"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.bred.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.bred.desc2")); } if(this == ModItems.meteorite_sword_irradiated) { - list.add(EnumChatFormatting.ITALIC + "The power of the Atom"); - list.add(EnumChatFormatting.ITALIC + "Gives the sword might"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.irradiated.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.irradiated.desc2")); } if(this == ModItems.meteorite_sword_fused) { - list.add(EnumChatFormatting.ITALIC + "This blade has met"); - list.add(EnumChatFormatting.ITALIC + "With the forces of the stars"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.fused.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.fused.desc2")); } if(this == ModItems.meteorite_sword_baleful) { - list.add(EnumChatFormatting.ITALIC + "This sword has met temperatures"); - list.add(EnumChatFormatting.ITALIC + "Far beyond what normal material can endure"); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.baleful.desc1")); + list.add(EnumChatFormatting.ITALIC + I18nUtil.resolveKey("item.meteorite_sword.baleful.desc2")); } /* diff --git a/src/main/resources/assets/hbm/lang/en_US.lang b/src/main/resources/assets/hbm/lang/en_US.lang index e0a543148..86896916f 100644 --- a/src/main/resources/assets/hbm/lang/en_US.lang +++ b/src/main/resources/assets/hbm/lang/en_US.lang @@ -3183,6 +3183,8 @@ item.ingot_sr90.name=Strontium-90 Ingot item.ingot_starmetal.name=§9Starmetal Ingot§r item.ingot_steel.name=Steel Ingot item.ingot_steel_dusted.name=Dusted Steel Ingot +item.hot_dusted.forged=Forged +item.hot_dusted.times=time(s) item.ingot_tantalium.name=Tantalium Ingot item.ingot_tantalium.desc='Tantalum' item.ingot_tantalium.desc.P11=AKA Tantalum. @@ -3327,17 +3329,41 @@ item.mese_pickaxe.name=Mese Pickaxe item.meteor_charm.name=Meteor Charm item.meteor_remote.name=Meteorite Remote item.meteorite_sword.name=Meteorite Sword +item.meteorite_sword.desc1=Forged from a fallen star +item.meteorite_sword.desc2=Sharper than most terrestrial blades item.meteorite_sword_seared.name=Meteorite Sword (Seared) +item.meteorite_sword.seared.desc1=Fire strengthens the blade +item.meteorite_sword.seared.desc2=Making it even more powerful item.meteorite_sword_reforged.name=Meteorite Sword (Reforged) +item.meteorite_sword.reforged.desc1=The sword has been reforged +item.meteorite_sword.reforged.desc2=To rectify past imperfections item.meteorite_sword_hardened.name=Meteorite Sword (Hardened) +item.meteorite_sword.hardened.desc1=Extremely high pressure has been used +item.meteorite_sword.hardened.desc2=To harden the blade further item.meteorite_sword_alloyed.name=Meteorite Sword (Alloyed) +item.meteorite_sword.alloyed.desc1=Cobalt fills the fissures +item.meteorite_sword.alloyed.desc2=Strengthening the sword item.meteorite_sword_machined.name=Meteorite Sword (Machined) +item.meteorite_sword.machined.desc1=Advanced machinery was used +item.meteorite_sword.machined.desc2=To refine the blade even more item.meteorite_sword_treated.name=Meteorite Sword (Treated) +item.meteorite_sword.treated.desc1=Chemicals have been applied +item.meteorite_sword.treated.desc2=Making the sword more powerful item.meteorite_sword_etched.name=Meteorite Sword (Etched) +item.meteorite_sword.etched.desc1=Acids clean the material +item.meteorite_sword.etched.desc2=To make this the perfect sword item.meteorite_sword_bred.name=Meteorite Sword (Bred) +item.meteorite_sword.bred.desc1=Immense heat and radiation +item.meteorite_sword.bred.desc2=Compress the material item.meteorite_sword_irradiated.name=Meteorite Sword (Irradiated) +item.meteorite_sword.irradiated.desc1=The power of the Atom +item.meteorite_sword.irradiated.desc2=Gives the sword might item.meteorite_sword_fused.name=Meteorite Sword (Fused) +item.meteorite_sword.fused.desc1=This blade has met +item.meteorite_sword.fused.desc2=With the forces of the stars item.meteorite_sword_baleful.name=Meteorite Sword (Baleful) +item.meteorite_sword.baleful.desc1=This sword has met temperatures +item.meteorite_sword.baleful.desc2=Far beyond what normal material can endure item.mike_cooling_unit.name=Deuterium Cooling Unit item.mike_core.name=Uranium Coated Deuterium Tank item.mike_deut.name=Deuterium Tank