Add tooltip to localization

This commit is contained in:
sferatime 2020-08-06 00:01:54 +03:00
parent 213bdca24d
commit 817257338b
7 changed files with 32 additions and 28 deletions

View file

@ -7,6 +7,7 @@ import gregtechmod.api.util.GT_Utility;
import java.util.List;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
@ -64,9 +65,10 @@ public class GT_CrowbarRC_Item extends GT_Crowbar_Item implements mods.railcraft
GT_ModHandler.damageOrDechargeItem(aCrowbar, 5, 5000, aPlayer);
}
@SuppressWarnings("unchecked")
@Override
public void addAdditionalToolTips(List aList, ItemStack aStack) {
public void addAdditionalToolTips(@SuppressWarnings("rawtypes") List aList, ItemStack aStack) {
super.addAdditionalToolTips(aList, aStack);
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_rc", "Works as Railcraft Crowbar too"));
aList.add(I18n.format("item.GT_Crowbar.tooltip_rc"));
}
}

View file

@ -10,6 +10,7 @@ import gregtechmod.api.util.GT_Utility;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.monster.EntityCaveSpider;
import net.minecraft.entity.monster.EntitySpider;
import net.minecraft.entity.player.EntityPlayer;
@ -36,8 +37,8 @@ public class GT_Screwdriver_Item extends GT_Tool_Item {
@SuppressWarnings("unchecked")
@Override
public void addAdditionalToolTips(@SuppressWarnings("rawtypes") List aList, ItemStack aStack) {
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Can switch the Design of certain Blocks"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Can rotate Repeaters and Comparators"));
aList.add(I18n.format("item.GT_Screwdriver.tooltip_1"));
aList.add(I18n.format("item.GT_Screwdriver.tooltip_2"));
}
@Override

View file

@ -10,6 +10,7 @@ import gregtechmod.api.util.GT_Utility;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@ -37,9 +38,9 @@ public class GT_SoftHammer_Item extends GT_Tool_Item {
@Override
public void addAdditionalToolTips(@SuppressWarnings("rawtypes") List aList, ItemStack aStack) {
super.addAdditionalToolTips(aList, aStack);
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Can enable/disable Machines"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Can rotate some Blocks as well"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_4", "Can switch Redstone Lamps and Booster Tracks"));
aList.add(I18n.format("item.GT_Hammer_Rubber.tooltip_1"));
aList.add(I18n.format("item.GT_Hammer_Rubber.tooltip_2"));
aList.add(I18n.format("item.GT_Hammer_Rubber.tooltip_4"));
}
@Override

View file

@ -9,6 +9,7 @@ import gregtechmod.api.util.GT_Utility;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@ -19,7 +20,7 @@ public class GT_Spray_Color_Item extends GT_Tool_Item {
public byte mColorMeta = 0;
public GT_Spray_Color_Item(String aName, int aMaxDamage, int aEntityDamage, byte aColorMeta) {
super(aName, "To give the World more Color", aMaxDamage, aEntityDamage);
super(aName, null, aMaxDamage, aEntityDamage);
GT_OreDictUnificator.registerOre(Dyes.get(mColorMeta = aColorMeta), new ItemStack(this, 1, GregTech_API.ITEM_WILDCARD_DAMAGE));
setCraftingSound(GregTech_API.sSoundList.get(102));
setBreakingSound(GregTech_API.sSoundList.get(102));
@ -30,8 +31,9 @@ public class GT_Spray_Color_Item extends GT_Tool_Item {
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public void addAdditionalToolTips(List aList, ItemStack aStack) {
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_3", "Enough for dying " + getMaxDamage() + " Blocks in World " + Dyes.get(mColorMeta).mName.toLowerCase()));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Enough for crafting " + (getMaxDamage()/getDamagePerContainerItemCraft()) + " times"));
aList.add(I18n.format("item.GT_Spray_Color_Item.tooltip_1"));
aList.add(I18n.format("item.GT_Spray_Color_Item.tooltip_3", getMaxDamage(), Dyes.get(mColorMeta).mName.toLowerCase()));
aList.add(I18n.format("item.GT_Spray_Color_Item.tooltip_2", getMaxDamage() / getDamagePerContainerItemCraft()));
}
@Override

View file

@ -7,6 +7,7 @@ import gregtechmod.api.util.GT_OreDictUnificator;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
@ -28,8 +29,8 @@ public class GT_Spray_Pepper_Item extends GT_Tool_Item {
@SuppressWarnings("unchecked")
@Override
public void addAdditionalToolTips(@SuppressWarnings("rawtypes") List aList, ItemStack aStack) {
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "especially Pedobears, Care Bears,"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Confession Bears and Bear Grylls"));
aList.add(I18n.format("item.GT_Spray_Pepper.tooltip_1",getUnlocalizedName()));
aList.add(I18n.format("item.GT_Spray_Pepper.tooltip_2",getUnlocalizedName()));
}
@Override

View file

@ -5,6 +5,7 @@ import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.util.GT_LanguageManager;
import gregtechmod.api.util.GT_OreDictUnificator;
import net.minecraft.client.resources.I18n;
import net.minecraft.item.ItemStack;
public class GT_MetaItem_Nugget extends GT_MetaItem_Abstract {

View file

@ -273,6 +273,7 @@ item.GT_Components.98.tooltip=A Steel Gear
item.GT_Components.99.name=Titanium Gear
item.GT_Components.99.tooltip=A Titanium Gear
item.GT_Crowbar.name=Crowbar
item.GT_Crowbar.tooltip_rc=Works as Railcraft Crowbar too
item.GT_DirtyDusts.0.name=Dirty Pile of Ender Pearl Dust
item.GT_DirtyDusts.1.name=Dirty Pile of Ender Eye Dust
item.GT_DirtyDusts.10.name=Dirty Pile of Endstone Dust
@ -435,6 +436,9 @@ item.GT_Hammer_Bronze.name=Bronze Hammer
item.GT_Hammer_Iron.name=Iron Hammer
item.GT_Hammer_Rubber.name=Rubber Hammer
item.GT_Hammer_Rubber.tooltip_main=To give a Machine a soft whack
item.GT_Hammer_Rubber.tooltip_1=Can enable/disable Machines
item.GT_Hammer_Rubber.tooltip_2=Can rotate some Blocks as well
item.GT_Hammer_Rubber.tooltip_4=Can switch Redstone Lamps and Booster Tracks
item.GT_Hammer_Steel.name=Steel Hammer
item.GT_Hammer_Tungstensteel.name=Tungstensteel Hammer
item.GT_Lava_Filter.name=Lava Filter
@ -643,6 +647,7 @@ item.GT_Nuggets.28.name=Nickel Nugget
item.GT_Nuggets.29.name=Invar Nugget
item.GT_Nuggets.30.name=Osmium Nugget
item.GT_Nuggets.31.name=Antimony Nugget
item.GT_Nugget.tooltip_main=%s.%d.name %s Nugget
item.GT_Saw_Advanced.name=Advanced Saw
item.GT_Saw_Bronze.name=Bronze Saw
item.GT_Saw_Bronze.tooltip_main=For sawing Logs into Planks
@ -657,6 +662,8 @@ item.GT_Scanner.name=Portable Scanner
item.GT_Scanner.tooltip_main=Tricorder
item.GT_Screwdriver.name=Screwdriver
item.GT_Screwdriver.tooltip_main=To screw Covers on Machines
item.GT_Screwdriver.tooltip_1=Can switch the Design of certain Blocks
item.GT_Screwdriver.tooltip_2=Can rotate Repeaters and Comparators
item.GT_SmallDusts.0.name=Small Pile of Ender Pearl Dust
item.GT_SmallDusts.1.name=Small Pile of Ender Eye Dust
item.GT_SmallDusts.10.name=Small Pile of Endstone Dust
@ -739,37 +746,24 @@ item.GT_SolderingTin.name=Soldering Tin
item.GT_SolderingTin.tooltip_main=Used in conjunction with Soldering Tools
item.GT_SolderingTool.name=Electric Soldering Iron
item.GT_Spray_00.name=Spray Can (Black)
item.GT_Spray_00.tooltip_main=To give the World more Color
item.GT_Spray_01.name=Spray Can (Red)
item.GT_Spray_01.tooltip_main=To give the World more Color
item.GT_Spray_02.name=Spray Can (Green)
item.GT_Spray_02.tooltip_main=To give the World more Color
item.GT_Spray_03.name=Spray Can (Brown)
item.GT_Spray_03.tooltip_main=To give the World more Color
item.GT_Spray_04.name=Spray Can (Blue)
item.GT_Spray_04.tooltip_main=To give the World more Color
item.GT_Spray_05.name=Spray Can (Purple)
item.GT_Spray_05.tooltip_main=To give the World more Color
item.GT_Spray_06.name=Spray Can (Cyan)
item.GT_Spray_06.tooltip_main=To give the World more Color
item.GT_Spray_07.name=Spray Can (Light Gray)
item.GT_Spray_07.tooltip_main=To give the World more Color
item.GT_Spray_08.name=Spray Can (Gray)
item.GT_Spray_08.tooltip_main=To give the World more Color
item.GT_Spray_09.name=Spray Can (Pink)
item.GT_Spray_09.tooltip_main=To give the World more Color
item.GT_Spray_10.name=Spray Can (Lime)
item.GT_Spray_10.tooltip_main=To give the World more Color
item.GT_Spray_11.name=Spray Can (Yellow)
item.GT_Spray_11.tooltip_main=To give the World more Color
item.GT_Spray_12.name=Spray Can (Light Blue)
item.GT_Spray_12.tooltip_main=To give the World more Color
item.GT_Spray_13.name=Spray Can (Magenta)
item.GT_Spray_13.tooltip_main=To give the World more Color
item.GT_Spray_14.name=Spray Can (Orange)
item.GT_Spray_14.tooltip_main=To give the World more Color
item.GT_Spray_15.name=Spray Can (White)
item.GT_Spray_15.tooltip_main=To give the World more Color
item.GT_Spray_Color_Item.tooltip_1=To give the World more Color
item.GT_Spray_Color_Item.tooltip_3=Enough for dying %s Blocks in World %s
item.GT_Spray_Color_Item.tooltip_2=Enough for crafting %s times
item.GT_Spray_Bug.name=Bug Spray
item.GT_Spray_Bug.tooltip_main=A very 'buggy' Spray
item.GT_Spray_Foam.name=Construction Spray
@ -782,6 +776,8 @@ item.GT_Spray_Ice.name=Freezing Spray
item.GT_Spray_Ice.tooltip_main=Very effective against Slimes
item.GT_Spray_Pepper.name=Pepper Spray
item.GT_Spray_Pepper.tooltip_main=To defend yourself against Bears
item.GT_Spray_Pepper.tooltip_1=%s especially Pedobears, Care Bears,
item.GT_Spray_Pepper.tooltip_2=%s Confession Bears and Bear Grylls
item.GT_Steel_Axe.name=Steel Axe
item.GT_Steel_Hoe.name=Steel Hoe
item.GT_Steel_Pickaxe.name=Steel Pickaxe