diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-10-22 14:44:26 +0100 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-10-22 14:44:26 +0100 |
commit | 75c1298c4b0e7b0024828d42e05cf03f4b9136bf (patch) | |
tree | 783309aa11b860567bae858e4f1a97fd461f6d07 /src/Java/gtPlusPlus/core/item | |
parent | 9dfe88fb1a39b03bcd418409692938cb4ff557f1 (diff) | |
download | GT5-Unofficial-75c1298c4b0e7b0024828d42e05cf03f4b9136bf.tar.gz GT5-Unofficial-75c1298c4b0e7b0024828d42e05cf03f4b9136bf.tar.bz2 GT5-Unofficial-75c1298c4b0e7b0024828d42e05cf03f4b9136bf.zip |
- Removed Circuit Nerf for GTNH, Most recipes now have increased circuit costs. Closes #391.
% Cleaned up lots of Hot Ingot code.
% Made the Multi-Machine's tooltip more verbose.
% Made the MK IV Fusion Reactor require MAX/UHV tier hatches, Closes #389.
% Increased cost of Multi Machine controller, Closes #374.
$ Fixed Hot Ingots having recycling recipes, Closes #387.
$ Fixed Tooltip for Wire Factory, Closes #379.
Diffstat (limited to 'src/Java/gtPlusPlus/core/item')
-rw-r--r-- | src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java | 34 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java | 21 |
2 files changed, 19 insertions, 36 deletions
diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java index 2ba52eda6b..78013e9c70 100644 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java +++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngot.java @@ -4,10 +4,8 @@ import net.minecraft.item.ItemStack; import gregtech.api.util.GT_ModHandler; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.item.base.BaseItemComponent; import gtPlusPlus.core.material.Material; -import gtPlusPlus.core.util.minecraft.ItemUtils; public class BaseItemIngot extends BaseItemComponent{ @@ -22,34 +20,18 @@ public class BaseItemIngot extends BaseItemComponent{ super(material, type); this.materialName = material.getLocalizedName(); this.unlocalName = material.getUnlocalizedName(); - this.generateCompressorRecipe(); + if (type != ComponentTypes.HOTINGOT) { + this.generateCompressorRecipe(); + } } private void generateCompressorRecipe(){ - if (this.unlocalName.contains("itemIngot")){ - final ItemStack tempStack = ItemUtils.getSimpleStack(this, 9); - ItemStack tempOutput = null; - String temp = this.getUnlocalizedName().replace("item.itemIngot", "block"); - Logger.WARNING("Unlocalized name for OreDict nameGen: "+this.getUnlocalizedName()); - if (this.getUnlocalizedName().contains("item.")){ - temp = this.getUnlocalizedName().replace("item.", ""); - Logger.WARNING("Generating OreDict Name: "+temp); - } - temp = temp.replace("itemIngot", "block"); - Logger.WARNING("Generating OreDict Name: "+temp); - if ((temp != null) && !temp.equals("")){ - tempOutput = ItemUtils.getItemStackOfAmountFromOreDict(temp, 1); - if (tempOutput != null){ - GT_ModHandler.addCompressionRecipe(tempStack, tempOutput); - } - - } - } - else if (this.unlocalName.contains("itemHotIngot")){ - return; + final ItemStack tempStack = componentMaterial.getIngot(9); + final ItemStack tempOutput = componentMaterial.getBlock(1); + if (tempStack != null && tempOutput != null){ + GT_ModHandler.addCompressionRecipe(tempStack, tempOutput); } - - } + } diff --git a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java index 555164229b..f9acdded7e 100644 --- a/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java +++ b/src/Java/gtPlusPlus/core/item/base/ingots/BaseItemIngotHot.java @@ -5,18 +5,21 @@ import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.Entity; +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.DamageSource; import net.minecraft.util.IIcon; import net.minecraft.world.World; - +import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; - +import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; 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.minecraft.EntityUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; public class BaseItemIngotHot extends BaseItemIngot{ @@ -55,15 +58,13 @@ public class BaseItemIngotHot extends BaseItemIngot{ @Override public void onUpdate(final ItemStack iStack, final World world, final Entity entityHolding, final int p_77663_4_, final boolean p_77663_5_) { - if (!world.isRemote){ - if(this.tickCounter < this.tickCounterMax){ - this.tickCounter++; + if (this.componentMaterial != null){ + if (entityHolding != null && entityHolding instanceof EntityPlayer){ + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + EntityUtils.applyHeatDamageToEntity(1, world, entityHolding); + } } - else if(this.tickCounter == this.tickCounterMax){ - entityHolding.attackEntityFrom(DamageSource.onFire, 1); - this.tickCounter = 0; - } - } + } super.onUpdate(iStack, world, entityHolding, p_77663_4_, p_77663_5_); } |