Tooltip fix

This commit is contained in:
Blood-Asp 2016-03-20 17:08:33 +01:00
parent 41af922dd2
commit b2ac24e85a
9 changed files with 20 additions and 14 deletions

View file

@ -1,7 +1,7 @@
minecraft.version=1.7.10 minecraft.version=1.7.10
forge.version=10.13.4.1566-1.7.10 forge.version=10.13.4.1566-1.7.10
gt.version=5.09.19 gt.version=5.09.20
ae2.version=rv2-beta-33 ae2.version=rv2-beta-33
applecore.version=1.7.10-1.2.1+107.59407 applecore.version=1.7.10-1.2.1+107.59407

View file

@ -2,6 +2,7 @@ package gregtech.api.items;
import gregtech.api.GregTech_API; import gregtech.api.GregTech_API;
import ic2.core.util.StackUtil; import ic2.core.util.StackUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.StatCollector; import net.minecraft.util.StatCollector;
@ -47,8 +48,8 @@ public class GT_CoolantCell_Item
} }
} }
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
super.addAdditionalToolTips(aList, aStack); super.addAdditionalToolTips(aList, aStack, aPlayer);
aList.add("Stored Heat: " + getHeatOfStack(aStack)); aList.add("Stored Heat: " + getHeatOfStack(aStack));
switch (getControlTagOfStack(aStack)) { switch (getControlTagOfStack(aStack)) {
case 1: case 1:

View file

@ -1,6 +1,7 @@
package gregtech.api.items; package gregtech.api.items;
import ic2.core.util.StackUtil; import ic2.core.util.StackUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -134,8 +135,8 @@ public class GT_RadioactiveCell_Item
setDamageForStack(stack, getDamageOfStack(stack) + Dmg); setDamageForStack(stack, getDamageOfStack(stack) + Dmg);
} }
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
super.addAdditionalToolTips(aList, aStack); super.addAdditionalToolTips(aList, aStack, aPlayer);
//aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs"); //aList.add("Time left: " + (this.maxDelay - getDurabilityOfStack(aStack)) + " secs");
aList.add("Durability: " + (this.maxDmg - getDurabilityOfStack(aStack)) + "/" + this.maxDmg); aList.add("Durability: " + (this.maxDmg - getDurabilityOfStack(aStack)) + "/" + this.maxDmg);
} }

View file

@ -24,7 +24,7 @@ public class GT_SolderingTool_Item extends GT_Tool_Item {
} }
@Override @Override
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Sets the Strength of outputted Redstone")); aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "Sets the Strength of outputted Redstone"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Needs Soldering Metal in Inventory!")); aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Needs Soldering Metal in Inventory!"));
} }

View file

@ -18,7 +18,7 @@ public class GT_Spray_Pepper_Item extends GT_Tool_Item {
} }
@Override @Override
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "especially Pedobears, Care Bears,")); aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_1", "especially Pedobears, Care Bears,"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Confession Bears, Bear Grylls")); aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_2", "Confession Bears, Bear Grylls"));
aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_3", "And ofcourse Man-Bear-Pig")); aList.add(GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".tooltip_3", "And ofcourse Man-Bear-Pig"));

View file

@ -8,6 +8,7 @@ import gregtech.api.items.GT_Generic_Item;
import gregtech.api.util.GT_Utility; import gregtech.api.util.GT_Utility;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -25,7 +26,7 @@ public class GT_FluidDisplayItem
ItemList.Display_Fluid.set(this); ItemList.Display_Fluid.set(this);
} }
protected void addAdditionalToolTips(List aList, ItemStack aStack) { protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
NBTTagCompound aNBT = aStack.getTagCompound(); NBTTagCompound aNBT = aStack.getTagCompound();
if (GT_Values.D1) { if (GT_Values.D1) {
Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage()); Fluid tFluid = FluidRegistry.getFluid(aStack.getItemDamage());

View file

@ -12,6 +12,7 @@ import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_ModHandler;
import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -76,8 +77,8 @@ public class GT_IntegratedCircuit_Item
return getModeString(aMetaData) + " " + (byte) (aMetaData & 0xFF); return getModeString(aMetaData) + " " + (byte) (aMetaData & 0xFF);
} }
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
super.addAdditionalToolTips(aList, aStack); super.addAdditionalToolTips(aList, aStack, aPlayer);
aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".configuration").toString(), "Configuration: ") + getConfigurationString(getDamage(aStack))); aList.add(GT_LanguageManager.addStringLocalization(new StringBuilder().append(getUnlocalizedName()).append(".configuration").toString(), "Configuration: ") + getConfigurationString(getDamage(aStack)));
} }

View file

@ -17,6 +17,7 @@ import gregtech.common.items.behaviors.*;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.enchantment.Enchantment; import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks; import net.minecraft.init.Blocks;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.EnumAction; import net.minecraft.item.EnumAction;
@ -797,8 +798,8 @@ public class GT_MetaGenerated_Item_01
return false; return false;
} }
protected void addAdditionalToolTips(List aList, ItemStack aStack) { protected void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
super.addAdditionalToolTips(aList, aStack); super.addAdditionalToolTips(aList, aStack, aPlayer);
int aDamage = aStack.getItemDamage(); int aDamage = aStack.getItemDamage();
if ((aDamage < 32000) && (aDamage >= 0)) { if ((aDamage < 32000) && (aDamage >= 0)) {
Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)]; Materials aMaterial = GregTech_API.sGeneratedMaterials[(aDamage % 1000)];

View file

@ -6,6 +6,7 @@ import gregtech.api.interfaces.tileentity.IGregTechDeviceInformation;
import gregtech.api.items.GT_Generic_Item; import gregtech.api.items.GT_Generic_Item;
import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_LanguageManager;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagCompound;
@ -29,8 +30,8 @@ public class GT_SensorCard_Item
setMaxStackSize(1); setMaxStackSize(1);
} }
public void addAdditionalToolTips(List aList, ItemStack aStack) { public void addAdditionalToolTips(List aList, ItemStack aStack, EntityPlayer aPlayer) {
super.addAdditionalToolTips(aList, aStack); super.addAdditionalToolTips(aList, aStack, aPlayer);
if (aStack != null) { if (aStack != null) {
NBTTagCompound tNBT = aStack.getTagCompound(); NBTTagCompound tNBT = aStack.getTagCompound();
if (tNBT == null) { if (tNBT == null) {