Made Text for bugged items less dumb

This commit is contained in:
Ellpeck 2015-11-23 19:06:07 +01:00
parent 1c07b56920
commit 60ad0b1caa
12 changed files with 22 additions and 10 deletions

View file

@ -16,6 +16,7 @@ import ellpeck.actuallyadditions.items.ItemBlockBase;
import ellpeck.actuallyadditions.items.metalists.TheCrystals;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -96,7 +97,7 @@ public class BlockCrystal extends Block implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allCrystals.length ? " ERROR!" : allCrystals[stack.getItemDamage()].name);
return stack.getItemDamage() >= allCrystals.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allCrystals[stack.getItemDamage()].name;
}
@Override

View file

@ -17,6 +17,7 @@ import ellpeck.actuallyadditions.items.ItemBlockBase;
import ellpeck.actuallyadditions.proxy.ClientProxy;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
@ -108,7 +109,7 @@ public class BlockMisc extends Block implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allMiscBlocks.length ? " ERROR!" : allMiscBlocks[stack.getItemDamage()].name);
return stack.getItemDamage() >= allMiscBlocks.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allMiscBlocks[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.blocks.metalists.TheWildPlants;
import ellpeck.actuallyadditions.items.ItemBlockBase;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.block.Block;
import net.minecraft.block.BlockBush;
import net.minecraft.block.material.Material;
@ -106,7 +107,7 @@ public class BlockWildPlant extends BlockBush implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allWildPlants.length ? " ERROR!" : allWildPlants[stack.getItemDamage()].name);
return stack.getItemDamage() >= allWildPlants.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allWildPlants[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.blocks.BlockCrystal;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -41,7 +42,7 @@ public class ItemCrystal extends Item implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= BlockCrystal.allCrystals.length ? " ERROR!" : BlockCrystal.allCrystals[stack.getItemDamage()].name);
return stack.getItemDamage() >= BlockCrystal.allCrystals.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+BlockCrystal.allCrystals[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.items.metalists.TheDusts;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -39,7 +40,7 @@ public class ItemDust extends Item implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allDusts.length ? " ERROR!" : allDusts[stack.getItemDamage()].name);
return stack.getItemDamage() >= allDusts.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allDusts[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.items.metalists.TheFoods;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityItem;
@ -87,7 +88,7 @@ public class ItemFoods extends ItemFood implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allFoods.length ? " ERROR!" : allFoods[stack.getItemDamage()].name);
return stack.getItemDamage() >= allFoods.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allFoods[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.items.metalists.TheJams;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityItem;
@ -49,7 +50,7 @@ public class ItemJams extends ItemFood implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allJams.length ? " ERROR!" : allJams[stack.getItemDamage()].name);
return stack.getItemDamage() >= allJams.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allJams[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.items.metalists.TheMiscItems;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
@ -47,7 +48,7 @@ public class ItemMisc extends Item implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allMiscItems.length ? " ERROR!" : allMiscItems[stack.getItemDamage()].name);
return stack.getItemDamage() >= allMiscItems.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allMiscItems[stack.getItemDamage()].name;
}
@Override

View file

@ -48,7 +48,7 @@ public class ItemPotionRing extends Item implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allRings.length ? " ERROR!" : allRings[stack.getItemDamage()].name.substring("potion".length()));
return stack.getItemDamage() >= allRings.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allRings[stack.getItemDamage()].name;
}
@Override

View file

@ -15,6 +15,7 @@ import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.items.metalists.TheSpecialDrops;
import ellpeck.actuallyadditions.util.IActAddItemOrBlock;
import ellpeck.actuallyadditions.util.ModUtil;
import ellpeck.actuallyadditions.util.StringUtil;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.item.EntityXPOrb;
@ -73,7 +74,7 @@ public class ItemSpecialDrop extends Item implements IActAddItemOrBlock{
@Override
public String getUnlocalizedName(ItemStack stack){
return this.getUnlocalizedName()+(stack.getItemDamage() >= allDrops.length ? " ERROR!" : allDrops[stack.getItemDamage()].name);
return stack.getItemDamage() >= allDrops.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+allDrops[stack.getItemDamage()].name;
}
@Override

View file

@ -20,6 +20,8 @@ public class StringUtil{
public static final int DECIMAL_COLOR_WHITE = 16777215;
public static final int DECIMAL_COLOR_GRAY_TEXT = 4210752;
public static final String BUGGED_ITEM_NAME = "lolWutHowUDoDis";
/**
* Localizes a given String via StatCollector
*/

View file

@ -1,6 +1,7 @@
#General
itemGroup.actuallyadditions=Actually Additions
achievement.page.actuallyadditions=Actually Additions
lolWutHowUDoDis.name=This is bugged. Throw it away. Please.
#Fluids
fluid.actuallyadditions.oil=Oil