aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/core/item
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-08-30 13:55:28 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-08-30 13:55:28 +1000
commit689bea77fb8d93cecc0a1298772614068ed621d3 (patch)
treee46e85ccd6e654a9a7872f0f4c853465bfec3d7b /src/Java/miscutil/core/item
parent451cb42da1c02cae5cd34cb79cd930f29fc78e9d (diff)
downloadGT5-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')
-rw-r--r--src/Java/miscutil/core/item/ModItems.java40
-rw-r--r--src/Java/miscutil/core/item/base/BaseItemBackpack.java18
2 files changed, 45 insertions, 13 deletions
diff --git a/src/Java/miscutil/core/item/ModItems.java b/src/Java/miscutil/core/item/ModItems.java
index f5ffc86e89..7d0eb4dac0 100644
--- a/src/Java/miscutil/core/item/ModItems.java
+++ b/src/Java/miscutil/core/item/ModItems.java
@@ -176,6 +176,20 @@ public final class ModItems {
public static BaseItemBackpack backpack_Yellow;
public static BaseItemBackpack backpack_Purple;
public static BaseItemBackpack backpack_Cyan;
+
+
+ public static BaseItemBackpack backpack_Maroon;
+ public static BaseItemBackpack backpack_Olive;
+ public static BaseItemBackpack backpack_DarkGreen;
+ public static BaseItemBackpack backpack_DarkPurple;
+ public static BaseItemBackpack backpack_Teal;
+ public static BaseItemBackpack backpack_Navy;
+
+
+ public static BaseItemBackpack backpack_Silver;
+ public static BaseItemBackpack backpack_Gray;
+ public static BaseItemBackpack backpack_Black;
+ public static BaseItemBackpack backpack_White;
//@SuppressWarnings("unused")
@@ -190,12 +204,26 @@ public final class ModItems {
//Make some backpacks
- backpack_Red = new BaseItemBackpack("backpackRed", Utils.rgbtoHexValue(255, 0, 0));
- backpack_Green = new BaseItemBackpack("backpackGreen", Utils.rgbtoHexValue(0, 255, 0));
- backpack_Blue = new BaseItemBackpack("backpackBlue", Utils.rgbtoHexValue(0, 0, 255));
- backpack_Yellow = new BaseItemBackpack("backpackYellow", Utils.rgbtoHexValue(255, 255, 0));
- backpack_Purple = new BaseItemBackpack("backpackPurple", Utils.rgbtoHexValue(255, 0, 255));
- backpack_Cyan = new BaseItemBackpack("backpackCyan", Utils.rgbtoHexValue(0, 255, 255));
+ //Primary colours
+ backpack_Red = new BaseItemBackpack("backpackRed", Utils.rgbtoHexValue(200, 0, 0));
+ backpack_Green = new BaseItemBackpack("backpackGreen", Utils.rgbtoHexValue(0, 200, 0));
+ backpack_Blue = new BaseItemBackpack("backpackBlue", Utils.rgbtoHexValue(0, 0, 200));
+ //Secondary Colours
+ backpack_Yellow = new BaseItemBackpack("backpackYellow", Utils.rgbtoHexValue(200, 200, 0));
+ backpack_Purple = new BaseItemBackpack("backpackPurple", Utils.rgbtoHexValue(200, 0, 200));
+ backpack_Cyan = new BaseItemBackpack("backpackCyan", Utils.rgbtoHexValue(0, 200, 200));
+ //Tertiary Colours
+ backpack_Maroon = new BaseItemBackpack("backpackMaroon", Utils.rgbtoHexValue(128, 0, 0));
+ backpack_Olive = new BaseItemBackpack("backpackOlive", Utils.rgbtoHexValue(128, 128, 0));
+ backpack_DarkGreen = new BaseItemBackpack("backpackDarkGreen", Utils.rgbtoHexValue(0, 128, 0));
+ backpack_DarkPurple = new BaseItemBackpack("backpackDarkPurple", Utils.rgbtoHexValue(128, 0, 128));
+ backpack_Teal = new BaseItemBackpack("backpackTeal", Utils.rgbtoHexValue(0, 128, 128));
+ backpack_Navy = new BaseItemBackpack("backpackNavy", Utils.rgbtoHexValue(0, 0, 128));
+ //Shades
+ backpack_Silver = new BaseItemBackpack("backpackSilver", Utils.rgbtoHexValue(192, 192, 192));
+ backpack_Gray = new BaseItemBackpack("backpackGray", Utils.rgbtoHexValue(128, 128, 128));
+ backpack_Black = new BaseItemBackpack("backpackBlack", Utils.rgbtoHexValue(20, 20, 20));
+ backpack_White = new BaseItemBackpack("backpackWhite", Utils.rgbtoHexValue(240, 240, 240));
/*ItemsIngots.load();
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