aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/item
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2017-08-09 18:34:35 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2017-08-09 18:34:35 +1000
commit2614c050ec3456dc8085dd031831b1c927c3aea5 (patch)
tree9f4cead232fc52efb0fc63e42e8f2328483e73b2 /src/Java/gtPlusPlus/core/item
parentf329a56cfc49be13de84523bee9990ee14597b62 (diff)
downloadGT5-Unofficial-2614c050ec3456dc8085dd031831b1c927c3aea5.tar.gz
GT5-Unofficial-2614c050ec3456dc8085dd031831b1c927c3aea5.tar.bz2
GT5-Unofficial-2614c050ec3456dc8085dd031831b1c927c3aea5.zip
$ Fixed an issue where Cells and Hot Ingots wouldn't use GT textures.
^ Bumped Version.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r--src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java11
-rw-r--r--src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java29
2 files changed, 38 insertions, 2 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java
index 9bbef4db15..43e170810b 100644
--- a/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java
+++ b/src/Java/gtPlusPlus/core/item/base/cell/BaseItemCell.java
@@ -29,8 +29,15 @@ public class BaseItemCell extends BaseItemComponent{
@Override
public void registerIcons(final IIconRegister i) {
- this.base = i.registerIcon(CORE.MODID + ":" + "item"+this.Cell.getComponent());
- this.overlay = i.registerIcon(CORE.MODID + ":" + "item"+this.Cell.getComponent()+"_Overlay");
+
+ if (CORE.configSwitches.useGregtechTextures){
+ this.base = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "cell");
+ this.overlay = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "cell_OVERLAY");
+ }
+ else {
+ this.base = i.registerIcon(CORE.MODID + ":" + "item"+this.Cell.getComponent());
+ this.overlay = i.registerIcon(CORE.MODID + ":" + "item"+this.Cell.getComponent()+"_Overlay");
+ }
//this.overlay = cellMaterial.getFluid(1000).getFluid().get
}
diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java
index a06cfc2a30..dc2e86197d 100644
--- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java
+++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java
@@ -1,13 +1,16 @@
package gtPlusPlus.core.item.base.ingots;
import gregtech.api.enums.GT_Values;
+import gtPlusPlus.core.item.base.BaseItemComponent;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.item.ItemUtils;
+import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
+import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BaseItemIngotHot extends BaseItemIngot{
@@ -16,6 +19,9 @@ public class BaseItemIngotHot extends BaseItemIngot{
private int tickCounter = 0;
private final int tickCounterMax = 200;
private final int mTier;
+
+ private IIcon base;
+ private IIcon overlay;
public BaseItemIngotHot(final Material material) {
super(material, ComponentTypes.HOTINGOT);
@@ -54,5 +60,28 @@ public class BaseItemIngotHot extends BaseItemIngot{
super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_);
}
+
+ @Override
+ public void registerIcons(final IIconRegister i) {
+
+ if (CORE.configSwitches.useGregtechTextures){
+ this.base = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot");
+ this.overlay = i.registerIcon("gregtech" + ":" + "materialicons/METALLIC/" + "ingotHot_OVERLAY");
+ }
+ else {
+ this.base = i.registerIcon(CORE.MODID + ":" + "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent());
+ //this.overlay = i.registerIcon(CORE.MODID + ":" + "item"+BaseItemComponent.ComponentTypes.HOTINGOT.getComponent()+"_Overlay");
+ }
+ //this.overlay = cellMaterial.getFluid(1000).getFluid().get
+ }
+
+ @Override
+ public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) {
+ if(pass == 0 || !CORE.configSwitches.useGregtechTextures) {
+ return this.base;
+ }
+ return this.overlay;
+ }
+
}