diff options
author | Draknyte1 <Draknyte1@hotmail.com> | 2017-01-14 13:53:30 +1000 |
---|---|---|
committer | Draknyte1 <Draknyte1@hotmail.com> | 2017-01-14 13:53:30 +1000 |
commit | d83aa2f50568b001ca462d467fe9b5ad61a008dc (patch) | |
tree | 1864881661a709b3faa5943b85a2bf24cd592713 /src/Java/gtPlusPlus/core/item | |
parent | 9649317bee1a0621cd4a7ea0e9295571832d629d (diff) | |
download | GT5-Unofficial-d83aa2f50568b001ca462d467fe9b5ad61a008dc.tar.gz GT5-Unofficial-d83aa2f50568b001ca462d467fe9b5ad61a008dc.tar.bz2 GT5-Unofficial-d83aa2f50568b001ca462d467fe9b5ad61a008dc.zip |
+ Added the basis for a config option, which enables GT textures (For all machine components, ingots/plates/rods/etc.).
- Removed recipe addition logging.
% Tried again to boost multi-tool durabilities by 3x.
% Added sapling plant code to the Tree Farmer, improved output bus storage of chopped logs.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
4 files changed, 64 insertions, 16 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java index 90da27914a..bab4bfeded 100644 --- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java +++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java @@ -35,7 +35,7 @@ public class BaseItemComponent extends Item{ this.setCreativeTab(AddToCreativeTab.tabMisc); this.setUnlocalizedName(unlocalName); this.setMaxStackSize(64); - this.setTextureName(CORE.MODID + ":" + "item"+componentType.COMPONENT_NAME); + this.setTextureName(getCorrectTextures()); this.componentColour = material.getRgbAsHex(); GameRegistry.registerItem(this, unlocalName); GT_OreDictUnificator.registerOre(componentType.getOreDictName()+material.getUnlocalizedName(), ItemUtils.getSimpleStack(this)); @@ -57,6 +57,25 @@ public class BaseItemComponent extends Item{ GT_OreDictUnificator.registerOre(ComponentTypes.CELL.getOreDictName()+unlocalName, ItemUtils.getSimpleStack(this)); } + public String getCorrectTextures(){ + if (!CORE.configSwitches.useGregtechTextures){ + return CORE.MODID + ":" + "item"+componentType.COMPONENT_NAME; + } + if (componentType == ComponentTypes.GEAR){ + return "gregtech" + ":" + "materialicons/METALLIC/" + "gearGt"; + } + else if (componentType == ComponentTypes.ROD){ + return "gregtech" + ":" + "materialicons/METALLIC/" + "stick"; + } + else if (componentType == ComponentTypes.RODLONG){ + return "gregtech" + ":" + "materialicons/METALLIC/" + "stickLong"; + } + else if (componentType == ComponentTypes.PLATEDOUBLE){ + return "gregtech" + ":" + "materialicons/METALLIC/" + "plateDouble"; + } + return "gregtech" + ":" + "materialicons/METALLIC/" + componentType.COMPONENT_NAME.toLowerCase(); + } + @Override public String getItemStackDisplayName(ItemStack p_77653_1_) { @@ -114,8 +133,8 @@ public class BaseItemComponent extends Item{ } if (componentMaterial != null){ if (!componentMaterial.vChemicalFormula.equals("??")) - list.add(componentMaterial.vChemicalFormula); - + list.add(componentMaterial.vChemicalFormula); + if (componentMaterial.isRadioactive){ list.add(CORE.GT_Tooltip_Radioactive); } diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java index 2998fbbc74..4e4192262a 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDust.java @@ -33,11 +33,9 @@ public class BaseItemDust extends Item{ public BaseItemDust(String unlocalizedName, String materialName, Material matInfo, int colour, String pileSize, int tier, int sRadioactivity) { setUnlocalizedName(unlocalizedName); this.setUnlocalizedName(unlocalizedName); - this.setMaxStackSize(64); - if (pileSize == "dust" || pileSize == "Dust"){ - this.setTextureName(CORE.MODID + ":" + "dust");} - else{ - this.setTextureName(CORE.MODID + ":" + "dust"+pileSize);} + this.setMaxStackSize(64); + this.setTextureName(getCorrectTexture(pileSize)); + this.setCreativeTab(tabMisc); this.colour = colour; this.mTier = tier; @@ -75,6 +73,23 @@ public class BaseItemDust extends Item{ addMacerationRecipe(); } + private String getCorrectTexture(String pileSize){ + if (!CORE.configSwitches.useGregtechTextures){ + if (pileSize == "dust" || pileSize == "Dust"){ + this.setTextureName(CORE.MODID + ":" + "dust");} + else{ + this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); + } + } + if (pileSize.toLowerCase().contains("small")){ + return "gregtech" + ":" + "materialicons/METALLIC/dustSmall"; + } + else if (pileSize.toLowerCase().contains("tiny")){ + return "gregtech" + ":" + "materialicons/METALLIC/dustTiny"; + } + return "gregtech" + ":" + "materialicons/METALLIC/dust"; + } + @Override public String getItemStackDisplayName(ItemStack iStack) { @@ -117,7 +132,7 @@ public class BaseItemDust extends Item{ if (dustInfo != null){ list.add(dustInfo.vChemicalFormula); } - + //} super.addInformation(stack, aPlayer, list, bool); diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java index fee8861d64..c90499c1ca 100644 --- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java +++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java @@ -29,11 +29,8 @@ public class BaseItemDustUnique extends Item{ public BaseItemDustUnique(String unlocalizedName, String materialName, int colour, String pileSize) { setUnlocalizedName(unlocalizedName); this.setUnlocalizedName(unlocalizedName); - this.setMaxStackSize(64); - if (pileSize == "dust" || pileSize == "Dust"){ - this.setTextureName(CORE.MODID + ":" + "dust");} - else{ - this.setTextureName(CORE.MODID + ":" + "dust"+pileSize);} + this.setMaxStackSize(64); + this.setTextureName(getCorrectTexture(pileSize)); this.setCreativeTab(tabMisc); this.colour = colour; this.materialName = materialName; @@ -82,6 +79,23 @@ public class BaseItemDustUnique extends Item{ return name; } + private String getCorrectTexture(String pileSize){ + if (!CORE.configSwitches.useGregtechTextures){ + if (pileSize == "dust" || pileSize == "Dust"){ + this.setTextureName(CORE.MODID + ":" + "dust");} + else{ + this.setTextureName(CORE.MODID + ":" + "dust"+pileSize); + } + } + if (pileSize.toLowerCase().contains("small")){ + return "gregtech" + ":" + "materialicons/SHINY/dustSmall"; + } + else if (pileSize.toLowerCase().contains("tiny")){ + return "gregtech" + ":" + "materialicons/SHINY/dustTiny"; + } + return "gregtech" + ":" + "materialicons/SHINY/dust"; + } + protected final int sRadiation; @Override public void onUpdate(ItemStack iStack, World world, Entity entityHolding, int p_77663_4_, boolean p_77663_5_) { @@ -98,7 +112,7 @@ public class BaseItemDustUnique extends Item{ } super.addInformation(stack, aPlayer, list, bool); } - + static boolean containsSubScript(String s){ if (s.contains(MaterialUtils.superscript("1"))) return true; if (s.contains(MaterialUtils.superscript("2"))) return true; diff --git a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java index dad3cf320b..6cdb426fa9 100644 --- a/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java +++ b/src/Java/gtPlusPlus/core/item/tool/staballoy/MultiPickaxeBase.java @@ -43,7 +43,7 @@ public class MultiPickaxeBase extends StaballoyPickaxe{ this.setTextureName(CORE.MODID + ":" + "itemPickaxe"); this.FACING_HORIZONTAL=true; this.setMaxStackSize(1); - this.setMaxDamage(materialDurability); + this.setMaxDamage(materialDurability*3); this.colour = colour; this.materialName = material.name(); this.setCreativeTab(AddToCreativeTab.tabTools); |