diff options
author | Daniel <daniel112092@gmail.com> | 2017-12-11 04:42:42 +0100 |
---|---|---|
committer | Alkalus <draknyte1@hotmail.com> | 2017-12-11 13:42:42 +1000 |
commit | 482ac5d06ccaa1e553f0d8d0345a95f173d41160 (patch) | |
tree | 421c288ed777a8b47af0cfb1c3cd66f36adf3a22 /src/Java/gtPlusPlus/xmod/gregtech | |
parent | a57202442fec5f72268e622b53fb7dc626f7bdc9 (diff) | |
download | GT5-Unofficial-482ac5d06ccaa1e553f0d8d0345a95f173d41160.tar.gz GT5-Unofficial-482ac5d06ccaa1e553f0d8d0345a95f173d41160.tar.bz2 GT5-Unofficial-482ac5d06ccaa1e553f0d8d0345a95f173d41160.zip |
Merge GTNH features and changes (#160)
+ GTNH full compat mode.
+ Added boiler config, recipes changes and minor tweaks.
$ Fix nbtutuls.
$ Tree farm fixes.
% Pipe and cable rendering tweaks.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
7 files changed, 354 insertions, 228 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java index 90cecb6f0e..1561228041 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GregtechMetaPipeEntity_Cable.java @@ -1,6 +1,8 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; +import gregtech.api.enums.Dyes; import gregtech.api.enums.Materials; +import gregtech.api.enums.TextureSet; import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; @@ -13,41 +15,45 @@ import gtPlusPlus.core.lib.CORE; import net.minecraft.util.EnumChatFormatting; import static gregtech.api.enums.GT_Values.VN; +import static gtPlusPlus.core.lib.CORE.GTNH; import gregtech.api.enums.Dyes; public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implements IMetaTileEntityCable { - + private static Textures.BlockIcons INSULATION_MEDIUM_PLUS; + static{ + if(GTNH) { + try { + INSULATION_MEDIUM_PLUS = (Textures.BlockIcons) GT_Utility.getField(Textures.BlockIcons.class, "INSULATION_MEDIUM_PLUS").get(null); + } catch (IllegalAccessException | NullPointerException e) { + throw new Error(e); + } + } + } + private short[] vRGB = null; public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { super(aID, aName, aNameRegional, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); - this.vRGB = aRGB; + this.vRGB = aRGB==null || aRGB.length!=4?Materials.Iron.mRGBa:aRGB; } public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final Materials aMaterial, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { super(aName, aThickNess, aMaterial, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); - this.vRGB = aRGB; + this.vRGB = aRGB==null || aRGB.length!=4?Materials.Iron.mRGBa:aRGB; } public GregtechMetaPipeEntity_Cable(final int aID, final String aName, final String aNameRegional, final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { - super(aID, aName, aNameRegional, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); - this.vRGB = aRGB; + this(aID, aName, aNameRegional, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock,aRGB); } public GregtechMetaPipeEntity_Cable(final String aName, final float aThickNess, final long aCableLossPerMeter, final long aAmperage, final long aVoltage, final boolean aInsulated, final boolean aCanShock, final short[] aRGB) { - super(aName, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock); - this.vRGB = aRGB; + this(aName, aThickNess, null, aCableLossPerMeter, aAmperage, aVoltage, aInsulated, aCanShock,aRGB); } @Override public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) { - if (this.mMaterial == null){ - return new GregtechMetaPipeEntity_Cable(this.mName, this.mThickNess, this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock, this.vRGB); - } - else { - return new GregtechMetaPipeEntity_Cable(this.mName, this.mThickNess, this.mMaterial, this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock, this.vRGB); - } + return new GregtechMetaPipeEntity_Cable(this.mName, this.mThickNess, this.mMaterial, this.mCableLossPerMeter, this.mAmperage, this.mVoltage, this.mInsulated, this.mCanShock, this.vRGB); } @Override @@ -59,25 +65,66 @@ public class GregtechMetaPipeEntity_Cable extends GT_MetaPipeEntity_Cable implem CORE.GT_Tooltip }; } - - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, - byte aColorIndex, boolean aConnected, boolean aRedstone) { - - if (this.vRGB == null || this.vRGB.length < 3 || this.vRGB.length > 4){ - this.vRGB = new short[]{200, 0, 200, 0}; + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) { + return GTNH? + getTextureGTNH(aBaseMetaTileEntity,aSide,aConnections,aColorIndex,aConnected,aRedstone): + getTexturePure(aBaseMetaTileEntity,aSide,aConnections,aColorIndex,aConnected,aRedstone); + } + + private ITexture[] getTextureGTNH(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, + byte aColorIndex, boolean aConnected, boolean aRedstone) { + + Materials wireMaterial=mMaterial; + if (wireMaterial == null){ + wireMaterial = Materials.Iron; } - if (this.vRGB.length != 4){ - short[] tempRGB = this.vRGB; - this.vRGB = new short[]{tempRGB[0], tempRGB[1], tempRGB[2], 0}; + + if (!mInsulated) + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], Dyes.getModulation(aColorIndex, vRGB) )}; + if (aConnected) { + float tThickNess = getThickNess(); + if (tThickNess < 0.124F) + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.374F)//0.375 x1 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_TINY, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.499F)//0.500 x2 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_SMALL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.624F)//0.625 x4 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_MEDIUM, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.749F)//0.750 x8 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(INSULATION_MEDIUM_PLUS, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + if (tThickNess < 0.874F)//0.825 x12 + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_LARGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + return new ITexture[]{new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[TextureSet.INDEX_wire], vRGB), new GT_RenderedTexture(Textures.BlockIcons.INSULATION_HUGE, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; } - - Materials wireMaterial = this.mMaterial; - + return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.INSULATION_FULL, Dyes.getModulation(aColorIndex, Dyes.CABLE_INSULATION.mRGBa))}; + } + + private ITexture[] getTexturePure(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, + byte aColorIndex, boolean aConnected, boolean aRedstone) { + + //if (this.vRGB == null || this.vRGB.length < 3 || this.vRGB.length > 4){ + // this.vRGB = new short[]{200, 0, 200, 0}; + //} + //if (this.vRGB.length != 4){ + // short[] tempRGB = this.vRGB; + // this.vRGB = new short[]{tempRGB[0], tempRGB[1], tempRGB[2], 0}; + //} + // + //Materials wireMaterial = this.mMaterial; + // + //if (wireMaterial == null){ + // wireMaterial = Materials.Iron; + //} + + //With the code in constructors it should work + Materials wireMaterial=mMaterial; if (wireMaterial == null){ wireMaterial = Materials.Iron; } - - + if (!(this.mInsulated)) return new ITexture[] { new GT_RenderedTexture(wireMaterial.mIconSet.mTextures[69], Dyes.getModulation(aColorIndex, this.vRGB)) }; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java index f336d2e11a..cc23ac762d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java @@ -27,15 +27,15 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { public GT_MetaTileEntity_Boiler_Base(int aID, String aNameRegional, int aBoilerTier) { super(aID, "electricboiler." + aBoilerTier + ".tier.single", aNameRegional, - "Produces " + (750 * aBoilerTier) + "L of Steam per second"); - this.mSteamPerSecond = (750 * aBoilerTier); + "Produces " + (CORE.configSwitches.boilerSteamPerSecond * aBoilerTier) + "L of Steam per second"); + this.mSteamPerSecond = (CORE.configSwitches.boilerSteamPerSecond * aBoilerTier); this.mPollutionPerSecond = 20 + (15 * aBoilerTier); this.mBoilerTier = aBoilerTier; } public GT_MetaTileEntity_Boiler_Base(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { super(aName, aTier, aDescription, aTextures); - this.mSteamPerSecond = (750 * aTier); + this.mSteamPerSecond = (CORE.configSwitches.boilerSteamPerSecond * aTier); this.mPollutionPerSecond = 20 + (15 * aTier); this.mBoilerTier = aTier; } @@ -196,13 +196,13 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler { if ((aBaseMetaTileEntity.isServerSide()) && (aTick > 20L)) { // Utils.LOG_INFO("Ticking Boiler"); - if (aTick % 60L == 0L) { + //if (aTick % 60L == 0L) { // Utils.LOG_INFO("Temp:"+this.mTemperature); // Utils.LOG_INFO("getCapacity():"+this.getCapacity()); // Utils.LOG_INFO("maxProgresstime():"+this.maxProgresstime()); // Utils.LOG_INFO("mSteamPerSecond:"+this.mSteamPerSecond); // Utils.LOG_INFO("mProcessingEnergy:"+this.mProcessingEnergy); - } + //} if (this.mTemperature <= 20) { this.mTemperature = 20; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java index dd2837b021..d8b5e16b7c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityTreeFarm.java @@ -49,6 +49,8 @@ import net.minecraft.server.MinecraftServer; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidStack; +import java.util.ArrayList; + public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlockBase { /* private */ private int treeCheckTicks = 0; @@ -59,9 +61,9 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock private short energyHatchRetryCount = 0; - //Too Many logs, lag breaker - private final boolean takingBreak = false; - private final int logsToBreakAfter = 500; + //Too Many logs, lag breaker -- CONVERTED to local variables + //private final boolean takingBreak = false; + //private final int logsToBreakAfter = 500; private EntityPlayerMP farmerAI; @@ -305,7 +307,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock return false; } } - //Deal with Bottom edges (Add Hatches/Busses first, othercheck make sure it's dirt) //TODO change the casings to not dirt~ + //Deal with Bottom edges (Add Hatches/Busses first, othercheck make sure it's dirt) //TODO change the casings to not dirt~? else if (h == 0) { if ((!this.addMaintenanceToMachineList(tTileEntity, 77)) && (!this.addInputToMachineList(tTileEntity, 77)) && (!this.addOutputToMachineList(tTileEntity, 77)) && (!this.addEnergyInputToMachineList(tTileEntity, 77))) { if (((xDir + i) != 0) || ((zDir + j) != 0)) {//no controller @@ -375,7 +377,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock @Override public int getDamageToComponent(final ItemStack aStack) { - return 1; + return 0;//moved to cut log instead } public int getAmountOfOutputs() { @@ -427,6 +429,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock final World world = aBaseMetaTileEntity.getWorld(); int posX, posY, posZ; + int logsToBreakAfter = 500; if (this.mInternalPower >= 128) { OUTER : for (int h=0;h<150;h++){ @@ -434,17 +437,18 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock for (int j = -7; j <= 7; j++) { - + //can be simplified... //Cut too many logs, do this to prevent lag. - if (logsCut >= this.logsToBreakAfter){ + boolean takingBreak = false; + if (logsCut >= logsToBreakAfter){ stopCheck = true; } //Already Breaking but first two layers are empty, let's do a full check. - else if ((logsCut == 0) && (h == 2) && this.takingBreak){ + else if ((logsCut == 0) && (h == 2) && takingBreak){ stopCheck = false; } //No Trees Grown and not breaking, take a break, reduce lag. - else if ((logsCut == 0) && (h == 3) && !this.takingBreak){ + else if ((logsCut == 0) && (h == 3) && !takingBreak){ stopCheck = true; } else { @@ -453,7 +457,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock if (stopCheck){ Utils.LOG_MACHINE_INFO("Either found too many logs, so taking a break mid cut for lag conservation, or found no trees to cut, so stopping"); - Utils.LOG_MACHINE_INFO("found: "+logsCut +" and check up to h:"+h+" - Taking Break:"+this.takingBreak); + Utils.LOG_MACHINE_INFO("found: "+logsCut +" and check up to h:"+h+" - Taking Break:"+ takingBreak); stopCheck = false; break OUTER; } @@ -503,7 +507,7 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock } this.canChop = false; - if (logsCut >= this.logsToBreakAfter){ + if (logsCut >= logsToBreakAfter){ TreeFarmHelper.cleanUp(aBaseMetaTileEntity); } return false; @@ -668,6 +672,13 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock private boolean cutLog(final World world, final int x, final int y, final int z){ //Utils.LOG_MACHINE_INFO("Cutting Log"); try { + //Actually damage item... + if(!GT_ModHandler.damageOrDechargeItem(this.mInventory[1], 1, 10, this.farmerAI)){ + if (mInventory[1].stackSize == 0) mInventory[1] = null; + return false; + } + if (mInventory[1].stackSize == 0) mInventory[1] = null; + final Block block = world.getBlock(x, y, z); int chanceForLeaves = 1000; //is it leaves or a log? if leaves, heavily reduce chance to obtain rubber/output @@ -711,10 +722,8 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock //Remove drop that was added to the bus. world.setBlockToAir(x, y, z); new BlockBreakParticles(world, x, y, z, block); - damageOrDechargeItem(this.mInventory[1], 1, 10, this.farmerAI); + //damageOrDechargeItem(this.mInventory[1], 1, 10, this.farmerAI); done above return true; - - } catch (final NullPointerException e){} return false; } @@ -993,42 +1002,42 @@ public class GregtechMetaTileEntityTreeFarm extends GT_MetaTileEntity_MultiBlock } - - public static boolean damageOrDechargeItem(ItemStack aStack, int aDamage, int aDecharge, EntityLivingBase aPlayer) { - if ((GT_Utility.isStackInvalid(aStack)) || ((aStack.getMaxStackSize() <= 1) && (aStack.stackSize > 1))) - return false; - if ((aPlayer != null) && (aPlayer instanceof EntityPlayer) - && (((EntityPlayer) aPlayer).capabilities.isCreativeMode)) - return true; - if (aStack.getItem() instanceof IDamagableItem) - return ((IDamagableItem) aStack.getItem()).doDamageToItem(aStack, aDamage); - if (GT_ModHandler.isElectricItem(aStack)) { - if (GT_ModHandler.canUseElectricItem(aStack, aDecharge)) { - if ((aPlayer != null) && (aPlayer instanceof EntityPlayer)) { - return GT_ModHandler.useElectricItem(aStack, aDecharge, (EntityPlayer) aPlayer); - } - return (GT_ModHandler.dischargeElectricItem(aStack, aDecharge, 2147483647, true, false, true) >= aDecharge); - } - } - else if (aStack.getItem().isDamageable()) { - if (aPlayer == null) - aStack.setItemDamage(aStack.getItemDamage() + aDamage); - else { - aStack.damageItem(aDamage, aPlayer); - } - if (aStack.getItemDamage() >= aStack.getMaxDamage()) { - aStack.setItemDamage(aStack.getMaxDamage() + 1); - ItemStack tStack = GT_Utility.getContainerItem(aStack, true); - if (tStack != null) { - aStack.func_150996_a(tStack.getItem()); - aStack.setItemDamage(tStack.getItemDamage()); - aStack.stackSize = tStack.stackSize; - aStack.setTagCompound(tStack.getTagCompound()); - } - } - return true; - } - return false; - } + //@Deprecated + //public static boolean damageOrDechargeItem(ItemStack aStack, int aDamage, int aDecharge, EntityLivingBase aPlayer) { + // if ((GT_Utility.isStackInvalid(aStack)) || ((aStack.getMaxStackSize() <= 1) && (aStack.stackSize > 1))) + // return false; + // if ((aPlayer != null) && (aPlayer instanceof EntityPlayer) + // && (((EntityPlayer) aPlayer).capabilities.isCreativeMode)) + // return true; + // if (aStack.getItem() instanceof IDamagableItem) + // return ((IDamagableItem) aStack.getItem()).doDamageToItem(aStack, aDamage); + // if (GT_ModHandler.isElectricItem(aStack)) { + // if (GT_ModHandler.canUseElectricItem(aStack, aDecharge)) { + // if ((aPlayer != null) && (aPlayer instanceof EntityPlayer)) { + // return GT_ModHandler.useElectricItem(aStack, aDecharge, (EntityPlayer) aPlayer); + // } + // return (GT_ModHandler.dischargeElectricItem(aStack, aDecharge, 2147483647, true, false, true) >= aDecharge); + // } + // } + // else if (aStack.getItem().isDamageable()) { + // if (aPlayer == null) + // aStack.setItemDamage(aStack.getItemDamage() + aDamage); + // else { + // aStack.damageItem(aDamage, aPlayer); + // } + // if (aStack.getItemDamage() >= aStack.getMaxDamage()) { + // aStack.setItemDamage(aStack.getMaxDamage() + 1); + // ItemStack tStack = GT_Utility.getContainerItem(aStack, true); + // if (tStack != null) { + // aStack.func_150996_a(tStack.getItem()); + // aStack.setItemDamage(tStack.getItemDamage()); + // aStack.stackSize = tStack.stackSize; + // aStack.setTagCompound(tStack.getTagCompound()); + // } + // } + // return true; + // } + // return false; + //} }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java index 5fd4468981..873987544a 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelterGT_Ex.java @@ -32,12 +32,12 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator { public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - boolean mIgnoreHighTemp = CORE.GTNH ? true : false; + boolean keepHighTempRecipes = !CORE.GTNH; switch (aPrefix) { case dust: ItemStack tDustStack; - if (mIgnoreHighTemp && aMaterial.mBlastFurnaceTemp <= 3600 || !mIgnoreHighTemp){ + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ if ((null != (tDustStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L))) && (!aMaterial.contains(SubTag.NO_SMELTING))) { if (aMaterial.mBlastFurnaceRequired) { addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); @@ -48,7 +48,7 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator { } } case ingot: - if (mIgnoreHighTemp && aMaterial.mBlastFurnaceTemp <= 3600 || !mIgnoreHighTemp){ + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ if ((null != (tDustStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L))) && (!aMaterial.contains(SubTag.NO_SMELTING))) { if (aMaterial.mBlastFurnaceRequired) { addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, tDustStack, 1L) : GT_Utility.copyAmount(1L, new Object[]{tDustStack}), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); @@ -57,14 +57,14 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator { } break; case dustSmall: - if (mIgnoreHighTemp && aMaterial.mBlastFurnaceTemp <= 3600 || !mIgnoreHighTemp){ + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ if (aMaterial.mBlastFurnaceRequired) { addBlastRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); } } break; case dustTiny: - if (mIgnoreHighTemp && aMaterial.mBlastFurnaceTemp <= 3600 || !mIgnoreHighTemp){ + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ if (!aMaterial.contains(gregtech.api.enums.SubTag.NO_SMELTING)) { if (aMaterial.mBlastFurnaceRequired) { addBlastRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial.mSmeltInto, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mSmeltInto, 1L), null, (int) Math.max(aMaterial.getMass() / 40L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); @@ -74,7 +74,7 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator { } break; default: - if (mIgnoreHighTemp && aMaterial.mBlastFurnaceTemp <= 3600 || !mIgnoreHighTemp){ + if (keepHighTempRecipes || aMaterial.mBlastFurnaceTemp <= 3600){ if (!aMaterial.contains(SubTag.NO_SMELTING)) { if ((aMaterial.mBlastFurnaceRequired) || (aMaterial.mDirectSmelting.mBlastFurnaceRequired)) { addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, aMaterial.mBlastFurnaceTemp > 1750 ? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L) : GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), null, (int) Math.max(aMaterial.getMass() / 4L, 1L) * aMaterial.mBlastFurnaceTemp, 120, aMaterial); @@ -106,7 +106,7 @@ public class RecipeGen_BlastSmelterGT_Ex implements IOreRecipeRegistrator { //If both inputs are null, then we don't want to try. return false; } - else if (input1 == null || input2 == null){ + else { count = 1; } //Set up input components. diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index ae05fdcaa4..3c43e73faf 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -255,10 +255,6 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { }catch (final NullPointerException e){Utils.LOG_WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");return false;} } - - - - @Override public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration, final int aEUt) { if ((aInput == null) || (aOutput == null)) { diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index 480e2e775f..1d62540a41 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -1,10 +1,12 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; +import static gtPlusPlus.core.lib.CORE.GTNH; import static gtPlusPlus.core.lib.LoadedMods.Gregtech; import java.util.ArrayList; import gregtech.api.enums.*; +import gregtech.api.interfaces.ITexture; import gregtech.api.metatileentity.implementations.GT_MetaPipeEntity_Fluid; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; @@ -31,6 +33,16 @@ public class GregtechConduits { * */ + private static OrePrefixes cableGt16; + static{ + if(GTNH) { + try { + cableGt16=(OrePrefixes) GT_Utility.getField(OrePrefixes.class,"cableGt16").get(null); + }catch (IllegalAccessException | NullPointerException e){ + throw new Error(e); + } + } + } private static int BaseWireID = 30600; private static int BasePipeID = 30700; @@ -60,19 +72,16 @@ public class GregtechConduits { wireFactory("RedstoneAlloy", 32, BaseWireID+45, 0, 2, 1, new short[]{178,34,34, 0}); } - customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID+45+11, 1, 2, 2); - customWireFactory(ELEMENT.getInstance().ZIRCONIUM, 128, BaseWireID+67, 1, 2, 2); - customWireFactory(ALLOY.HG1223, 32768, BaseWireID+78, 2, 8, 4); - + if(!GTNH) { + customWireFactory(ALLOY.LEAGRISIUM, 512, BaseWireID + 45 + 11, 1, 2, 2); + customWireFactory(ELEMENT.getInstance().ZIRCONIUM, 128, BaseWireID + 67, 1, 2, 2); + customWireFactory(ALLOY.HG1223, 32768, BaseWireID + 78, 2, 8, 4); + } //superConductorFactory(GT_Materials.Superconductor, 524288, 30660, 0, 0, 8); if (LoadedMods.Thaumcraft){ //superConductorFactory(GT_Materials.Void, 512, 30661, 0, 0, 8); } - - - - } private static void run2(){ @@ -117,15 +126,18 @@ public class GregtechConduits { GT_OreDictUnificator.registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Wire", 0.25F, aMaterial, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Wire", 0.375F, aMaterial, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.wireGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Wire", 0.50F, aMaterial, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", 0.75F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", 1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Wire", GTNH?0.625F:0.75F, aMaterial, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Wire", GTNH?0.75F:1.0F, aMaterial, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aRGB).getStackForm(1L)); if (aInsulatable) { GT_OreDictUnificator.registerOre(OrePrefixes.cableGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.name().toLowerCase() + ".01", "1x " + aMaterial.mDefaultLocalName + " Cable", 0.25F, aMaterial, aLossInsulated, 1L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.name().toLowerCase() + ".02", "2x " + aMaterial.mDefaultLocalName + " Cable", 0.375F, aMaterial, aLossInsulated, 2L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.name().toLowerCase() + ".04", "4x " + aMaterial.mDefaultLocalName + " Cable", 0.5F, aMaterial, aLossInsulated, 4L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.cableGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.name().toLowerCase() + ".08", "8x " + aMaterial.mDefaultLocalName + " Cable", 0.625F, aMaterial, aLossInsulated, 8L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", 0.875F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.name().toLowerCase() + ".12", "12x " + aMaterial.mDefaultLocalName + " Cable", GTNH?0.75F:0.875F, aMaterial, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + if(GTNH){ + GT_OreDictUnificator.registerOre(cableGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.name().toLowerCase() + ".16", "16x " + aMaterial.mDefaultLocalName + " Cable", 0.875f, aMaterial, aLossInsulated, 16L * aAmperage, aVoltage, true, false, aRGB).getStackForm(1L)); + } } } @@ -146,15 +158,18 @@ public class GregtechConduits { registerOre(OrePrefixes.wireGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 1, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Wire", 0.25F, aLoss, 2L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); registerOre(OrePrefixes.wireGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 2, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Wire", 0.375F, aLoss, 4L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); registerOre(OrePrefixes.wireGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 3, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".08", "8x " + aMaterial.getLocalizedName() + " Wire", 0.50F, aLoss, 8L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Wire", 0.75F, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Wire", 1.0F, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 4, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Wire", GTNH?0.625F:0.75F, aLoss, 12L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.wireGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 5, "wire." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Wire", GTNH?0.75F:1.0F, aLoss, 16L * aAmperage, aVoltage, false, !aAutoInsulated, aMaterial.getRGBA()).getStackForm(1L)); if (aInsulatable) { registerOre(OrePrefixes.cableGt01, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 6, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".01", "1x " + aMaterial.getLocalizedName() + " Cable", 0.25F, aLossInsulated, 1L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); registerOre(OrePrefixes.cableGt02, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 7, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".02", "2x " + aMaterial.getLocalizedName() + " Cable", 0.375F, aLossInsulated, 2L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); registerOre(OrePrefixes.cableGt04, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 8, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".04", "4x " + aMaterial.getLocalizedName() + " Cable", 0.5F, aLossInsulated, 4L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); registerOre(OrePrefixes.cableGt08, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 9, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".08", "8x " + aMaterial.getLocalizedName() + " Cable", 0.625F, aLossInsulated, 8L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); - registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Cable", 0.875F, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + registerOre(OrePrefixes.cableGt12, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 10, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".12", "12x " + aMaterial.getLocalizedName() + " Cable", GTNH?0.75F:0.875F, aLossInsulated, 12L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + if(GTNH){ + registerOre(cableGt16, aMaterial, new GregtechMetaPipeEntity_Cable(aStartID + 11, "cable." + aMaterial.getLocalizedName().toLowerCase() + ".16", "16x " + aMaterial.getLocalizedName() + " Cable", 0.875f, aLossInsulated, 16L * aAmperage, aVoltage, true, false, aMaterial.getRGBA()).getStackForm(1L)); + } } generateWireRecipes(aMaterial); @@ -213,7 +228,7 @@ public class GregtechConduits { GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material), new GT_MetaPipeEntity_Fluid(startID+1, "GT_Pipe_"+material.mDefaultLocalName+"_Small", "Small "+material.mDefaultLocalName+" Fluid Pipe", 0.375F, material, transferRatePerTick*4, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GT_MetaPipeEntity_Fluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*6, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GT_MetaPipeEntity_Fluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*8, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GT_MetaPipeEntity_Fluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", 1.0F, material, transferRatePerTick*10, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GT_MetaPipeEntity_Fluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*10, heatResistance, isGasProof).getStackForm(1L)); generatePipeRecipes(material.mDefaultLocalName, mass, voltage); } @@ -239,7 +254,7 @@ public class GregtechConduits { GT_OreDictUnificator.registerOre(OrePrefixes.pipeSmall.get(material), new GregtechMetaPipeEntityFluid(startID+1, "GT_Pipe_"+material.mDefaultLocalName+"_Small", "Small "+material.mDefaultLocalName+" Fluid Pipe", 0.375F, material, transferRatePerTick*4, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeMedium.get(material), new GregtechMetaPipeEntityFluid(startID+2, "GT_Pipe_"+material.mDefaultLocalName+"", ""+material.mDefaultLocalName+" Fluid Pipe", 0.5F, material, transferRatePerTick*6, heatResistance, isGasProof).getStackForm(1L)); GT_OreDictUnificator.registerOre(OrePrefixes.pipeLarge.get(material), new GregtechMetaPipeEntityFluid(startID+3, "GT_Pipe_"+material.mDefaultLocalName+"_Large", "Large "+material.mDefaultLocalName+" Fluid Pipe", 0.75F, material, transferRatePerTick*8, heatResistance, isGasProof).getStackForm(1L)); - GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GregtechMetaPipeEntityFluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", 1.0F, material, transferRatePerTick*10, heatResistance, isGasProof).getStackForm(1L)); + GT_OreDictUnificator.registerOre(OrePrefixes.pipeHuge.get(material), new GregtechMetaPipeEntityFluid(startID+4, "GT_Pipe_"+material.mDefaultLocalName+"_Huge", "Huge "+material.mDefaultLocalName+" Fluid Pipe", GTNH?0.875F:1.0F, material, transferRatePerTick*10, heatResistance, isGasProof).getStackForm(1L)); generatePipeRecipes(material.mDefaultLocalName, mass, tVoltageMultiplier); } @@ -384,48 +399,48 @@ public class GregtechConduits { GT_Values.RA.addWiremillRecipe( ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - 5*20, + 5*20, 4); //Extruder GT_Values.RA.addExtruderRecipe( ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("ingot"+aMaterial.getLocalizedName()), 1), ItemList.Shape_Extruder_Wire.get(0), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - 196, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + 196, 96); GT_Values.RA.addUnboxingRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - null, - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + null, + 100, 8); //Shapeless Down-Crafting //2x RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1)}, + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1)}, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2) ); //4x RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1)}, + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1)}, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 4) ); //8x RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1)}, + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1)}, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 8) ); //12x RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1)}, + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1)}, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 12) ); //16x RecipeUtils.addShapelessGregtechRecipe( - new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1)}, + new ItemStack[]{ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1)}, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 16) ); @@ -435,7 +450,7 @@ public class GregtechConduits { new ItemStack[]{ ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) ); @@ -444,7 +459,7 @@ public class GregtechConduits { new ItemStack[]{ ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) ); @@ -453,7 +468,7 @@ public class GregtechConduits { new ItemStack[]{ ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) ); @@ -462,7 +477,7 @@ public class GregtechConduits { new ItemStack[]{ ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) ); @@ -471,7 +486,7 @@ public class GregtechConduits { new ItemStack[]{ ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) ); @@ -480,7 +495,7 @@ public class GregtechConduits { new ItemStack[]{ ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1) ); @@ -491,7 +506,7 @@ public class GregtechConduits { ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1) ); @@ -506,7 +521,7 @@ public class GregtechConduits { ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1) - }, + }, ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1) ); @@ -514,94 +529,103 @@ public class GregtechConduits { //Wire to Cable //1x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 144), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 144), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt01"+aMaterial.getLocalizedName()), 1), + 100, 8); //2x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 144), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt02"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 144), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt02"+aMaterial.getLocalizedName()), 1), + 100, 8); //4x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 288), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt04"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 288), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt04"+aMaterial.getLocalizedName()), 1), + 100, 8); //8x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 432), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt08"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 432), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt08"+aMaterial.getLocalizedName()), 1), + 100, 8); //12x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), - CI.getNumberedCircuit(24), - FluidUtils.getFluidStack("molten.rubber", 576), - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt12"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 576), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt12"+aMaterial.getLocalizedName()), 1), + 100, 8); + if(GTNH){ + //16x + GT_Values.RA.addAssemblerRecipe( + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), + CI.getNumberedCircuit(24), + FluidUtils.getFluidStack("molten.rubber", 720), + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("cableGt16"+aMaterial.getLocalizedName()), 1), + 100, + 8); + } + //Assemble small wires into bigger wires //2x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(2), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(2), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt02"+aMaterial.getLocalizedName()), 1), + 100, 8); //4x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(4), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(4), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt04"+aMaterial.getLocalizedName()), 1), + 100, 8); //8x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(8), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(8), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt08"+aMaterial.getLocalizedName()), 1), + 100, 8); //12x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(12), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(12), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt12"+aMaterial.getLocalizedName()), 1), + 100, 8); //16x GT_Values.RA.addAssemblerRecipe( - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), - CI.getNumberedCircuit(16), - null, - ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), - 100, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt01"+aMaterial.getLocalizedName()), 2), + CI.getNumberedCircuit(16), + null, + ItemUtils.getItemStackOfAmountFromOreDict(Utils.sanitizeString("wireGt16"+aMaterial.getLocalizedName()), 1), + 100, 8); - - return true; } }
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java index d66bc56a79..05b9e1e6fe 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechHiAmpTransformer.java @@ -8,6 +8,8 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTransformerHiAmp; import net.minecraft.item.ItemStack; +import static gtPlusPlus.core.lib.CORE.GTNH; + public class GregtechHiAmpTransformer { @@ -33,9 +35,13 @@ public class GregtechHiAmpTransformer { "LuV Hi-Amp Transformer", 6, "ZPM -> LuV (Use Soft Hammer to invert)").getStackForm(1L)); GregtechItemList.Transformer_HA_UV_ZPM.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.07", "ZPM Hi-Amp Transformer", 7, "UV -> ZPM (Use Soft Hammer to invert)").getStackForm(1L)); - GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", - "UV Hi-Amp Transformer", 8, "Any Voltage -> UV (Use Soft Hammer to invert)").getStackForm(1L)); - + if (!GTNH) { + GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", + "UV Hi-Amp Transformer", 8, "Any Voltage -> UV (Use Soft Hammer to invert)").getStackForm(1L)); + } else { + GregtechItemList.Transformer_HA_MAX_UV.set(new GregtechMetaTransformerHiAmp(mID++, "transformer.ha.tier.08", + "UV Hi-Amp Transformer", 8, "UHV -> UV (Use Soft Hammer to invert)").getStackForm(1L)); + } ItemStack mItem_1; ItemStack mItem_2; ItemStack mItem_3; @@ -54,49 +60,93 @@ public class GregtechHiAmpTransformer { } catch (Throwable t){ mItem_3 = ItemList.Circuit_Ultimate.get(1); } - - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Lead) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Copper), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Tin) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, - new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.AnnealedCopper) }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), - ItemList.Casing_Coil_Cupronickel }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), - ItemList.Casing_Coil_Kanthal }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), - ItemList.Casing_Coil_Nichrome }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('C'), - OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), - mItem_1 }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('C'), - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), - OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), - mItem_2 }); - GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, - new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('C'), - OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), - OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), - mItem_3 }); + if(!GTNH){ + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_ULV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Lead) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_LV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Copper), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tin) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Hull_MV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.AnnealedCopper) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_HV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), + ItemList.Casing_Coil_Cupronickel }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_EV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), + ItemList.Casing_Coil_Kanthal }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_IV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), + ItemList.Casing_Coil_Nichrome }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_LuV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), + mItem_1 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_ZPM, Character.valueOf('C'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), + mItem_2 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Hull_UV, Character.valueOf('C'), + OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), + mItem_3 }); + }else{ + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LV_ULV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_LV_ULV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tin), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Lead) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MV_LV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_MV_LV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.AnyCopper), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tin) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_HV_MV.get(1L, new Object[0]), bitsd, + new Object[] { " BB", "CM ", " BB", Character.valueOf('M'), ItemList.Transformer_HV_MV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.AnyCopper) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_EV_HV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_EV_HV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Gold), Character.valueOf('K'), + ItemList.Casing_Coil_Cupronickel }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_IV_EV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_IV_EV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Aluminium), Character.valueOf('K'), + ItemList.Casing_Coil_Kanthal }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_LuV_IV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_LuV_IV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Tungsten), Character.valueOf('K'), + ItemList.Casing_Coil_Nichrome }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_ZPM_LuV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_ZPM_LuV, Character.valueOf('C'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.VanadiumGallium), Character.valueOf('K'), + mItem_1 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_UV_ZPM.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_UV_ZPM, Character.valueOf('C'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('B'), + OrePrefixes.wireGt16.get(Materials.Naquadah), Character.valueOf('K'), + mItem_2 }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Transformer_HA_MAX_UV.get(1L, new Object[0]), bitsd, + new Object[] { "KBB", "CM ", "KBB", Character.valueOf('M'), ItemList.Transformer_MAX_UV, Character.valueOf('C'), + OrePrefixes.wireGt01.get(Materials.Superconductor), Character.valueOf('B'), + OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), Character.valueOf('K'), + mItem_3 }); + } } } |