diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2016-08-30 13:55:28 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2016-08-30 13:55:28 +1000 |
commit | 689bea77fb8d93cecc0a1298772614068ed621d3 (patch) | |
tree | e46e85ccd6e654a9a7872f0f4c853465bfec3d7b /src/Java/miscutil/core/item/base | |
parent | 451cb42da1c02cae5cd34cb79cd930f29fc78e9d (diff) | |
download | GT5-Unofficial-689bea77fb8d93cecc0a1298772614068ed621d3.tar.gz GT5-Unofficial-689bea77fb8d93cecc0a1298772614068ed621d3.tar.bz2 GT5-Unofficial-689bea77fb8d93cecc0a1298772614068ed621d3.zip |
$ Fixed Thermal Foundation fluids always loading, even if Thermal Foundation is already present.
+ Added more Backpacks.
% Changed backpack names and OreDict values.
Diffstat (limited to 'src/Java/miscutil/core/item/base')
-rw-r--r-- | src/Java/miscutil/core/item/base/BaseItemBackpack.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/src/Java/miscutil/core/item/base/BaseItemBackpack.java b/src/Java/miscutil/core/item/base/BaseItemBackpack.java index 2b65c4ec03..f8a44b76c8 100644 --- a/src/Java/miscutil/core/item/base/BaseItemBackpack.java +++ b/src/Java/miscutil/core/item/base/BaseItemBackpack.java @@ -5,7 +5,6 @@ import miscutil.MiscUtils; import miscutil.core.creative.AddToCreativeTab; import miscutil.core.handler.GuiHandler; import miscutil.core.lib.CORE; -import miscutil.core.util.Utils; import miscutil.core.util.item.UtilsItems; import miscutil.core.util.math.MathUtils; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,15 +19,16 @@ import cpw.mods.fml.relauncher.SideOnly; public class BaseItemBackpack extends Item{ protected final int colourValue; + protected final String unlocalName; public BaseItemBackpack(String unlocalizedName, int colour){ - + this.unlocalName = unlocalizedName; this.setUnlocalizedName(unlocalizedName); this.setTextureName(CORE.MODID + ":" + "itemBackpack"); this.colourValue = colour; GameRegistry.registerItem(this, unlocalizedName); - GT_OreDictUnificator.registerOre(unlocalizedName.replace("itemB", "b"), UtilsItems.getSimpleStack(this)); + GT_OreDictUnificator.registerOre("storageBackpack", UtilsItems.getSimpleStack(this)); setMaxStackSize(1); setCreativeTab(AddToCreativeTab.tabOther); } @@ -44,10 +44,8 @@ public class BaseItemBackpack extends Item{ { if (!world.isRemote) { - Utils.LOG_INFO("Tried to use a Backpack."); // If player not sneaking, open the inventory gui if (!player.isSneaking()) { - Utils.LOG_INFO("Player is not sneaking."); player.openGui(MiscUtils.instance, GuiHandler.GUI3, world, 0, 0, 0); } @@ -72,8 +70,14 @@ public class BaseItemBackpack extends Item{ @Override public String getItemStackDisplayName(ItemStack p_77653_1_) { - - return ("Backpack"); + //Name Formatting. + String temp = unlocalName.replace("backpack", ""); + //Lets find the colour. + if (temp.toLowerCase().contains("dark")){ + temp = unlocalName.substring(12, unlocalName.length()); + temp = "Dark "+ temp; + } + return (temp+" Backpack"); } @Override |