diff options
Diffstat (limited to 'src/Java/gtPlusPlus')
11 files changed, 433 insertions, 345 deletions
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index b6a14acb62..fe6e86f073 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -44,6 +44,7 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_BlastSmelterGT_GTNH; +import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechMiniRaFusion; import gtPlusPlus.xmod.thaumcraft.commands.CommandDumpAspects; import net.minecraft.launchwrapper.Launch; import net.minecraft.util.IIcon; @@ -233,7 +234,8 @@ public class GTplusplus implements ActionListener { int[] mOriginalCount = new int[] {0, 0, 0}; RecipeGen_BlastSmelterGT_GTNH.generateGTNHBlastSmelterRecipesFromEBFList(); - FishPondFakeRecipe.generateFishPondRecipes(); + FishPondFakeRecipe.generateFishPondRecipes(); + GregtechMiniRaFusion.generateSlowFusionrecipes(); //Large Centrifuge generation mOriginalCount[0] = GT_Recipe.GT_Recipe_Map.sCentrifugeRecipes.mRecipeList.size(); diff --git a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java index 8ecdab4bbc..d4f217bbfd 100644 --- a/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java +++ b/src/Java/gtPlusPlus/core/util/minecraft/gregtech/PollutionUtils.java @@ -6,12 +6,26 @@ import java.lang.reflect.Method; import gregtech.GT_Mod; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.common.GT_Proxy; - +import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.util.reflect.ReflectionUtils; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.chunk.Chunk; public class PollutionUtils { + private static boolean mIsPollutionEnabled = true; + + static { + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + mIsPollutionEnabled = mPollution(); + } + else { + mIsPollutionEnabled = false; + } + } + public static boolean mPollution() { try { GT_Proxy GT_Pollution = GT_Mod.gregtechproxy; @@ -21,11 +35,13 @@ public class PollutionUtils { return mPollution.getBoolean(GT_Pollution); } } - } catch (SecurityException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) {} + } catch (SecurityException | IllegalArgumentException | IllegalAccessException | NoSuchFieldException e) { + } return false; } public static boolean addPollution(IGregTechTileEntity te, int pollutionValue) { + if (mIsPollutionEnabled) try { Class<?> GT_Pollution = Class.forName("gregtech.common.GT_Pollution"); if (GT_Pollution != null) { @@ -36,11 +52,13 @@ public class PollutionUtils { } } } catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) {} + | IllegalArgumentException | InvocationTargetException e) { + } return false; } public static int getPollution(IGregTechTileEntity te) { + if (mIsPollutionEnabled) try { Class<?> GT_Pollution = Class.forName("gregtech.common.GT_Pollution"); if (GT_Pollution != null) { @@ -50,8 +68,39 @@ public class PollutionUtils { } } } catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalAccessException - | IllegalArgumentException | InvocationTargetException e) {} + | IllegalArgumentException | InvocationTargetException e) { + } return 0; } + public static boolean addPollution(Object aTileOfSomeSort, int pollutionValue) { + if (mIsPollutionEnabled) + try { + Class<?> GT_Pollution = Class.forName("gregtech.common.GT_Pollution"); + if (GT_Pollution != null) { + Method addPollution = GT_Pollution.getMethod("addPollution", Chunk.class, int.class); + if (addPollution != null) { + IHasWorldObjectAndCoords j = (IHasWorldObjectAndCoords) aTileOfSomeSort; + if (j != null) { + Chunk c = j.getWorld().getChunkFromBlockCoords(j.getXCoord(), j.getZCoord()); + addPollution.invoke(null, c, pollutionValue); + return true; + } else { + TileEntity t = (TileEntity) aTileOfSomeSort; + if (t != null) { + Chunk c = t.getWorldObj().getChunkFromBlockCoords(t.xCoord, t.zCoord); + addPollution.invoke(null, c, pollutionValue); + return true; + } + } + + } + } + } catch (ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalAccessException + | IllegalArgumentException | InvocationTargetException e) { + } + return false; + + } + } diff --git a/src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java b/src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java new file mode 100644 index 0000000000..85599e4695 --- /dev/null +++ b/src/Java/gtPlusPlus/core/util/reflect/ProxyFinder.java @@ -0,0 +1,55 @@ +package gtPlusPlus.core.util.reflect; + +import java.lang.reflect.Field; + +import cpw.mods.fml.common.SidedProxy; + +public class ProxyFinder { + + public static Object getServerProxy(final Object modInstance) throws ReflectiveOperationException { + for(final Field field : modInstance.getClass().getDeclaredFields()) { + if(field.isAnnotationPresent(SidedProxy.class)) { + final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); + final Object fieldValue = field.get(modInstance); + try { + final Class<?> serverSideClass = Class.forName(sidedProxy.serverSide()); + if(serverSideClass.isAssignableFrom(fieldValue.getClass())) { + final Object serverProxy = serverSideClass.cast(fieldValue); + //do what you want with server proxy instance + return serverProxy; + } + + } catch (final NoClassDefFoundError err) { + //its server side + return null; + } + break; + } + } + return null; + } + + public static Object getClientProxy(final Object modInstance) throws ReflectiveOperationException { + for(final Field field : modInstance.getClass().getDeclaredFields()) { + if(field.isAnnotationPresent(SidedProxy.class)) { + final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); + final Object fieldValue = field.get(modInstance); + try { + final Class<?> clientSideClass = Class.forName(sidedProxy.clientSide()); + if(clientSideClass.isAssignableFrom(fieldValue.getClass())) { + final Object clientProxy = clientSideClass.cast(fieldValue); + //do what you want with client proxy instance + return clientProxy; + } + + } catch (final NoClassDefFoundError err) { + //its server side + return null; + } + break; + } + } + return null; + } + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/core/util/reflect/ServerProxyFinder.java b/src/Java/gtPlusPlus/core/util/reflect/ServerProxyFinder.java deleted file mode 100644 index 38382b4a46..0000000000 --- a/src/Java/gtPlusPlus/core/util/reflect/ServerProxyFinder.java +++ /dev/null @@ -1,32 +0,0 @@ -package gtPlusPlus.core.util.reflect; - -import java.lang.reflect.Field; - -import cpw.mods.fml.common.SidedProxy; - -public class ServerProxyFinder { - - public static Object getInstance(final Object modInstance) throws ReflectiveOperationException { - for(final Field field : modInstance.getClass().getDeclaredFields()) { - if(field.isAnnotationPresent(SidedProxy.class)) { - final SidedProxy sidedProxy = field.getAnnotation(SidedProxy.class); - final Object fieldValue = field.get(modInstance); - try { - final Class<?> serverSideClass = Class.forName(sidedProxy.serverSide()); - if(serverSideClass.isAssignableFrom(fieldValue.getClass())) { - final Object serverProxy = serverSideClass.cast(fieldValue); - //do what you want with server proxy instance - return serverProxy; - } - - } catch (final NoClassDefFoundError err) { - //its server side - return null; - } - break; - } - } - return null; - } - -}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index 6e29c51724..13b6b50d98 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -298,6 +298,11 @@ public enum GregtechItemList implements GregtechItemContainer { Hatch_Input_Battery_EV, Hatch_Output_Battery_MV, Hatch_Output_Battery_EV, + + //Advanced Mufflers + Hatch_Muffler_Adv_LV, Hatch_Muffler_Adv_MV, Hatch_Muffler_Adv_HV, + Hatch_Muffler_Adv_EV, Hatch_Muffler_Adv_IV, Hatch_Muffler_Adv_LuV, + Hatch_Muffler_Adv_ZPM, Hatch_Muffler_Adv_UV, Hatch_Muffler_Adv_MAX, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java new file mode 100644 index 0000000000..9bbb896b42 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java @@ -0,0 +1,198 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Config; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.core.lib.CORE; +import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_2by2; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.CONTAINER_Electric_4by4; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_2by2; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.charge.GUI_Electric_4by4; +import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; + +public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch_Muffler { + + @Override + public void onConfigLoad(GT_Config aConfig) { + super.onConfigLoad(aConfig); + if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) { + Integer a1 = (int) Meta_GT_Proxy.getFieldFromGregtechProxy(false, "mPollutionSmogLimit"); + if (a1 != null && a1 > 0) { + mPollutionSmogLimit = a1; + } + } + } + + private int mPollutionSmogLimit = 500000; + + public GT_MetaTileEntity_Hatch_Muffler_Adv(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier); + } + + public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aDescription, aTextures); + } + + public String[] getDescription() { + String[] desc = new String[this.mDescriptionArray.length + 4]; + System.arraycopy(this.mDescriptionArray, 0, desc, 0, this.mDescriptionArray.length); + desc[this.mDescriptionArray.length] = "DO NOT OBSTRUCT THE OUTPUT!"; + desc[this.mDescriptionArray.length + 1] = "Requires extra Air on the exhaust face"; + desc[this.mDescriptionArray.length + 2] = "Reduces Pollution to " + this.calculatePollutionReduction(100) + "%"; + desc[this.mDescriptionArray.length + 3] = "Recovers " + (105 - this.calculatePollutionReduction(100)) + + "% of CO2/CO/SO2"; + return desc; + } + + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + } + + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Hatch_Muffler_Adv)}; + } + + public boolean isValidSlot(int aIndex) { + return false; + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_Muffler_Adv(this.mName, this.mTier, this.mDescriptionArray, this.mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, + EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) + return true; + //aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, + IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, + IGregTechTileEntity aBaseMetaTileEntity) { + return null; + } + + public boolean polluteEnvironment() { + if (this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1)) { + int aEmission = this.calculatePollutionReduction(10000); + PollutionUtils.addPollution(this.getBaseMetaTileEntity(), aEmission); + //Logger.INFO("Outputting "+aEmission+"gbl"); + return true; + } else { + //Logger.INFO("Failed to output pollution"); + return false; + } + } + + public int calculatePollutionReduction(int aPollution) { + return (int) ((double) aPollution * Math.pow(0.64D, (double) (this.mTier - 1))); + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return true; + } + + public boolean hasValidFilter() { + return false; + } + + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + String aParticleName; + if (hasValidFilter()) { + aParticleName = "cloud"; + } else { + aParticleName = "smoke"; + } + if (aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) { + this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName); + } + + } + + public void pollutionParticles(World aWorld, String name) { + float ran1 = CORE.RANDOM.nextFloat(); + float ran2 = 0.0F; + float ran3 = 0.0F; + boolean chk1 = ran1 * 100.0F < (float) this.calculatePollutionReduction(100); + boolean chk2; + boolean chk3; + int aPollutionAmount = PollutionUtils.getPollution(getBaseMetaTileEntity()); + if (aPollutionAmount >= mPollutionSmogLimit) { + ran2 = CORE.RANDOM.nextFloat(); + ran3 = CORE.RANDOM.nextFloat(); + chk2 = ran2 * 100.0F < (float) this.calculatePollutionReduction(100); + chk3 = ran3 * 100.0F < (float) this.calculatePollutionReduction(100); + if (!chk1 && !chk2 && !chk3) { + return; + } + } else { + if (!chk1) { + return; + } + + chk3 = false; + chk2 = false; + } + + IGregTechTileEntity aMuffler = this.getBaseMetaTileEntity(); + ForgeDirection aDir = ForgeDirection.getOrientation(aMuffler.getFrontFacing()); + float xPos = (float) aDir.offsetX * 0.76F + (float) aMuffler.getXCoord() + 0.25F; + float yPos = (float) aDir.offsetY * 0.76F + (float) aMuffler.getYCoord() + 0.25F; + float zPos = (float) aDir.offsetZ * 0.76F + (float) aMuffler.getZCoord() + 0.25F; + float ySpd = (float) aDir.offsetY * 0.1F + 0.2F + 0.1F * CORE.RANDOM.nextFloat(); + float xSpd; + float zSpd; + if (aDir.offsetY == -1) { + float temp = CORE.RANDOM.nextFloat() * 2.0F * CORE.PI; + xSpd = (float) Math.sin((double) temp) * 0.1F; + zSpd = (float) Math.cos((double) temp) * 0.1F; + } else { + xSpd = (float) aDir.offsetX * (0.1F + 0.2F * CORE.RANDOM.nextFloat()); + zSpd = (float) aDir.offsetZ * (0.1F + 0.2F * CORE.RANDOM.nextFloat()); + } + + if (chk1) { + aWorld.spawnParticle(name, (double) (xPos + ran1 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); + } + + if (chk2) { + aWorld.spawnParticle(name, (double) (xPos + ran2 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); + } + + if (chk3) { + aWorld.spawnParticle(name, (double) (xPos + ran3 * 0.5F), (double) (yPos + CORE.RANDOM.nextFloat() * 0.5F), + (double) (zPos + CORE.RANDOM.nextFloat() * 0.5F), (double) xSpd, (double) ySpd, (double) zSpd); + } + + } + + + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index db5e8eacaa..2e05d08bb1 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -356,6 +356,9 @@ public class TexturesGtBlock { //Discharger Texture private static final CustomIcon Internal_Overlay_Hatch_Discharger = new CustomIcon("TileEntities/cover_discharge"); public static final CustomIcon Overlay_Hatch_Discharger = Internal_Overlay_Hatch_Discharger; + //Advanced Muffler + private static final CustomIcon Internal_Overlay_Hatch_Muffler_Adv = new CustomIcon("iconsets/OVERLAY_MUFFLER_ADV"); + public static final CustomIcon Overlay_Hatch_Muffler_Adv = Internal_Overlay_Hatch_Muffler_Adv; //Dimensional private static final CustomIcon Internal_Overlay_Machine_Dimensional_Blue = new CustomIcon("TileEntities/adv_machine_dimensional_cover_blue"); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java index 9ee65a1760..40ab919677 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechConduits.java @@ -41,6 +41,8 @@ public class GregtechConduits { } } + //30000-30999 + private static int BaseWireID = 30600; private static int BasePipeID = 30700; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java index 0573ba2c20..fe18cb31d6 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechCustomHatches.java @@ -1,12 +1,16 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; +import static gtPlusPlus.core.recipe.common.CI.bitsd; + import gregtech.api.enums.ItemList; +import gregtech.api.util.GT_ModHandler; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.core.material.ALLOY; import gtPlusPlus.core.recipe.common.CI; import gtPlusPlus.core.util.minecraft.FluidUtils; import gtPlusPlus.core.util.minecraft.RecipeUtils; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler_Adv; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Naquadah; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase; @@ -16,55 +20,114 @@ public class GregtechCustomHatches { if (gtPlusPlus.core.lib.LoadedMods.Gregtech) { Logger.INFO("Gregtech5u Content | Registering Custom Fluid Hatches."); run1(); + run2(); } } private static void run1() { - - GregtechItemList.Hatch_Input_Cryotheum.set( - new GT_MetaTileEntity_Hatch_CustomFluidBase( - FluidUtils.getFluidStack("cryotheum", 1).getFluid(), // Fluid to resitrct hatch to + GregtechItemList.Hatch_Input_Cryotheum + .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getFluidStack("cryotheum", 1).getFluid(), // Fluid + // to + // resitrct + // hatch + // to 128000, // Capacity 967, // ID "hatch.cryotheum.input.tier.00", // unlocal name - "Cryotheum Cooling Hatch" //Local name - ).getStackForm(1L)); - - GregtechItemList.Hatch_Input_Pyrotheum.set( - new GT_MetaTileEntity_Hatch_CustomFluidBase( - FluidUtils.getFluidStack("pyrotheum", 1).getFluid(), // Fluid to resitrct hatch to + "Cryotheum Cooling Hatch" // Local name + ).getStackForm(1L)); + + GregtechItemList.Hatch_Input_Pyrotheum + .set(new GT_MetaTileEntity_Hatch_CustomFluidBase(FluidUtils.getFluidStack("pyrotheum", 1).getFluid(), // Fluid + // to + // resitrct + // hatch + // to 128000, // Capacity 968, // ID "hatch.pyrotheum.input.tier.00", // unlocal name - "Pyrotheum Heating Vent" //Local name - ).getStackForm(1L)); - - GregtechItemList.Hatch_Input_Naquadah.set( - new GT_MetaTileEntity_Hatch_Naquadah( - 969, // ID - "hatch.naquadah.input.tier.00", // unlocal name - "Naquadah Reactor Input hatch" //Local name - ).getStackForm(1L)); + "Pyrotheum Heating Vent" // Local name + ).getStackForm(1L)); - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[6], ALLOY.MARAGING250.getGear(1), CI.component_Plate[6], - CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_AdvancedVacuum.get(1), CI.getTieredCircuitOreDictName(4), - CI.component_Plate[5], ItemList.Hatch_Input_IV.get(1), CI.component_Plate[5], - GregtechItemList.Hatch_Input_Cryotheum.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[5], ALLOY.MARAGING300.getGear(1), CI.component_Plate[5], - CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_Adv_BlastFurnace.get(1), CI.getTieredCircuitOreDictName(4), - CI.component_Plate[6], ItemList.Hatch_Input_IV.get(1), CI.component_Plate[6], - GregtechItemList.Hatch_Input_Pyrotheum.get(1L, new Object[0])); - - RecipeUtils.addShapedGregtechRecipe( - CI.component_Plate[8], ALLOY.HG1223.getGear(1), CI.component_Plate[9], - CI.getTieredCircuitOreDictName(7), GregtechItemList.Casing_Naq_Reactor_A.get(1), CI.getTieredCircuitOreDictName(7), - CI.component_Plate[9], ItemList.Hatch_Input_ZPM.get(1), CI.component_Plate[8], - GregtechItemList.Hatch_Input_Naquadah.get(1L, new Object[0])); + GregtechItemList.Hatch_Input_Naquadah.set(new GT_MetaTileEntity_Hatch_Naquadah(969, // ID + "hatch.naquadah.input.tier.00", // unlocal name + "Naquadah Reactor Input hatch" // Local name + ).getStackForm(1L)); + + RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[6], ALLOY.MARAGING250.getGear(1), CI.component_Plate[6], + CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_AdvancedVacuum.get(1), + CI.getTieredCircuitOreDictName(4), CI.component_Plate[5], ItemList.Hatch_Input_IV.get(1), + CI.component_Plate[5], GregtechItemList.Hatch_Input_Cryotheum.get(1L, new Object[0])); + + RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[5], ALLOY.MARAGING300.getGear(1), CI.component_Plate[5], + CI.getTieredCircuitOreDictName(4), GregtechItemList.Casing_Adv_BlastFurnace.get(1), + CI.getTieredCircuitOreDictName(4), CI.component_Plate[6], ItemList.Hatch_Input_IV.get(1), + CI.component_Plate[6], GregtechItemList.Hatch_Input_Pyrotheum.get(1L, new Object[0])); + + RecipeUtils.addShapedGregtechRecipe(CI.component_Plate[8], ALLOY.HG1223.getGear(1), CI.component_Plate[9], + CI.getTieredCircuitOreDictName(7), GregtechItemList.Casing_Naq_Reactor_A.get(1), + CI.getTieredCircuitOreDictName(7), CI.component_Plate[9], ItemList.Hatch_Input_ZPM.get(1), + CI.component_Plate[8], GregtechItemList.Hatch_Input_Naquadah.get(1L, new Object[0])); + + } + + private static void run2() { + GregtechItemList.Hatch_Muffler_Adv_LV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30001, "hatch.muffler.adv.tier.01", "Advanced Muffler Hatch (LV)", 1)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_MV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30002, "hatch.muffler.adv.tier.02", "Advanced Muffler Hatch (MV)", 2)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_HV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30003, "hatch.muffler.adv.tier.03", "Advanced Muffler Hatch (HV)", 3)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_EV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30004, "hatch.muffler.adv.tier.04", "Advanced Muffler Hatch (EV)", 4)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_IV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30005, "hatch.muffler.adv.tier.05", "Advanced Muffler Hatch (IV)", 5)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_LuV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30006, "hatch.muffler.adv.tier.06", "Advanced Muffler Hatch (LuV)", 6)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_ZPM + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30007, "hatch.muffler.adv.tier.07", "Advanced Muffler Hatch (ZPM)", 7)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_UV + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30008, "hatch.muffler.adv.tier.08", "Advanced Muffler Hatch (UV)", 8)) + .getStackForm(1L)); + GregtechItemList.Hatch_Muffler_Adv_MAX + .set((new GT_MetaTileEntity_Hatch_Muffler_Adv(30009, "hatch.muffler.adv.tier.09", "Advanced Muffler Hatch (MAX)", 9)) + .getStackForm(1L)); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_LV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_MV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_HV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_HV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_HV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_EV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_EV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_EV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_IV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_IV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_IV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_LuV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_LuV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_LuV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_ZPM.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_ZPM.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_ZPM.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_UV.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_UV.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_UV.get(1) }); + GT_ModHandler.addCraftingRecipe(GregtechItemList.Hatch_Muffler_Adv_MAX.get(1L, new Object[0]), bitsd, + new Object[] { "M", "P", Character.valueOf('M'), ItemList.Hatch_Muffler_MAX.get(1), Character.valueOf('P'), + GregtechItemList.Pollution_Cleaner_MAX.get(1) }); } } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java index ac79c49aa7..f624b78ab8 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechMiniRaFusion.java @@ -1,291 +1,35 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; import gregtech.api.GregTech_API; -import gregtech.api.enums.Materials; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe; +import gregtech.api.util.GT_Recipe; import gregtech.api.util.Recipe_GT; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; -import net.minecraftforge.fluids.FluidStack; public class GregtechMiniRaFusion { public static void run() { - //generateSlowFusionRecipes(); // Register the Simple Fusion Entity. - //GregtechItemList.Miniature_Fusion.set(new GregtechMetaTileEntity_CompactFusionReactor(993, "simplefusion.tier.00", "Ra, Sun God - Mk I", 6).getStackForm(1L)); - GregtechItemList.Miniature_Fusion.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(993, "basicmachine.simplefusion.tier.01", "Mimir", 8, "Universal Machine for Knowledge and Wisdom", Recipe_GT.Gregtech_Recipe_Map.sSlowFusion2Recipes, 2, 9, 64000, 0, 1, "Dehydrator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), false, false, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.SENSOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.FIELD_GENERATOR}).getStackForm(1L)); - run2(); - Logger.INFO("[Pocket Fusion] Generated "+mRecipeCount+" recipes for the Pocket Fusion Reactor."); + GregtechItemList.Miniature_Fusion.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(994, "machine.simplefusion.tier.01", "Mimir", 8, "Universal Machine for Knowledge and Wisdom", Recipe_GT.Gregtech_Recipe_Map.sSlowFusionRecipes, 2, 9, 64000, 0, 1, "Dehydrator.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(208)), false, false, 0, "EXTRUDER", new Object[]{"CCE", "XMP", "CCE", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'X', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.SENSOR, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.STICK_ELECTROMAGNETIC, 'P', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.FIELD_GENERATOR}).getStackForm(1L)); - - } - - private static boolean run2() { - addFusionReactorRecipe(Materials.Lithium, (16), Materials.Tungsten, (16), Materials.Iridium, (16), 32, 32768, 300000000); - addFusionReactorRecipe(Materials.Deuterium, (125), Materials.Tritium, (125), Materials.Helium.getPlasma(125), 16, 4096, 40000000); //Mark 1 Cheap // - addFusionReactorRecipe(Materials.Deuterium, (125), Materials.Helium_3, (125), Materials.Helium.getPlasma(125), 16, 2048, 60000000); //Mark 1 Expensive // - addFusionReactorRecipe(Materials.Carbon, (125), Materials.Helium_3, (125), Materials.Oxygen.getPlasma(125), 32, 4096, 80000000); //Mark 1 Expensive // - addFusionReactorRecipe(Materials.Aluminium, (16), Materials.Lithium, (16), Materials.Sulfur.getPlasma(125), 32, 10240, 240000000); //Mark 2 Cheap - addFusionReactorRecipe(Materials.Beryllium, (16), Materials.Deuterium, (375), Materials.Nitrogen.getPlasma(175), 16, 16384, 180000000); //Mark 2 Expensive // - addFusionReactorRecipe(Materials.Silicon, (16), Materials.Magnesium, (16), Materials.Iron.getPlasma(125), 32, 8192, 360000000); //Mark 3 Cheap // - addFusionReactorRecipe(Materials.Potassium, (16), Materials.Fluorine, (125), Materials.Nickel.getPlasma(125), 16, 32768, 480000000); //Mark 3 Expensive // - addFusionReactorRecipe(Materials.Beryllium, (16), Materials.Tungsten, (16), Materials.Platinum, (16), 32, 32768, 150000000); // - addFusionReactorRecipe(Materials.Neodymium, (16), Materials.Hydrogen, (48), Materials.Europium, (16), 64, 24576, 150000000); // - addFusionReactorRecipe(Materials.Lutetium, (16), Materials.Chrome, (16), Materials.Americium, (16), 96, 49152, 200000000); // - addFusionReactorRecipe(Materials.Plutonium, (16), Materials.Thorium, (16), Materials.Naquadah, (16), 64, 32768, 300000000); // - addFusionReactorRecipe(Materials.Americium, (16), Materials.Naquadria, (16), Materials.Neutronium, (1), 1200, 98304, 600000000); // - - addFusionReactorRecipe(Materials.Tungsten, (16), Materials.Helium, (16), Materials.Osmium, (16), 64, 24578, 150000000); // - addFusionReactorRecipe(Materials.Manganese, (16), Materials.Hydrogen, (16), Materials.Iron, (16), 64, 8192, 120000000); // - addFusionReactorRecipe(Materials.Mercury, (16), Materials.Magnesium, (16), Materials.Uranium, (16), 64, 49152, 240000000); // - addFusionReactorRecipe(Materials.Gold, (16), Materials.Aluminium, (16), Materials.Uranium, (16), 64, 49152, 240000000); // - addFusionReactorRecipe(Materials.Uranium, (16), Materials.Helium, (16), Materials.Plutonium, (16), 128, 49152, 480000000); // - addFusionReactorRecipe(Materials.Vanadium, (16), Materials.Hydrogen, (125), Materials.Chrome, (16), 64, 24576, 140000000); // - addFusionReactorRecipe(Materials.Gallium, (16), Materials.Radon, (125), Materials.Duranium, (16), 64, 16384, 140000000); // - addFusionReactorRecipe(Materials.Titanium, (48), Materials.Duranium, (32), Materials.Tritanium, (16), 64, 32768, 200000000); // - addFusionReactorRecipe(Materials.Gold, (16), Materials.Mercury, (16), Materials.Radon, (125), 64, 32768, 200000000); // - addFusionReactorRecipe(Materials.Tantalum, (16), Materials.Tritium, (16), Materials.Tungsten, (16), 16, 24576, 200000000); // - addFusionReactorRecipe(Materials.Silver, (16), Materials.Lithium, (16), Materials.Indium, (16), 32, 24576, 380000000); // - addFusionReactorRecipe(Materials.NaquadahEnriched, (15), Materials.Radon, (125), Materials.Naquadria, (3), 64, 49152, 400000000); // - - if (mRecipeCount > 0) - return true; - return false; } - - private static void addFusionReactorRecipe(Materials molten, int amnt, Materials gas, int amnt2, FluidStack plasma, int i, int j, int k) {/* - Materials Fusion[] = new Materials[2]; - int amount[] = new int[2]; - int emptyAmount = 0; - - Fusion[0] = molten; - amount[0] = amnt; - Fusion[1] = gas; - amount[1] = amnt2; - - ItemStack[] inputs = new ItemStack[9]; - ItemStack[][] temp = new ItemStack[2][9]; - for (int r=0;r<2;r++) { - ItemStack tempCell; - ItemStack cellsA = null; - ItemStack cellsB = null; - ItemStack cellsC = null; - - if (Fusion[r].getCells(1) == null) { - Logger.INFO("[Pocket Fusion] Error trying to get a cell of "+MaterialUtils.getMaterialName(Fusion[r])+", using backup method."); - Material ju = MaterialUtils.generateMaterialFromGtENUM(Fusion[r]); - ItemStack htng = ju.getCell(1); - if (htng == null) { - Logger.INFO("[Pocket Fusion] Error trying to get a cell of "+MaterialUtils.getMaterialName(Fusion[r])+", failed using backup method."); - new BaseItemCell(ju); - tempCell = ItemUtils.getItemStackOfAmountFromOreDict("cell"+MaterialUtils.getMaterialName(Fusion[r]), 1); - //continue; - } - else { - tempCell = htng; - } - } - else { - tempCell = Fusion[r].getCells(1); - } - - if (amount[r] <= 64) { - cellsA = ItemUtils.getSimpleStack(tempCell, amount[r]); - temp[r][0] = cellsA; - } - else if (amount[r] > 64 && amount[r] <= 128) { - cellsA = ItemUtils.getSimpleStack(tempCell, 64); - cellsB = ItemUtils.getSimpleStack(tempCell, amount[r]-64); - temp[r][0] = cellsA; - temp[r][1] = cellsB; - } - else if (amount[r] > 128 && amount[r] <= 192) { - cellsA = ItemUtils.getSimpleStack(tempCell, 64); - cellsA = ItemUtils.getSimpleStack(tempCell, 64); - cellsA = ItemUtils.getSimpleStack(tempCell, amount[r]-128); - temp[r][0] = cellsA; - temp[r][1] = cellsB; - temp[r][2] = cellsC; - } - emptyAmount += amount[r]; - } - - //Build Clean Stacks - int index = 0; - for (int r=0;r<2;r++) { - for (int g=0;g<9;g++) { - if (temp[r][g] != null) { - inputs[(r == 0 ? index++ : (3+index++))] = temp[r][g]; - } - } - } - - ItemStack[] outputCells = new ItemStack[9]; - int tempInt = emptyAmount; - int tempCounter = 0; - while (tempInt > 0) { - if (tempInt >= 64) { - outputCells[tempCounter++] = ItemUtils.getEmptyCell(64); - tempInt -= 64; - } - else { - outputCells[tempCounter++] = ItemUtils.getEmptyCell(tempInt); - tempInt -= tempInt; - } - } - - ItemStack[] cleanOutput = ArrayUtils.removeNulls(outputCells); - - FluidStack bigPlasma = plasma.copy(); - bigPlasma.amount = plasma.amount*1000; - - if (bigPlasma.amount > 32000) { - Logger.INFO("[Pocket Fusion] Generated recipe for "+plasma.getLocalizedName()+" had incorrect output."); - } - - if (Recipe_GT.Gregtech_Recipe_Map.sSlowFusion2Recipes.addRecipe( - true, - inputs, - cleanOutput, - null, - null, //Fluid In - new FluidStack[] {bigPlasma}, //Fluid Out - i*8, //Duration - j, //Eu - k //Special - ) != null){ - mRecipeCount++; - } - */} - - - public static int mRecipeCount = 0; - private static void addFusionReactorRecipe(Materials molten, int amnt, Materials gas, int amnt2, Materials output, int amnt3, int i, int j, int k) {/* - Materials Fusion[] = new Materials[3]; - int amount[] = new int[3]; - int emptyAmount = 0; - int outputCells = 0; - - Fusion[0] = molten; - amount[0] = amnt; - Fusion[1] = gas; - amount[1] = amnt2; - Fusion[2] = output; - amount[2] = amnt3; - - ItemStack[] inputs = new ItemStack[9]; - ItemStack[][] temp = new ItemStack[3][9]; - ItemStack[] outputs = new ItemStack[9]; - for (int r=0;r<3;r++) { - ItemStack cellsA = null; - ItemStack cellsB = null; - ItemStack cellsC = null; - ItemStack tempCell; - - if (Fusion[r].getCells(1) == null) { - Logger.INFO("[Pocket Fusion] Error trying to get a cell of "+MaterialUtils.getMaterialName(Fusion[r])+", using backup method."); - Material ju = MaterialUtils.generateMaterialFromGtENUM(Fusion[r]); - ItemStack htng = ju.getCell(1); - if (htng == null) { - Logger.INFO("[Pocket Fusion] Error trying to get a cell of "+MaterialUtils.getMaterialName(Fusion[r])+", failed using backup method."); - new BaseItemCell(ju); - tempCell = ItemUtils.getItemStackOfAmountFromOreDict("cell"+MaterialUtils.getMaterialName(Fusion[r]), 1); - //continue; - } - else { - tempCell = htng; - } - } - else { - tempCell = Fusion[r].getCells(1); - } - - if (amount[r] <= 64) { - cellsA = ItemUtils.getSimpleStack(tempCell, amount[r]); - temp[r][0] = cellsA; - } - else if (amount[r] > 64 && amount[r] <= 128) { - cellsA = ItemUtils.getSimpleStack(tempCell, 64); - cellsB = ItemUtils.getSimpleStack(tempCell, amount[r]-64); - temp[r][0] = cellsA; - temp[r][1] = cellsB; - } - else if (amount[r] > 128 && amount[r] <= 192) { - cellsA = ItemUtils.getSimpleStack(tempCell, 64); - cellsA = ItemUtils.getSimpleStack(tempCell, 64); - cellsA = ItemUtils.getSimpleStack(tempCell, amount[r]-128); - temp[r][0] = cellsA; - temp[r][1] = cellsB; - temp[r][2] = cellsC; - } - if (r< 2) { - emptyAmount += amount[r]; - } - else { - outputCells += amount[r]; - } - } - - //Build Clean Stacks - int index = 0; - for (int r=0;r<3;r++) { - for (int g=0;g<9;g++) { - if (temp[r][g] != null) { - if (r < 2) { - inputs[(r == 0 ? index++ : (3+index++))] = temp[r][g]; - } - else { - outputs[index++] = temp[r][g]; - } - } - } - } - - ItemStack[] outputEmptyCells = new ItemStack[9]; - int tempInt = emptyAmount-outputCells; - int tempCounter = 0; - while (tempInt > 0) { - if (tempInt >= 64) { - outputEmptyCells[tempCounter++] = ItemUtils.getEmptyCell(64); - tempInt -= 64; - } - else { - outputEmptyCells[tempCounter++] = ItemUtils.getEmptyCell(tempInt); - tempInt -= tempInt; - } - } - - ItemStack[] comboOutput = new ItemStack[9]; - int jhn = 0; - for (int b=0;b<9;b++) { - - if (outputs[b] != null) { - comboOutput[b] = outputs[b]; - jhn++; - } - else { - if (outputEmptyCells[(b-jhn)] != null) { - comboOutput[b] = outputEmptyCells[(b-jhn)]; - } + + public static boolean generateSlowFusionrecipes() { + for (GT_Recipe x : GT_Recipe.GT_Recipe_Map.sFusionRecipes.mRecipeList){ + if (x.mEnabled) { + x.mDuration *= 4; + Recipe_GT.Gregtech_Recipe_Map.sSlowFusionRecipes.add(x); } - } - - if (Recipe_GT.Gregtech_Recipe_Map.sSlowFusion2Recipes.addRecipe( - true, - inputs, - comboOutput, - null, - null, //Fluid In - null, //Fluid Out - i*16, //Duration - j, //Eu - k //Special - ) != null){ - mRecipeCount++; + int mRecipeCount = Recipe_GT.Gregtech_Recipe_Map.sSlowFusionRecipes.mRecipeList.size(); + if (mRecipeCount > 0) { + Logger.INFO("[Pocket Fusion] Generated "+mRecipeCount+" recipes for the Pocket Fusion Reactor."); + return true; } - */} + return false; + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java index 5cf3c346ae..2a4a2b9f85 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechTieredFluidTanks.java @@ -19,7 +19,6 @@ public class GregtechTieredFluidTanks { private static void run1() { int ID = 817; - Logger.INFO("Is New Horizons Loaded? " + CORE.GTNH); if (CORE.GTNH) { Logger.INFO("Only loading ULV-IV tier tanks for New Horizons Modpack."); } |