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 | |
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')
5 files changed, 58 insertions, 43 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_); } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java index d30e576120..a2295a9da5 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java @@ -1281,12 +1281,30 @@ public class RECIPES_Machines { if (CORE.ConfigSwitches.enableMultiblock_IndustrialMultiMachine){ ItemStack plate = ALLOY.STABALLOY.getPlate(1); - ItemStack o_Compressor = ItemList.Machine_HV_Compressor.get(1); - ItemStack o_Lathe = ItemList.Machine_HV_Lathe.get(1); - ItemStack o_Electromagnet = ItemList.Machine_HV_Polarizer.get(1); - ItemStack o_Fermenter = ItemList.Machine_HV_Fermenter.get(1); - ItemStack o_Distillery = ItemList.Machine_HV_FluidExtractor.get(1); - ItemStack o_Extractor = ItemList.Machine_HV_Extractor.get(1); + + + ItemStack o_Compressor; + ItemStack o_Lathe; + ItemStack o_Electromagnet; + ItemStack o_Fermenter; + ItemStack o_Distillery; + ItemStack o_Extractor; + if (CORE.GTNH) { + o_Compressor = ItemList.Machine_IV_Compressor.get(1); + o_Lathe = ItemList.Machine_IV_Lathe.get(1); + o_Electromagnet = ItemList.Machine_IV_Polarizer.get(1); + o_Fermenter = ItemList.Machine_IV_Fermenter.get(1); + o_Distillery = ItemList.Machine_IV_FluidExtractor.get(1); + o_Extractor = ItemList.Machine_IV_Extractor.get(1); + } + else { + o_Compressor = ItemList.Machine_EV_Compressor.get(1); + o_Lathe = ItemList.Machine_EV_Lathe.get(1); + o_Electromagnet = ItemList.Machine_EV_Polarizer.get(1); + o_Fermenter = ItemList.Machine_EV_Fermenter.get(1); + o_Distillery = ItemList.Machine_EV_FluidExtractor.get(1); + o_Extractor = ItemList.Machine_EV_Extractor.get(1); + } RecipeUtils.recipeBuilder( plate, CI.craftingToolHammer_Hard, plate, "plateStainlessSteel", "frameGtZirconiumCarbide", "plateStainlessSteel", diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java index 9ccfcc1a15..dc156c6f91 100644 --- a/src/Java/gtPlusPlus/core/recipe/common/CI.java +++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java @@ -274,7 +274,7 @@ public class CI { } } else { - return getTieredCircuitOreDictName((CORE.GTNH && tier >= 6 ? tier - 1 : tier)); + return getTieredCircuitOreDictName(tier); } return _NULL; } diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java index d2781dfc48..839cb164cb 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java @@ -81,6 +81,20 @@ public class EntityUtils { } return false; } + + public static boolean applyHeatDamageToEntity(final int heatLevel, final World world, final Entity entityHolding){ + if (!world.isRemote){ + if ((heatLevel > 0) && (entityHolding instanceof EntityLivingBase)) { + final EntityLivingBase entityLiving = (EntityLivingBase) entityHolding; + if (!((EntityPlayer) entityHolding).capabilities.isCreativeMode){ + if (!GT_Utility.isWearingFullHeatHazmat(entityLiving)) { + return GT_Utility.applyHeatDamage(entityLiving, heatLevel); + } + } + } + } + return false; + } /** |