From 41eb02602c8a6d5899b3e375572ee9990a5a752b Mon Sep 17 00:00:00 2001 From: Jordan Byrne Date: Mon, 26 Feb 2018 08:08:00 +1000 Subject: % Made all GTNH recipes use cheaper circuits for all recipes I add. % Recipe tweaks. % Tried to fluorite ore not having correct recipe outputs during ore processing. (This is still broken due to an invalid output) $ Fixed old fluorite ore not having a valid shapeless recipe. $ Fixed all custom ores trying to register static textures. $ Fixed plugin loading system not registering plugins, I think? $ Fixed missing texture for Nitro Fix. --- src/Java/gtPlusPlus/GTplusplus.java | 12 +- src/Java/gtPlusPlus/api/interfaces/IPlugin.java | 6 - src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java | 32 + .../gtPlusPlus/core/block/base/BasicBlock.java | 14 +- .../core/block/base/BlockBaseModular.java | 118 +- .../gtPlusPlus/core/block/base/BlockBaseOre.java | 101 +- src/Java/gtPlusPlus/core/material/Material.java | 5 - .../core/material/nuclear/FLUORIDES.java | 6 +- .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 1777 ++++++++++---------- .../gtPlusPlus/core/recipe/RECIPES_General.java | 44 +- src/Java/gtPlusPlus/core/recipe/common/CI.java | 2 +- .../gtPlusPlus/plugin/fishing/Core_Fishing.java | 8 +- .../gtPlusPlus/plugin/manager/Core_Manager.java | 1 + .../xmod/gregtech/loaders/RecipeGen_Ore.java | 16 +- .../xmod/gregtech/recipes/GregtechRecipeAdder.java | 419 +++-- 15 files changed, 1337 insertions(+), 1224 deletions(-) create mode 100644 src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java (limited to 'src/Java') diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index 1fa7997a26..e0baa7d186 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -1,6 +1,5 @@ package gtPlusPlus; -import static gtPlusPlus.api.objects.minecraft.ChunkManager.mChunkLoaderManagerMap; import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableCustomCapes; import static gtPlusPlus.core.lib.CORE.ConfigSwitches.enableUpdateChecker; @@ -18,12 +17,9 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.Materials; import gregtech.api.util.GT_Recipe; -import gregtech.api.util.Recipe_GT; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gtPlusPlus.api.objects.Logger; -import gtPlusPlus.api.objects.data.Triplet; import gtPlusPlus.api.objects.minecraft.ChunkManager; -import gtPlusPlus.api.objects.minecraft.DimChunkPos; import gtPlusPlus.core.commands.CommandMath; import gtPlusPlus.core.common.CommonProxy; import gtPlusPlus.core.config.ConfigHandler; @@ -46,13 +42,9 @@ import gtPlusPlus.plugin.manager.Core_Manager; import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools; -import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntityChunkLoader; import gtPlusPlus.xmod.gregtech.loaders.GT_Material_Loader; import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling; import net.minecraft.launchwrapper.Launch; -import net.minecraft.world.chunk.Chunk; -import net.minecraftforge.common.ForgeChunkManager; -import net.minecraftforge.common.ForgeChunkManager.Ticket; import net.minecraftforge.oredict.OreDictionary; @MCVersion(value = "1.7.10") @@ -149,13 +141,13 @@ public class GTplusplus implements ActionListener { proxy.postInit(event); BookHandler.runLater(); Core_Manager.postInit(); - RecipeGen_Recycling.executeGenerators(); + RecipeGen_Recycling.executeGenerators(); + Logger.INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Logger.INFO("| Recipes succesfully Loaded: " + RegistrationHandler.recipesSuccess + " | Failed: " + RegistrationHandler.recipesFailed + " |"); Logger.INFO("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"); Logger.INFO("Finally, we are finished. Have some cripsy bacon as a reward."); - dumpGtRecipeMap(Recipe_GT.Gregtech_Recipe_Map.sSlowFusion2Recipes); } @EventHandler diff --git a/src/Java/gtPlusPlus/api/interfaces/IPlugin.java b/src/Java/gtPlusPlus/api/interfaces/IPlugin.java index 3ac960eaf2..99c71a5823 100644 --- a/src/Java/gtPlusPlus/api/interfaces/IPlugin.java +++ b/src/Java/gtPlusPlus/api/interfaces/IPlugin.java @@ -1,12 +1,6 @@ package gtPlusPlus.api.interfaces; -import gtPlusPlus.plugin.manager.Core_Manager; - public interface IPlugin { - - public default void register() { - Core_Manager.registerPlugin(this); - } public String getPluginName(); diff --git a/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java b/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java new file mode 100644 index 0000000000..5d79da2197 --- /dev/null +++ b/src/Java/gtPlusPlus/api/plugin/Sample_Plugin.java @@ -0,0 +1,32 @@ +package gtPlusPlus.api.plugin; + +import gtPlusPlus.api.interfaces.IPlugin; +import gtPlusPlus.plugin.manager.Core_Manager; + +public class Sample_Plugin implements IPlugin { + + private Sample_Plugin() { + Core_Manager.registerPlugin(this); //This must be called, else it won't load. + } + + @Override + public boolean preInit() { + return true; + } + + @Override + public boolean init() { + return true; + } + + @Override + public boolean postInit() { + return true; + } + + @Override + public String getPluginName() { + return "Sample Plugin"; + } + +} diff --git a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java index f97763dd54..01db44f28b 100644 --- a/src/Java/gtPlusPlus/core/block/base/BasicBlock.java +++ b/src/Java/gtPlusPlus/core/block/base/BasicBlock.java @@ -13,13 +13,21 @@ import net.minecraft.world.World; public class BasicBlock extends BlockContainer { public BasicBlock(final String unlocalizedName, final Material material) { - this(unlocalizedName, material, 2); + this(BlockTypes.STANDARD, unlocalizedName, material, 2); } - public BasicBlock(final String unlocalizedName, final Material material, final int harvestLevel) { + public BasicBlock(final BlockTypes type, final String unlocalizedName, final Material material) { + this(type, unlocalizedName, material, 2); + } + + public BasicBlock(BlockTypes type, final String unlocalizedName, final Material material, final int harvestLevel) { super(material); this.setBlockName(Utils.sanitizeString(unlocalizedName)); - this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); + + if (type != BlockTypes.ORE) { + this.setBlockTextureName(CORE.MODID + ":" + unlocalizedName); + } + this.setCreativeTab(AddToCreativeTab.tabBlock); this.setHardness(2.0F); this.setResistance(6.0F); diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java index 2f7b3338d7..351c44b0c5 100644 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java +++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseModular.java @@ -1,7 +1,6 @@ package gtPlusPlus.core.block.base; import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.GT_OreDictUnificator; @@ -15,106 +14,87 @@ import gtPlusPlus.core.util.minecraft.ItemUtils; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.world.IBlockAccess; -public class BlockBaseModular extends BasicBlock{ +public class BlockBaseModular extends BasicBlock { protected Material blockMaterial; - + protected int blockColour; protected BlockTypes thisBlock; protected String thisBlockMaterial; protected final String thisBlockType; public BlockBaseModular(final Material material, final BlockTypes blockType, final int colour) { - this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, blockType, colour, 2); + this(material.getUnlocalizedName(), material.getLocalizedName(), net.minecraft.block.material.Material.iron, + blockType, colour, 2); } - - public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) { + + public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, + final int colour) { this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2); } - public BlockBaseModular(final String unlocalizedName, final String blockMaterial, final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, final int miningLevel) { + public BlockBaseModular(final String unlocalizedName, final String blockMaterial, + final net.minecraft.block.material.Material vanillaMaterial, final BlockTypes blockType, final int colour, + final int miningLevel) { super(unlocalizedName, vanillaMaterial); this.setHarvestLevel(blockType.getHarvestTool(), miningLevel); - this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture()); + this.setBlockTextureName(CORE.MODID + ":" + blockType.getTexture()); this.blockColour = colour; this.thisBlock = blockType; this.thisBlockMaterial = blockMaterial; this.thisBlockType = blockType.name().toUpperCase(); this.setBlockName(this.GetProperName()); - if (!CORE.DEBUG){ - //Utils.LOG_INFO("=============Block Info Dump============="); - //Utils.LOG_INFO("thisBlock.name().toLowerCase() - "+thisBlock.name().toLowerCase()); - //Utils.LOG_INFO("This Blocks Type - "+thisBlockType); - //Utils.LOG_INFO("BlockTypes.STANDARD.name().toLowerCase() - "+BlockTypes.STANDARD.name().toLowerCase()); - //Utils.LOG_INFO("BlockTypes.FRAME.name().toLowerCase() - "+BlockTypes.FRAME.name().toLowerCase()); - //Utils.LOG_INFO("blockMaterial - "+blockMaterial); - //Utils.LOG_INFO("=========================================="); - } - - if (this.thisBlockType.equals(BlockTypes.STANDARD.name().toUpperCase())){ - //LanguageRegistry.addName(this, "Block of "+blockMaterial); - //Utils.LOG_INFO("Registered Block in Language Registry as: "+"Block of "+blockMaterial); + if (this.thisBlockType.equals(BlockTypes.STANDARD.name().toUpperCase())) { + GameRegistry.registerBlock(this, ItemBlockGtBlock.class, + Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); + GT_OreDictUnificator.registerOre( + "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") + .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), + ItemUtils.getSimpleStack(this)); } - else if (this.thisBlockType.equals(BlockTypes.FRAME.name().toUpperCase())){ - //LanguageRegistry.addName(this, blockMaterial+ " Frame Box"); - //Utils.LOG_INFO("Registered Block in Language Registry as: "+blockMaterial+ " Frame Box"); + else if (this.thisBlockType.equals(BlockTypes.FRAME.name().toUpperCase())) { + GameRegistry.registerBlock(this, ItemBlockGtFrameBox.class, + Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); + GT_OreDictUnificator.registerOre( + "frameGt" + getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "") + .replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), + ItemUtils.getSimpleStack(this)); } - - //setOreDict(unlocalizedName, blockType); - if (this.thisBlockType.equals(BlockTypes.STANDARD.name().toUpperCase())){ - GameRegistry.registerBlock(this, ItemBlockGtBlock.class, Utils.sanitizeString(blockType.getTexture()+unlocalizedName)); - GT_OreDictUnificator.registerOre("block"+getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "").replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), ItemUtils.getSimpleStack(this)); - //Utils.LOG_INFO("Registered Block in Block Registry as: "+"Block of "+blockMaterial); - } - else if (this.thisBlockType.equals(BlockTypes.FRAME.name().toUpperCase())){ - GameRegistry.registerBlock(this, ItemBlockGtFrameBox.class, Utils.sanitizeString(blockType.getTexture()+unlocalizedName)); - GT_OreDictUnificator.registerOre("frameGt"+getUnlocalizedName().replace("tile.", "").replace("tile.BlockGtFrame", "").replace("-", "").replace("_", "").replace(" ", "").replace("FrameBox", ""), ItemUtils.getSimpleStack(this)); - //Utils.LOG_INFO("Registered Block in Block Registry as: "+blockMaterial+" Frame Box"); + else if (this.thisBlockType.equals(BlockTypes.ORE.name().toUpperCase())) { + GameRegistry.registerBlock(this, ItemBlockGtBlock.class, + Utils.sanitizeString(blockType.getTexture() + unlocalizedName)); + GT_OreDictUnificator.registerOre( + "block" + getUnlocalizedName().replace("tile.block", "").replace("tile.", "").replace("of", "") + .replace("Of", "").replace("Block", "").replace("-", "").replace("_", "").replace(" ", ""), + ItemUtils.getSimpleStack(this)); } - } /** - * Returns which pass should this block be rendered on. 0 for solids and 1 for alpha + * Returns which pass should this block be rendered on. 0 for solids and 1 + * for alpha */ @Override @SideOnly(Side.CLIENT) - public int getRenderBlockPass() - { - if (this.thisBlock == BlockTypes.FRAME){ + public int getRenderBlockPass() { + if (this.thisBlock == BlockTypes.FRAME) { return 1; } return 0; } - /*@Override - public String getLocalizedName() { - String tempIngot; - if (thisBlock == BlockTypes.STANDARD){ - tempIngot = "Block of "+thisBlockMaterial; - } - else if (thisBlock == BlockTypes.FRAME){ - tempIngot = thisBlockMaterial + " Frame Box"; - } - else { - - tempIngot = getUnlocalizedName().replace("tile.blockGt", "ingot"); - } - return tempIngot; - }*/ - public String GetProperName() { String tempIngot; - if (this.thisBlock == BlockTypes.STANDARD){ - tempIngot = "Block of "+this.thisBlockMaterial; + if (this.thisBlock == BlockTypes.STANDARD) { + tempIngot = "Block of " + this.thisBlockMaterial; } - else if (this.thisBlock == BlockTypes.FRAME){ + else if (this.thisBlock == BlockTypes.FRAME) { tempIngot = this.thisBlockMaterial + " Frame Box"; } - else if (this.thisBlock == BlockTypes.ORE){ - tempIngot = this.thisBlockMaterial + " Ore"; + else if (this.thisBlock == BlockTypes.ORE) { + tempIngot = this.thisBlockMaterial + " Ore [Old]"; } else { @@ -124,22 +104,22 @@ public class BlockBaseModular extends BasicBlock{ } @Override - public boolean isOpaqueCube() - { + public boolean isOpaqueCube() { return false; } @Override @SideOnly(Side.CLIENT) - public void registerBlockIcons(final IIconRegister iIcon) - { - this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture()); + public void registerBlockIcons(final IIconRegister iIcon) { + if (this.thisBlock != BlockTypes.ORE) { + this.blockIcon = iIcon.registerIcon(CORE.MODID + ":" + this.thisBlock.getTexture()); + } } @Override - public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4){ + public int colorMultiplier(final IBlockAccess par1IBlockAccess, final int par2, final int par3, final int par4) { - if (this.blockColour == 0){ + if (this.blockColour == 0) { return MathUtils.generateSingularRandomHexValue(); } @@ -148,7 +128,7 @@ public class BlockBaseModular extends BasicBlock{ @Override public int getRenderColor(final int aMeta) { - if (this.blockColour == 0){ + if (this.blockColour == 0) { return MathUtils.generateSingularRandomHexValue(); } diff --git a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java index d444f11261..5f476ef8df 100644 --- a/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java +++ b/src/Java/gtPlusPlus/core/block/base/BlockBaseOre.java @@ -3,10 +3,6 @@ package gtPlusPlus.core.block.base; import java.lang.reflect.Field; import cpw.mods.fml.common.registry.GameRegistry; -import cpw.mods.fml.common.registry.LanguageRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; import gregtech.api.enums.Textures; import gregtech.api.interfaces.IIconContainer; @@ -21,11 +17,9 @@ import gtPlusPlus.core.item.base.itemblock.ItemBlockOre; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.material.Material; import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.ItemUtils; import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.block.Block; -import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.entity.EnumCreatureType; import net.minecraft.init.Blocks; import net.minecraft.util.IIcon; @@ -34,9 +28,9 @@ import net.minecraft.world.IBlockAccess; public class BlockBaseOre extends BasicBlock implements ITexturedBlock { private final Material blockMaterial; - + public BlockBaseOre(final Material material, final BlockTypes blockType, final int colour) { - super(Utils.sanitizeString(material.getUnlocalizedName()), net.minecraft.block.material.Material.rock); + super(blockType, Utils.sanitizeString(material.getUnlocalizedName()), net.minecraft.block.material.Material.rock); this.blockMaterial = material; this.setHardness(2.0f); this.setResistance(6.0F); @@ -45,15 +39,9 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { this.setCreativeTab(AddToCreativeTab.tabBlock); this.setStepSound(soundTypeStone); this.setBlockName("Ore"+Utils.sanitizeString(Utils.sanitizeString(material.getUnlocalizedName()))); - - - //this.setBlockTextureName(CORE.MODID+":"+blockType.getTexture()); - //this.setBlockName(this.blockMaterial.getLocalizedName()+" Ore"); - try { GameRegistry.registerBlock(this, ItemBlockOre.class, Utils.sanitizeString("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()))); GT_OreDictUnificator.registerOre("ore"+Utils.sanitizeString(this.blockMaterial.getLocalizedName()), ItemUtils.getSimpleStack(this)); - //LanguageRegistry.addName(this, blockMaterial.getLocalizedName()+ " Ore"); } catch (Throwable t){ t.printStackTrace(); @@ -89,7 +77,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { */ //.08 compat - IIconContainer[] hiddenTextureArray; + public static IIconContainer[] hiddenTextureArray; public ITexture[] getTexture(byte arg0) { return getTexture(null, arg0); } @@ -98,7 +86,6 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { if (this.blockMaterial != null){ GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); if (aIconSet != null){ - //Logger.INFO("[Render] Good Overlay."); return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; } } @@ -111,30 +98,21 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { try { Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES"); if (o != null){ - hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); - if (hiddenTextureArray != null){ - //Found - } - else { - hiddenTextureArray = new IIconContainer[6]; - } + hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); + } + if (hiddenTextureArray == null){ + hiddenTextureArray = new IIconContainer[6]; } } catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) { + hiddenTextureArray = new IIconContainer[6]; } } } - - //return new ITexture[]{new GT_RenderedTexture(Textures.BlockIcons.STONES[0], new short[]{240, 240, 240, 0})}; - return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; + return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; } - public static class oldOreBlock extends BlockBaseModular{ - - @SuppressWarnings("unused") - private IIcon base; - @SuppressWarnings("unused") - private IIcon overlay; + public static class oldOreBlock extends BlockBaseModular implements ITexturedBlock{ public oldOreBlock(final String unlocalizedName, final String blockMaterial, final BlockTypes blockType, final int colour) { this(unlocalizedName, blockMaterial, net.minecraft.block.material.Material.iron, blockType, colour, 2); @@ -144,7 +122,7 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { super(unlocalizedName, blockMaterial, vanillaMaterial, blockType, colour, miningLevel); } - @Override + /*@Override @SideOnly(Side.CLIENT) public void registerBlockIcons(final IIconRegister iIcon) { @@ -167,11 +145,66 @@ public class BlockBaseOre extends BasicBlock implements ITexturedBlock { return MathUtils.generateSingularRandomHexValue(); } return this.blockColour; - } + }*/ @Override public boolean canCreatureSpawn(final EnumCreatureType type, final IBlockAccess world, final int x, final int y, final int z) { return false; + } + + @Override + public int getRenderType() { + return CustomOreBlockRenderer.INSTANCE.mRenderID; + } + + @Override + public IIcon getIcon(IBlockAccess aIBlockAccess, int aX, int aY, int aZ, int aSide) { + return Blocks.stone.getIcon(0, 0); + } + + @Override + public IIcon getIcon(int aSide, int aMeta) { + return Blocks.stone.getIcon(0, 0); + } + + /** + * GT Texture Handler + */ + + //.08 compat + IIconContainer[] hiddenTextureArray; + public ITexture[] getTexture(byte arg0) { + return getTexture(null, arg0); + } + + public ITexture[] getTexture(Block block, byte side) { + if (this.blockMaterial != null){ + GT_RenderedTexture aIconSet = new GT_RenderedTexture(blockMaterial.getTextureSet().mTextures[OrePrefixes.ore.mTextureIndex], this.blockMaterial.getRGBA()); + if (aIconSet != null){ + return new ITexture[]{new GT_CopiedBlockTexture(Blocks.stone, 0, 0), aIconSet}; + } + } + + if (hiddenTextureArray == null){ + if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){ + hiddenTextureArray = Textures.BlockIcons.GRANITES; + } + else { + try { + Field o = ReflectionUtils.getField(Textures.BlockIcons.class, "STONES"); + if (o != null){ + hiddenTextureArray = (IIconContainer[]) o.get(Textures.BlockIcons.class); + } + if (hiddenTextureArray == null){ + hiddenTextureArray = new IIconContainer[6]; + } + } + catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) { + hiddenTextureArray = new IIconContainer[6]; + } + } + } + return new ITexture[]{new GT_RenderedTexture(hiddenTextureArray[0], new short[]{240, 240, 240, 0})}; } } diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 09b6e24d9e..749431b6de 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -3,16 +3,12 @@ package gtPlusPlus.core.material; import static gregtech.api.enums.GT_Values.M; import java.util.*; -import java.util.Map.Entry; - import gregtech.api.enums.*; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.api.objects.data.AutoMap; -import gtPlusPlus.api.objects.data.Pair; import gtPlusPlus.core.item.base.cell.BaseItemCell; import gtPlusPlus.core.material.state.MaterialState; import gtPlusPlus.core.util.Utils; -import gtPlusPlus.core.util.data.ArrayUtils; import gtPlusPlus.core.util.data.StringUtils; import gtPlusPlus.core.util.math.MathUtils; import gtPlusPlus.core.util.minecraft.FluidUtils; @@ -24,7 +20,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; -import scala.xml.dtd.ELEMENTS; public class Material { diff --git a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java index 5f83074a0d..132db39f3f 100644 --- a/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java +++ b/src/Java/gtPlusPlus/core/material/nuclear/FLUORIDES.java @@ -3,6 +3,7 @@ package gtPlusPlus.core.material.nuclear; import gregtech.api.enums.Materials; import gtPlusPlus.core.material.*; import gtPlusPlus.core.material.state.MaterialState; +import gtPlusPlus.core.util.minecraft.MaterialUtils; public class FLUORIDES { @@ -22,8 +23,9 @@ public class FLUORIDES { false, //Generate cells //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.getInstance().CALCIUM, 1), - new MaterialStack(ELEMENT.getInstance().FLUORINE, 2) + new MaterialStack(ELEMENT.getInstance().CALCIUM, 24), + new MaterialStack(ELEMENT.getInstance().FLUORINE, 72), + new MaterialStack(MaterialUtils.generateMaterialFromGtENUM(Materials.Galena), 4) }); //ThF4 diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index cc1fdaf91b..72437d0bad 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -32,14 +32,14 @@ import net.minecraftforge.fluids.FluidStack; public class RECIPES_GREGTECH { - public static void run(){ + public static void run() { Logger.INFO("Loading Recipes through GregAPI for Industrial Multiblocks."); execute(); } - private static void execute(){ + private static void execute() { cokeOvenRecipes(); - //matterFabRecipes(); + // matterFabRecipes(); assemblerRecipes(); fluidcannerRecipes(); distilleryRecipes(); @@ -67,13 +67,10 @@ public class RECIPES_GREGTECH { } private static void extruderRecipes() { - //Osmium Credits - if (GT_Values.RA.addExtruderRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("blockOsmium", 4), - ItemList.Shape_Mold_Credit.get(0), - ItemList.Credit_Greg_Osmium.get(0), - (int) Math.max(Materials.Osmium.getMass() * 2L * 1, 1), - (int) (4 * Materials.Osmium.mDensity))){ + // Osmium Credits + if (GT_Values.RA.addExtruderRecipe(ItemUtils.getItemStackOfAmountFromOreDict("blockOsmium", 1), + ItemList.Shape_Mold_Credit.get(0), ItemList.Credit_Greg_Osmium.get(1), + (int) Math.max(Materials.Osmium.getMass() * 2L * 20, 1), 1024)) { Logger.WARNING("Extruder Recipe: Osmium Credit - Success"); } else { @@ -83,623 +80,666 @@ public class RECIPES_GREGTECH { private static void blastSmelterRecipes() { - //Black Bronze + // Black Bronze CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(13), + new ItemStack[] { ItemUtils.getGregtechCircuit(13), ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 3), - }, - FluidUtils.getFluidStack("molten.blackbronze", 5*144), - 0, - MathUtils.findPercentageOfInt(200*20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 3), }, + FluidUtils.getFluidStack("molten.blackbronze", 5 * 144), 0, MathUtils.findPercentageOfInt(200 * 20, 80), 120); - //Black Steel + // Black Steel CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(5), + new ItemStack[] { ItemUtils.getGregtechCircuit(5), ItemUtils.getItemStackOfAmountFromOreDict("dustNickel", 5), ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 15), ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 3) - }, - FluidUtils.getFluidStack("molten.blacksteel", 25*144), - 0, - MathUtils.findPercentageOfInt(60*20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 3) }, + FluidUtils.getFluidStack("molten.blacksteel", 25 * 144), 0, MathUtils.findPercentageOfInt(60 * 20, 80), 120); - //Red Steel + // Red Steel CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(6), + new ItemStack[] { ItemUtils.getGregtechCircuit(6), ItemUtils.getItemStackOfAmountFromOreDict("dustSilver", 4), ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 4), ItemUtils.getItemStackOfAmountFromOreDict("dustZinc", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustBismuth", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 10), - ItemUtils.getItemStackOfAmountFromOreDict("dustBlackSteel", 20) - }, - FluidUtils.getFluidStack("molten.redsteel", 40*144), - 0, - MathUtils.findPercentageOfInt(65*20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustBlackSteel", 20) }, + FluidUtils.getFluidStack("molten.redsteel", 40 * 144), 0, MathUtils.findPercentageOfInt(65 * 20, 80), 120); - //Blue Steel - CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(5), - ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 12), - ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 18), - ItemUtils.getItemStackOfAmountFromOreDict("dustZinc", 5), - ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 30), - ItemUtils.getItemStackOfAmountFromOreDict("dustBlackSteel", 60) - - }, - FluidUtils.getFluidStack("molten.bluesteel", 125*144), - 0, - MathUtils.findPercentageOfInt(70*20, 80), - 120); + // Blue Steel + CORE.RA.addBlastSmelterRecipe(new ItemStack[] { ItemUtils.getGregtechCircuit(5), + ItemUtils.getItemStackOfAmountFromOreDict("dustGold", 12), + ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 18), + ItemUtils.getItemStackOfAmountFromOreDict("dustZinc", 5), + ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 30), + ItemUtils.getItemStackOfAmountFromOreDict("dustBlackSteel", 60) + + }, FluidUtils.getFluidStack("molten.bluesteel", 125 * 144), 0, MathUtils.findPercentageOfInt(70 * 20, 80), 120); - //TungstenSteel + // TungstenSteel CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), + new ItemStack[] { ItemUtils.getGregtechCircuit(2), ItemUtils.getItemStackOfAmountFromOreDict("ingotTungsten", 1), - ItemUtils.getItemStackOfAmountFromOreDict("ingotSteel", 1) - }, - FluidUtils.getFluidStack("molten.tungstensteel", 2*144), - 0, - MathUtils.findPercentageOfInt(300*20, 80), - 120); + ItemUtils.getItemStackOfAmountFromOreDict("ingotSteel", 1) }, + FluidUtils.getFluidStack("molten.tungstensteel", 2 * 144), 0, + MathUtils.findPercentageOfInt(300 * 20, 80), 120); - //Stainless Steel + // Stainless Steel CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(14), + new ItemStack[] { ItemUtils.getGregtechCircuit(14), ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 6), ItemUtils.getItemStackOfAmountFromOreDict("dustNickel", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustManganese", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1) - }, - FluidUtils.getFluidStack("molten.stainlesssteel", 9*144), - 0, - MathUtils.findPercentageOfInt(85*20, 80), - 120); + ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1) }, + FluidUtils.getFluidStack("molten.stainlesssteel", 9 * 144), 0, + MathUtils.findPercentageOfInt(85 * 20, 80), 120); - //Eglin + // Eglin CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(7), + new ItemStack[] { ItemUtils.getGregtechCircuit(7), ItemUtils.getItemStackOfAmountFromOreDict("dustNickel", 5), ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 23), ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3), ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustSilicon", 12) - }, - FluidUtils.getFluidStack("molten.eglinsteel", 48*144), - 0, - MathUtils.findPercentageOfInt(30*20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustSilicon", 12) }, + FluidUtils.getFluidStack("molten.eglinsteel", 48 * 144), 0, MathUtils.findPercentageOfInt(30 * 20, 80), 120); if (!CORE.GTNH) { - //HSS-G + // HSS-G CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(14), + new ItemStack[] { ItemUtils.getGregtechCircuit(14), ItemUtils.getItemStackOfAmountFromOreDict("dustTungstenSteel", 5), ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustMolybdenum", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1) - }, - FluidUtils.getFluidStack("molten.hssg", 9 * 144), - 0, - MathUtils.findPercentageOfInt(450 * 20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 1) }, + FluidUtils.getFluidStack("molten.hssg", 9 * 144), 0, MathUtils.findPercentageOfInt(450 * 20, 80), 120); - //HSS-G + // HSS-G CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(5), + new ItemStack[] { ItemUtils.getGregtechCircuit(5), ItemUtils.getItemStackOfAmountFromOreDict("dustTungsten", 5), ItemUtils.getItemStackOfAmountFromOreDict("dustSteel", 5), ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 2), ItemUtils.getItemStackOfAmountFromOreDict("dustMolybdenum", 4), - ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 2) - }, - FluidUtils.getFluidStack("molten.hssg", 18 * 144), - 0, - MathUtils.findPercentageOfInt(900 * 20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustChrome", 2) }, + FluidUtils.getFluidStack("molten.hssg", 18 * 144), 0, MathUtils.findPercentageOfInt(900 * 20, 80), 120); - //HSS-E + // HSS-E CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(14), + new ItemStack[] { ItemUtils.getGregtechCircuit(14), ItemUtils.getItemStackOfAmountFromOreDict("dustHSSG", 6), ItemUtils.getItemStackOfAmountFromOreDict("dustCobalt", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSilicon", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustManganese", 1) - }, - FluidUtils.getFluidStack("molten.hsse", 9 * 144), - 0, - MathUtils.findPercentageOfInt(540 * 20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustManganese", 1) }, + FluidUtils.getFluidStack("molten.hsse", 9 * 144), 0, MathUtils.findPercentageOfInt(540 * 20, 80), 120); - //HSS-S + // HSS-S CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(3), + new ItemStack[] { ItemUtils.getGregtechCircuit(3), ItemUtils.getItemStackOfAmountFromOreDict("dustHSSG", 6), ItemUtils.getItemStackOfAmountFromOreDict("dustOsmium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 2) - }, - FluidUtils.getFluidStack("molten.hsss", 9 * 144), - 0, - MathUtils.findPercentageOfInt(810 * 20, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 2) }, + FluidUtils.getFluidStack("molten.hsss", 9 * 144), 0, MathUtils.findPercentageOfInt(810 * 20, 80), 120); - //Osmiridium + // Osmiridium CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), + new ItemStack[] { ItemUtils.getGregtechCircuit(2), ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 3), - ItemUtils.getItemStackOfAmountFromOreDict("dustOsmium", 1) - }, - Materials.Helium.getGas(1000), - FluidUtils.getFluidStack("molten.osmiridium", 4 * 144), - 0, - MathUtils.findPercentageOfInt(500 * 20, 80), - 1920); - - //Naq Alloy + ItemUtils.getItemStackOfAmountFromOreDict("dustOsmium", 1) }, + Materials.Helium.getGas(1000), FluidUtils.getFluidStack("molten.osmiridium", 4 * 144), 0, + MathUtils.findPercentageOfInt(500 * 20, 80), 1920); + + // Naq Alloy CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), + new ItemStack[] { ItemUtils.getGregtechCircuit(2), ItemUtils.getItemStackOfAmountFromOreDict("dustNaquadah", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustOsmiridium", 1) - }, - Materials.Argon.getGas(1000), - FluidUtils.getFluidStack("molten.naquadahalloy", 2 * 144), - 0, - MathUtils.findPercentageOfInt(500 * 20, 80), - 30720); - - //Nickel-Zinc-Ferrite + ItemUtils.getItemStackOfAmountFromOreDict("dustOsmiridium", 1) }, + Materials.Argon.getGas(1000), FluidUtils.getFluidStack("molten.naquadahalloy", 2 * 144), 0, + MathUtils.findPercentageOfInt(500 * 20, 80), 30720); + + // Nickel-Zinc-Ferrite if (Materials.get("NickelZincFerrite") != null) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), - ItemUtils.getItemStackOfAmountFromOreDict("dustFerriteMixture", 6) - }, - Materials.Oxygen.getGas(2000), - FluidUtils.getFluidStack("molten.nickelzincferrite", 2 * 144), - 0, - MathUtils.findPercentageOfInt(600 * 20, 80), - 120); + new ItemStack[] { ItemUtils.getGregtechCircuit(2), + ItemUtils.getItemStackOfAmountFromOreDict("dustFerriteMixture", 6) }, + Materials.Oxygen.getGas(2000), FluidUtils.getFluidStack("molten.nickelzincferrite", 2 * 144), 0, + MathUtils.findPercentageOfInt(600 * 20, 80), 120); } - //Gallium-Arsenide + // Gallium-Arsenide if (Materials.get("GalliumArsenide") != null) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), + new ItemStack[] { ItemUtils.getGregtechCircuit(2), ItemUtils.getItemStackOfAmountFromOreDict("dustGallium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustArsenic", 1) - }, - FluidUtils.getFluidStack("molten.galliumarsenide", 2 * 144), - 0, - MathUtils.findPercentageOfInt(600 * 20, 80), - 120); + ItemUtils.getItemStackOfAmountFromOreDict("dustArsenic", 1) }, + FluidUtils.getFluidStack("molten.galliumarsenide", 2 * 144), 0, + MathUtils.findPercentageOfInt(600 * 20, 80), 120); } - //TungstenCarbide + // TungstenCarbide if (Materials.get("TungstenCarbide") != null) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(12), + new ItemStack[] { ItemUtils.getGregtechCircuit(12), ItemUtils.getItemStackOfAmountFromOreDict("dustTungsten", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1) - }, - FluidUtils.getFluidStack("molten.tungstencarbide", 2 * 144), - 0, - MathUtils.findPercentageOfInt((int) Math.max(Materials.get("TungstenCarbide").getMass() / 40L, 1L) * Materials.get("TungstenCarbide").mBlastFurnaceTemp, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1) }, + FluidUtils.getFluidStack("molten.tungstencarbide", 2 * 144), 0, + MathUtils.findPercentageOfInt( + (int) Math.max(Materials.get("TungstenCarbide").getMass() / 40L, 1L) + * Materials.get("TungstenCarbide").mBlastFurnaceTemp, + 80), 480); } - - //Vanadium-Gallium + // Vanadium-Gallium if (Materials.get("VanadiumGallium") != null) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(12), + new ItemStack[] { ItemUtils.getGregtechCircuit(12), ItemUtils.getItemStackOfAmountFromOreDict("dustGallium", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 3) - }, - FluidUtils.getFluidStack("molten.vanadiumgallium", 4 * 144), - 0, - MathUtils.findPercentageOfInt((int) Math.max(Materials.VanadiumGallium.getMass() / 40L, 1L) * Materials.VanadiumGallium.mBlastFurnaceTemp, 80), + ItemUtils.getItemStackOfAmountFromOreDict("dustVanadium", 3) }, + FluidUtils.getFluidStack("molten.vanadiumgallium", 4 * 144), 0, + MathUtils.findPercentageOfInt((int) Math.max(Materials.VanadiumGallium.getMass() / 40L, 1L) + * Materials.VanadiumGallium.mBlastFurnaceTemp, 80), 480); } - //EIO - //Dark Steel - if (ItemUtils.getItemStackOfAmountFromOreDict("dustElectricalSteel", 1) != ItemUtils.getSimpleStack(ModItems.AAA_Broken)) { + // EIO + // Dark Steel + if (ItemUtils.getItemStackOfAmountFromOreDict("dustElectricalSteel", 1) != ItemUtils + .getSimpleStack(ModItems.AAA_Broken)) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), + new ItemStack[] { ItemUtils.getGregtechCircuit(2), ItemUtils.getItemStackOfAmountFromOreDict("dustElectricalSteel", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustObsidian", 1) - }, - FluidUtils.getFluidStack("molten.darksteel", 2 * 144), - 0, - MathUtils.findPercentageOfInt(200 * 20, 80), - 120); + ItemUtils.getItemStackOfAmountFromOreDict("dustObsidian", 1) }, + FluidUtils.getFluidStack("molten.darksteel", 2 * 144), 0, + MathUtils.findPercentageOfInt(200 * 20, 80), 120); } - //Pulsating Iron - if (ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1) != ItemUtils.getSimpleStack(ModItems.AAA_Broken)) { + // Pulsating Iron + if (ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1) != ItemUtils + .getSimpleStack(ModItems.AAA_Broken)) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(2), + new ItemStack[] { ItemUtils.getGregtechCircuit(2), ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1), - ItemUtils.getSimpleStack(Items.ender_pearl) - }, - FluidUtils.getFluidStack("molten.pulsatingiron", 2 * 144), - 0, - MathUtils.findPercentageOfInt(8 * 20, 80), - 120); + ItemUtils.getSimpleStack(Items.ender_pearl) }, + FluidUtils.getFluidStack("molten.pulsatingiron", 2 * 144), 0, + MathUtils.findPercentageOfInt(8 * 20, 80), 120); } - //Energetic Alloy - if (ItemUtils.getItemStackOfAmountFromOreDict("dustEnergeticAlloy", 1) != ItemUtils.getSimpleStack(ModItems.AAA_Broken)) { + // Energetic Alloy + if (ItemUtils.getItemStackOfAmountFromOreDict("dustEnergeticAlloy", 1) != ItemUtils + .getSimpleStack(ModItems.AAA_Broken)) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(12), + new ItemStack[] { ItemUtils.getGregtechCircuit(12), ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1), - ItemUtils.getSimpleStack(Items.glowstone_dust) - }, + ItemUtils.getSimpleStack(Items.glowstone_dust) }, FluidUtils.getFluidStack("molten.redstone", 144), - FluidUtils.getFluidStack("molten.energeticalloy", 144), - 0, - MathUtils.findPercentageOfInt(9 * 20, 80), - 120); + FluidUtils.getFluidStack("molten.energeticalloy", 144), 0, + MathUtils.findPercentageOfInt(9 * 20, 80), 120); } - //Vibrant Alloy - if (ItemUtils.getItemStackOfAmountFromOreDict("dustVibrantAlloy", 1) != ItemUtils.getSimpleStack(ModItems.AAA_Broken)) { + // Vibrant Alloy + if (ItemUtils.getItemStackOfAmountFromOreDict("dustVibrantAlloy", 1) != ItemUtils + .getSimpleStack(ModItems.AAA_Broken)) { CORE.RA.addBlastSmelterRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(12), + new ItemStack[] { ItemUtils.getGregtechCircuit(12), ItemUtils.getItemStackOfAmountFromOreDict("dustEnergeticAlloy", 1), - ItemUtils.getSimpleStack(Items.ender_pearl) - }, - FluidUtils.getFluidStack("molten.vibrantalloy", 144), - 0, - MathUtils.findPercentageOfInt(16 * 20, 80), - 480); + ItemUtils.getSimpleStack(Items.ender_pearl) }, + FluidUtils.getFluidStack("molten.vibrantalloy", 144), 0, + MathUtils.findPercentageOfInt(16 * 20, 80), 480); } } } private static void fluidcannerRecipes() { - //Sulfuric Acid - GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), null); - GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250)); - - //Hydrofluoric Acid - GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), FluidUtils.getFluidStack("hydrofluoricacid", 250), null); - GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 250)); + // Sulfuric Acid + GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), + ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), FluidUtils.getFluidStack("sulfuricacid", 250), + null); + GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemSulfuricPotion), + ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250)); + + // Hydrofluoric Acid + GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(Items.glass_bottle), + ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), + FluidUtils.getFluidStack("hydrofluoricacid", 250), null); + GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion), + ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 250)); } - private static void cokeOvenRecipes(){ + private static void cokeOvenRecipes() { Logger.INFO("Loading Recipes for Industrial Coking Oven."); - //Wood to Charcoal - AddGregtechRecipe.addCokeAndPyrolyseRecipes( - GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 20L), - 20, - GT_ModHandler.getSteam(1000), - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 24L), - FluidUtils.getFluidStack("fluid.coalgas", 1440), - 60, - 30); - - //Coal to Coke - AddGregtechRecipe.addCokeAndPyrolyseRecipes( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16L), - 22, - GT_ModHandler.getSteam(1000), - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 10), - FluidUtils.getFluidStack("fluid.coalgas", 2880), - 30, - 120); - - //Coke & Coal - CORE.RA.addCokeOvenRecipe( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 12L), - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 6), - GT_ModHandler.getSteam(2000), - FluidUtils.getFluidStack("fluid.coalgas", 5040), - ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 14), - 60*20, - 240); + // Wood to Charcoal + AddGregtechRecipe.addCokeAndPyrolyseRecipes(GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 20L), 20, + GT_ModHandler.getSteam(1000), GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 24L), + FluidUtils.getFluidStack("fluid.coalgas", 1440), 60, 30); + // Coal to Coke + AddGregtechRecipe.addCokeAndPyrolyseRecipes(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 16L), 22, + GT_ModHandler.getSteam(1000), ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 10), + FluidUtils.getFluidStack("fluid.coalgas", 2880), 30, 120); + // Coke & Coal + CORE.RA.addCokeOvenRecipe(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 12L), + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 6), GT_ModHandler.getSteam(2000), + FluidUtils.getFluidStack("fluid.coalgas", 5040), + ItemUtils.getItemStackOfAmountFromOreDict("fuelCoke", 14), 60 * 20, 240); } - private static void matterFabRecipes(){ + private static void matterFabRecipes() { Logger.INFO("Loading Recipes for Matter Fabricator."); try { - CORE.RA.addMatterFabricatorRecipe( - Materials.UUAmplifier.getFluid(1L), //Fluid Input - Materials.UUMatter.getFluid(1L), //Fluid Output - 800, //Time in ticks - 32); //EU - }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} + CORE.RA.addMatterFabricatorRecipe(Materials.UUAmplifier.getFluid(1L), // Fluid + // Input + Materials.UUMatter.getFluid(1L), // Fluid Output + 800, // Time in ticks + 32); // EU + } + catch (final NullPointerException e) { + Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } try { - CORE.RA.addMatterFabricatorRecipe( - null, //Fluid Input - Materials.UUMatter.getFluid(1L), //Fluid Output - 3200, //Time in ticks - 32); //EU - }catch (final NullPointerException e){Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} + CORE.RA.addMatterFabricatorRecipe(null, // Fluid Input + Materials.UUMatter.getFluid(1L), // Fluid Output + 3200, // Time in ticks + 32); // EU + } + catch (final NullPointerException e) { + Logger.INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } } - private static void dehydratorRecipes(){ + private static void dehydratorRecipes() { Logger.INFO("Loading Recipes for Chemical Dehydrator."); try { - //Makes Lithium Carbonate - CORE.RA.addDehydratorRecipe( - ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1), //Item Input - FluidUtils.getFluidStack("sulfuriclithium", 440), //Fluid input (slot 1) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1), + // Makes Lithium Carbonate + CORE.RA.addDehydratorRecipe(ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1), // Item + // Input + FluidUtils.getFluidStack("sulfuriclithium", 440), // Fluid + // input + // (slot + // 1) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3), ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 3) - }, //Output Array of Items - Upto 9 - 30*20, //Time in ticks - 30); //EU - }catch (final NullPointerException e){Logger.INFO("[cellSulfuricLithium] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} + ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 3) }, // Output + // Array + // of + // Items + // - + // Upto + // 9 + 30 * 20, // Time in ticks + 30); // EU + } + catch (final NullPointerException e) { + Logger.INFO("[cellSulfuricLithium] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } try { - ItemStack cells = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemCellEmpty", "Empty Fluid Cells", 0, 12); + ItemStack cells = ItemUtils.getItemStackWithMeta(LoadedMods.IndustrialCraft2, "IC2:itemCellEmpty", + "Empty Fluid Cells", 0, 12); - if (cells == null){ + if (cells == null) { cells = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 12); } - final ItemStack[] input = {cells, ItemUtils.getItemStackOfAmountFromOreDict("dustLepidolite", 20)}; - - CORE.RA.addDehydratorRecipe( - input, //Item input (Array, up to 2) - FluidUtils.getFluidStack("sulfuricacid", 10000), //Fluid input (slot 1) - FluidUtils.getFluidStack("sulfuriclithium", 10000), //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 1), + final ItemStack[] input = { cells, ItemUtils.getItemStackOfAmountFromOreDict("dustLepidolite", 20) }; + + CORE.RA.addDehydratorRecipe(input, // Item input (Array, up to 2) + FluidUtils.getFluidStack("sulfuricacid", 10000), // Fluid + // input + // (slot + // 1) + FluidUtils.getFluidStack("sulfuriclithium", 10000), // Fluid + // output + // (slot + // 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 1), ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4), ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 10), ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 3), //LithiumCarbonate - }, //Output Array of Items - Upto 9, - new int[]{0}, - 75*20, //Time in ticks - 1000); //EU + ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 3), // LithiumCarbonate + }, // Output Array of Items - Upto 9, + new int[] { 0 }, 75 * 20, // Time in ticks + 1000); // EU - }catch (final NullPointerException e){Logger.INFO("[dustLepidolite] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} + } + catch (final NullPointerException e) { + Logger.INFO("[dustLepidolite] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } try { - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 10) - }, //Item input (Array, up to 2) - FluidUtils.getFluidStack("molten.uraniumtetrafluoride", 1440), //Fluid input (slot 1) - null, //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustUraniumTetrafluoride", 10), - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 10) - }, //Output Array of Items - Upto 9, - new int[]{0}, - 150*20, //Time in ticks - 2000); //EU - - }catch (final NullPointerException e){Logger.INFO("[dustUraniumTetrafluoride] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} + CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 10) }, // Item + // input + // (Array, + // up + // to + // 2) + FluidUtils.getFluidStack("molten.uraniumtetrafluoride", 1440), // Fluid + // input + // (slot + // 1) + null, // Fluid output (slot 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustUraniumTetrafluoride", 10), + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 10) }, // Output + // Array + // of + // Items + // - + // Upto + // 9, + new int[] { 0 }, 150 * 20, // Time in ticks + 2000); // EU + + } + catch (final NullPointerException e) { + Logger.INFO("[dustUraniumTetrafluoride] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } try { - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 10) - }, //Item input (Array, up to 2) - FluidUtils.getFluidStack("molten.uraniumhexafluoride", 1440), //Fluid input (slot 1) - null, //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustUraniumHexafluoride", 10), - ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 10) - }, //Output Array of Items - Upto 9, - new int[]{0}, - 300*20, //Time in ticks - 4000); //EU - - }catch (final NullPointerException e){Logger.INFO("[dustUraniumHexafluoride] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} - - //Raisins from Grapes + CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 10) }, // Item + // input + // (Array, + // up + // to + // 2) + FluidUtils.getFluidStack("molten.uraniumhexafluoride", 1440), // Fluid + // input + // (slot + // 1) + null, // Fluid output (slot 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustUraniumHexafluoride", 10), + ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellEmpty", 10) }, // Output + // Array + // of + // Items + // - + // Upto + // 9, + new int[] { 0 }, 300 * 20, // Time in ticks + 4000); // EU + + } + catch (final NullPointerException e) { + Logger.INFO("[dustUraniumHexafluoride] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + + // Raisins from Grapes try { - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("cropGrape", 1) - }, //Item input (Array, up to 2) - null, //Fluid input (slot 1) - null, //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("foodRaisins", 1) - }, //Output Array of Items - Upto 9, - new int[]{0}, - 10*20, //Time in ticks - 8); //EU - - }catch (final NullPointerException e){Logger.INFO("[foodRaisins] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} - - //Calcium Hydroxide - if ((ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1).getItem() != ModItems.AAA_Broken) || LoadedMods.IHL){ + CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cropGrape", 1) }, // Item + // input + // (Array, + // up + // to + // 2) + null, // Fluid input (slot 1) + null, // Fluid output (slot 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("foodRaisins", 1) }, // Output + // Array + // of + // Items + // - + // Upto + // 9, + new int[] { 0 }, 10 * 20, // Time in ticks + 8); // EU + + } + catch (final NullPointerException e) { + Logger.INFO("[foodRaisins] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + + // Calcium Hydroxide + if ((ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1).getItem() != ModItems.AAA_Broken) + || LoadedMods.IHL) { try { CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) - }, //Item input (Array, up to 2) - FluidUtils.getFluidStack("water", 10000), //Fluid input (slot 1) - null, //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 20) - }, //Output Array of Items - Upto 9, - new int[]{0}, - 120*20, //Time in ticks - 120); //EU - - }catch (final NullPointerException e){Logger.INFO("[dustCalciumHydroxide] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} - - //2 LiOH + CaCO3 + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) }, // Item + // input + // (Array, + // up + // to + // 2) + FluidUtils.getFluidStack("water", 10000), // Fluid input + // (slot 1) + null, // Fluid output (slot 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 20) }, // Output + // Array + // of + // Items + // - + // Upto + // 9, + new int[] { 0 }, 120 * 20, // Time in ticks + 120); // EU + + } + catch (final NullPointerException e) { + Logger.INFO("[dustCalciumHydroxide] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + + // 2 LiOH + CaCO3 try { CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 5) - }, //Item input (Array, up to 2) - null, //Fluid input (slot 1) - null, //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 2), - ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 3) - }, //Output Array of Items - Upto 9, - new int[]{0}, - 120*20, //Time in ticks - 1000); //EU - - }catch (final NullPointerException e){Logger.INFO("[dustLi2CO3CaOH2] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} - - //LiOH Liquid to Dust + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 5) }, // Item + // input + // (Array, + // up + // to + // 2) + null, // Fluid input (slot 1) + null, // Fluid output (slot 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 2), + ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 3) }, // Output + // Array + // of + // Items + // - + // Upto + // 9, + new int[] { 0 }, 120 * 20, // Time in ticks + 1000); // EU + + } + catch (final NullPointerException e) { + Logger.INFO("[dustLi2CO3CaOH2] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + + // LiOH Liquid to Dust try { - CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getGregtechCircuit(0) - }, //Item input (Array, up to 2) - FluidUtils.getFluidStack("lithiumhydroxide", 144), //Fluid input (slot 1) - null, //Fluid output (slot 2) - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 1) - }, //Output Array of Items - Upto 9, - new int[]{0}, - 1*20, //Time in ticks - 64); //EU - - }catch (final NullPointerException e){Logger.INFO("[dustLithiumHydroxide] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} - - //Zirconium Chloride -> TetraFluoride + CORE.RA.addDehydratorRecipe(new ItemStack[] { ItemUtils.getGregtechCircuit(0) }, // Item + // input + // (Array, + // up + // to + // 2) + FluidUtils.getFluidStack("lithiumhydroxide", 144), // Fluid + // input + // (slot + // 1) + null, // Fluid output (slot 2) + new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 1) }, // Output + // Array + // of + // Items + // - + // Upto + // 9, + new int[] { 0 }, 1 * 20, // Time in ticks + 64); // EU + + } + catch (final NullPointerException e) { + Logger.INFO("[dustLithiumHydroxide] FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE"); + } + + // Zirconium Chloride -> TetraFluoride try { CORE.RA.addDehydratorRecipe( - new ItemStack[]{ - ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9), - It