diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-15 17:17:23 +0000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2020-01-15 17:17:23 +0000 |
commit | c5189e5888e6d3452f7ce05952f21cfe21ed491a (patch) | |
tree | 36c69eb84903dabc5491e8eda481af831aee03fe /src/Java/gtPlusPlus/xmod | |
parent | 22cace4591b92f0d702b6001998df34256e12093 (diff) | |
download | GT5-Unofficial-c5189e5888e6d3452f7ce05952f21cfe21ed491a.tar.gz GT5-Unofficial-c5189e5888e6d3452f7ce05952f21cfe21ed491a.tar.bz2 GT5-Unofficial-c5189e5888e6d3452f7ce05952f21cfe21ed491a.zip |
+ Added Transmission Components.
% Adjusted recipe for Chemical Plant controller, to now use T2 Frames instead of ambiguously tiered Stainless Steel Frames.
% Adjusted a few recipes using Sensors & Emitters to now use TransComps.
% Chunkloaders now have different textures and more informative tooltips.
% Chunkloaders now have better ranges.
% Renamed Fluid Reactor to Chemical Plant.
$ Fixed Chemical Plant NEI handler.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod')
8 files changed, 128 insertions, 152 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 28692e25cb..ea2b192018 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -39,6 +39,13 @@ public enum GregtechItemList implements GregtechItemContainer { Emitter_ULV, Sensor_ULV, + // Mixed Components + TransmissionComponent_ULV, TransmissionComponent_LV, + TransmissionComponent_MV, TransmissionComponent_HV, + TransmissionComponent_EV, TransmissionComponent_IV, + TransmissionComponent_LuV, TransmissionComponent_ZPM, + TransmissionComponent_UV, TransmissionComponent_MAX, + //Recipe Circuit Circuit_BioRecipeSelector, @@ -625,7 +632,9 @@ public enum GregtechItemList implements GregtechItemContainer { FakeMachineCasingPlate_MV, FakeMachineCasingPlate_HV, FakeMachineCasingPlate_EV, FakeMachineCasingPlate_IV, FakeMachineCasingPlate_LuV, FakeMachineCasingPlate_ZPM, - FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX, + FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX, + + //---------------------------------------------------------------------------- diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java index 83f052a983..cb889e0233 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java @@ -271,7 +271,7 @@ public interface IGregtech_RecipeAdder { public boolean addUvLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu); public boolean addIrLaserRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput, int time, long eu); - public boolean addFluidReactorRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier); + public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier); public boolean addBlastRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aHeat); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java index ef92f9919d..a5430846a9 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/items/Gregtech_MetaItem_X32.java @@ -192,22 +192,9 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { @Override public int getColorFromItemStack(final ItemStack stack, int HEX_OxFFFFFF) { - if (stack.getDisplayName().contains("ULV")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); - } - else if (stack.getDisplayName().contains("LuV")){ - HEX_OxFFFFFF = 0xffffcc; - } - else if (stack.getDisplayName().contains("ZPM")){ - HEX_OxFFFFFF = 0xffe600; - } - else if (stack.getDisplayName().contains("UV")){ - HEX_OxFFFFFF = 0xffb300; - } - else if (stack.getDisplayName().contains("MAX")){ - HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250)); - } - else if (stack.getDisplayName().contains("Sodium")){ + + int aMeta = stack.getItemDamage(); + if (stack.getDisplayName().contains("Sodium")){ HEX_OxFFFFFF = Utils.rgbtoHexValue(90, 90, 255); } else if (stack.getDisplayName().contains("Cadmium")){ @@ -228,8 +215,28 @@ public abstract class Gregtech_MetaItem_X32 extends Gregtech_MetaItem { else if (stack.getDisplayName().contains("Invar")){ HEX_OxFFFFFF = Utils.rgbtoHexValue(180, 180, 120); } - else { - HEX_OxFFFFFF = 0xffffff; + else { + if (aMeta > 50 && aMeta != 150) { + HEX_OxFFFFFF = 0xffffff; + } + else if (stack.getDisplayName().contains("ULV")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(200, 180, 180); + } + else if (stack.getDisplayName().contains("LuV")){ + HEX_OxFFFFFF = 0xffffcc; + } + else if (stack.getDisplayName().contains("ZPM")){ + HEX_OxFFFFFF = 0xffe600; + } + else if (stack.getDisplayName().contains("UV")){ + HEX_OxFFFFFF = 0xffb300; + } + else if (stack.getDisplayName().contains("MAX")){ + HEX_OxFFFFFF = Utils.rgbtoHexValue(MathUtils.randInt(220, 250), MathUtils.randInt(221, 251), MathUtils.randInt(220, 250)); + } + else { + HEX_OxFFFFFF = 0xffffff; + } } return HEX_OxFFFFFF; } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java index 97621203cd..15934784a3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java @@ -339,7 +339,23 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 { } } GregtechItemList.Laser_Lens_WoodsGlass.set(this.addItem(140, "Wood's Glass Lens", "Allows UV & IF to pass through, blocks visible light spectrums")); - + + int aStartID = 141; + GregtechItemList[] aTransParts = new GregtechItemList[] { + GregtechItemList.TransmissionComponent_ULV, + GregtechItemList.TransmissionComponent_LV, + GregtechItemList.TransmissionComponent_MV, + GregtechItemList.TransmissionComponent_HV, + GregtechItemList.TransmissionComponent_EV, + GregtechItemList.TransmissionComponent_IV, + GregtechItemList.TransmissionComponent_LuV, + GregtechItemList.TransmissionComponent_ZPM, + GregtechItemList.TransmissionComponent_UV, + GregtechItemList.TransmissionComponent_MAX, + }; + for (int aIndex=0;aIndex<10;aIndex++){ + aTransParts[aIndex].set(this.addItem(aStartID++, "Transmission Component ("+GT_Values.VN[aIndex]+")", "", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, aIndex), getTcAspectStack(TC_Aspects.MACHINA, aIndex), getTcAspectStack(TC_Aspects.MAGNETO, aIndex)})); + } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java index 2a2b6d5090..140f1d9cd5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntityChunkLoader.java @@ -1,7 +1,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic; import static gregtech.api.enums.GT_Values.V; -import static gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils.mPollution; import java.util.HashSet; import java.util.Set; @@ -10,20 +9,13 @@ import gregtech.api.enums.Textures; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.interfaces.IChunkLoader; -import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.chunkloading.GTPP_ChunkManager; import gtPlusPlus.core.chunkloading.StaticChunkFunctions; import gtPlusPlus.core.lib.CORE; -import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; -import gtPlusPlus.core.util.minecraft.PlayerUtils; -import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; -import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -36,17 +28,7 @@ import net.minecraft.world.chunk.Chunk; public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMachine implements IChunkLoader { public GregtechMetaTileEntityChunkLoader(int aID, String aName, String aNameRegional, int aTier) { - super(aID, aName, aNameRegional, aTier, 2, "Loads " + getMaxChunksToLoadForTier(aTier) + " chunks when powered", 0, 0, "Recycler.png", "", - new ITexture[]{ - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), - new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab_Active), - new GT_RenderedTexture(TexturesGtBlock.Overlay_MatterFab), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent_Fast), - new GT_RenderedTexture(TexturesGtBlock.Overlay_Machine_Vent), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), - new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB) - }); + super(aID, aName, aNameRegional, aTier, 2, "Loads " + getMaxChunksToLoadForTier(aTier) + " chunks when powered", 0, 0, "Recycler.png", "", new ITexture[]{}); } public GregtechMetaTileEntityChunkLoader(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) { @@ -54,13 +36,27 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa } public static int getMaxChunksToLoadForTier(int aTier) { - return (aTier * aTier); + if (aTier < 4) { + return 3 * 3; + } + if (aTier < 6) { + return 7 * 7; + } + if (aTier < 8) { + return 15 * 15; + } + else { + return 0; + } } @Override public String[] getDescription() { return new String[] { - this.mDescription, + "Loads " + getMaxChunksToLoadForTier(this.mTier) + " chunks when powered", + "Consumes 2A", + "Behaves Identically to a Railcraft World Anchor", + CORE.GT_Tooltip }; } @@ -89,57 +85,56 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa public ITexture[] getFront(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; } public ITexture[] getBack(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; } public ITexture[] getBottom(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; } public ITexture[] getTop(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; } public ITexture[] getSides(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier])}; } public ITexture[] getFrontActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; } public ITexture[] getBackActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; } public ITexture[] getBottomActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; } public ITexture[] getTopActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; } public ITexture[] getSidesActive(final byte aColor) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)}; + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_MaragingSteel), new GT_RenderedTexture(TexturesGtBlock.TIERED_MACHINE_HULLS[mTier+1])}; } @Override public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { - PlayerUtils.messagePlayer(aPlayer, "Running every "+" minutes."); super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); } @@ -175,9 +170,7 @@ public class GregtechMetaTileEntityChunkLoader extends GT_MetaTileEntity_BasicMa @Override public String[] getInfoData() { - return new String[] { - this.getLocalName() - }; + return super.getInfoData(); } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java index b7e4618e07..79d256909d 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java @@ -43,23 +43,6 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba public FluidStack[] mInputFluids = new FluidStack[4]; public FluidStack[] mOutputFluids = new FluidStack[2]; - private static final GT_Recipe_Map mFluidChemicalReactorRecipes = new GT_Recipe_Map( - new HashSet<GT_Recipe>(100), - "gt.recipe.fluidchemicaleactor", - "Chemical Plant", - null, - CORE.MODID+":textures/gui/FluidReactor", - 0, - 0, - 0, - 2, - 1, - "Tier: ", - 1, - E, - true, - false); - public GregtechMetaTileEntity_ChemicalReactor(int aID, String aName, String aNameRegional, int aTier) { super(aID, aName, aNameRegional, aTier, 1, "For mixing fluids", 4, 4, "ChemicalReactor.png", "", @@ -124,12 +107,7 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba @Override public GT_Recipe.GT_Recipe_Map getRecipeList() { - if (mFluidChemicalReactorRecipes.mRecipeList.isEmpty()) { - for (Recipe_GT i :Recipe_GT.Gregtech_Recipe_Map.sFluidChemicalReactorRecipes.mRecipeList) { - mFluidChemicalReactorRecipes.add(i); - } - } - return mFluidChemicalReactorRecipes; + return null; } @Override diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java index ebae66fe72..f812eee113 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java @@ -51,36 +51,11 @@ import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.fluids.FluidStack; public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { - + private int mSolidCasingTier = 0; private int mMachineCasingTier = 0; private int mPipeCasingTier = 0; - private int mCoilTier = 0; - - public static GT_Recipe_Map getGeneratedRecipeMap() { - return mFluidChemicalReactorRecipes; - } - - /** - * Internal Recipe Map which holds the actual recipes, backed by the real map, shown by NEI. - */ - private static final GT_Recipe_Map mFluidChemicalReactorRecipes = new GT_Recipe_Map( - new HashSet<GT_Recipe>(100), - "gt.recipe.fluidchemicaleactor", - "Chemical Plant", - null, - CORE.MODID+":textures/gui/FluidReactor", - 0, - 0, - 0, - 2, - 1, - "Tier: ", - 1, - E, - true, - false); - + private int mCoilTier = 0; public GregtechMTE_ChemicalPlant(final int aID, final String aName, final String aNameRegional) { super(aID, aName, aNameRegional); @@ -176,15 +151,13 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { @Override public GT_Recipe.GT_Recipe_Map getRecipeMap() { - if (mFluidChemicalReactorRecipes.mRecipeList.isEmpty() || mFluidChemicalReactorRecipes.mRecipeList.size() != Recipe_GT.Gregtech_Recipe_Map.sFluidChemicalReactorRecipes.mRecipeList.size()) { - if (!mFluidChemicalReactorRecipes.mRecipeList.isEmpty()) { - mFluidChemicalReactorRecipes.mRecipeList.clear(); - } - for (Recipe_GT i : Recipe_GT.Gregtech_Recipe_Map.sFluidChemicalReactorRecipes.mRecipeList) { - mFluidChemicalReactorRecipes.add(i); - } + return Recipe_GT.Gregtech_Recipe_Map.sChemicalPlant_GT; + } + + public static void generateRecipes() { + for (Recipe_GT i : Recipe_GT.Gregtech_Recipe_Map.sChemicalPlantRecipes.mRecipeList) { + Recipe_GT.Gregtech_Recipe_Map.sChemicalPlant_GT.add(i); } - return mFluidChemicalReactorRecipes; } @Override @@ -764,7 +737,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { public String getCustomGUIResourceName() { return null; } - + // Same speed bonus as pyro oven public int getSpeedBonus() { return 50 * (this.mCoilTier - 2); @@ -793,14 +766,14 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { public boolean checkRecipe(final ItemStack aStack) { return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), getSpeedBonus()); } - - + + @Override public boolean checkRecipeGeneric( ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes, int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) { - + // Based on the Processing Array. A bit overkill, but very flexible. // Reset outputs and progress stats @@ -813,34 +786,34 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); long tEnergy = getMaxInputEnergy(); log("Running checkRecipeGeneric(0)"); - + GT_Recipe tRecipe = findRecipe( getBaseMetaTileEntity(), mLastRecipe, false, gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs); - - + + log("Running checkRecipeGeneric(1)"); // Remember last recipe - an optimization for findRecipe() this.mLastRecipe = tRecipe; - - + + if (tRecipe == null) { log("BAD RETURN - 1"); return false; } - + if (tRecipe.mSpecialValue > this.mSolidCasingTier) { log("solid tier is too low"); return false; } - - + + aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes); if (aMaxParallelRecipes == 0) { log("BAD RETURN - 2"); return false; } - + // checks if it has enough catalyst durabilety ArrayList<ItemStack>tCatalysts = null; int tMaxParrallelCatalyst = aMaxParallelRecipes; @@ -850,7 +823,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { tCatalysts = new ArrayList<ItemStack>(); tMaxParrallelCatalyst = getCatalysts(aItemInputs, tCatalystRecipe, aMaxParallelRecipes,tCatalysts); } - + if (tMaxParrallelCatalyst == 0) { log("found not enough catalists catalyst"); return false; @@ -884,7 +857,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { log("BAD RETURN - 3"); return false; } - + if (tCatalysts != null) { log("damaging catalyst"); for (int j = 0;j<parallelRecipes;j++) { @@ -900,7 +873,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { } // -- Try not to fail after this point - inputs have already been consumed! -- - + // Convert speed bonus to duration multiplier // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration. @@ -927,7 +900,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { if (this.mEUt > 0) { this.mEUt = (-this.mEUt); } - + this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); @@ -1001,19 +974,19 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { int allowedParrallel = 0; for (final ItemStack aInput : aItemInputs) { if (aRecipeCatalyst.isItemEqual(aInput)) { - if (aInput.stackSize == 1) { - int damage = getDamage(aInput) + aMaxParrallel; - if (damage > getMaxCatalystDurability() ) { - aOutPut.add(aInput); - allowedParrallel += aMaxParrallel + (getMaxCatalystDurability() - damage); - if (allowedParrallel >aMaxParrallel ) { - return aMaxParrallel; - } - continue; - } + if (aInput.stackSize == 1) { + int damage = getDamage(aInput) + aMaxParrallel; + if (damage > getMaxCatalystDurability() ) { + aOutPut.add(aInput); + allowedParrallel += aMaxParrallel + (getMaxCatalystDurability() - damage); + if (allowedParrallel >aMaxParrallel ) { + return aMaxParrallel; + } + continue; } - aOutPut.add(aInput); - return aMaxParrallel; + } + aOutPut.add(aInput); + return aMaxParrallel; } } return allowedParrallel; @@ -1042,8 +1015,8 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { } return null; } - - + + private void damageCatalyst(ItemStack aStack) { if (MathUtils.randFloat(0, 10000000)/10000000f < (1.2f - (0.2 * this.mPipeCasingTier))) { int damage = getDamage(aStack) + 1; @@ -1063,7 +1036,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { log("not consuming catalyst"); } } - + private int getDamage(ItemStack aStack) { if (aStack.getTagCompound() == null || aStack.getTagCompound().hasNoTags()) { final NBTTagCompound tagMain = new NBTTagCompound(); @@ -1075,13 +1048,13 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase { NBTTagCompound aNBT = aStack.getTagCompound(); return aNBT.getCompoundTag("catalyst").getInteger("Damage"); } - + private void setDamage(ItemStack aStack,int aAmount) { NBTTagCompound aNBT = aStack.getTagCompound(); aNBT = aNBT.getCompoundTag("catalyst"); aNBT.setInteger("Damage", aAmount); } - + @SideOnly(Side.CLIENT) diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java index efac0222af..bb3d93172c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java @@ -1182,7 +1182,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { @Override - public boolean addFluidReactorRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier) { + public boolean addChemicalPlantRecipe(ItemStack[] aInputs, FluidStack[] aInputFluids, ItemStack[] aOutputs, FluidStack[] aFluidOutputs, int time, long eu, int aTier) { if (aInputs.length > 4 || aInputFluids.length > 4 || aOutputs.length > 4 || aFluidOutputs.length > 2) { Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs)); @@ -1205,10 +1205,10 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder { (int) eu, aTier); - int aSize = Recipe_GT.Gregtech_Recipe_Map.sFluidChemicalReactorRecipes.mRecipeList.size(); + int aSize = Recipe_GT.Gregtech_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size(); int aSize2 = aSize; - Recipe_GT.Gregtech_Recipe_Map.sFluidChemicalReactorRecipes.add(aSpecialRecipe); - aSize = Recipe_GT.Gregtech_Recipe_Map.sFluidChemicalReactorRecipes.mRecipeList.size(); + Recipe_GT.Gregtech_Recipe_Map.sChemicalPlantRecipes.add(aSpecialRecipe); + aSize = Recipe_GT.Gregtech_Recipe_Map.sChemicalPlantRecipes.mRecipeList.size(); return aSize > aSize2; } |