From 43f3190bd5204a0025c75ee7cabfd0871061211f Mon Sep 17 00:00:00 2001 From: Alkalus Date: Mon, 10 Jul 2017 13:04:13 +1000 Subject: + Added Coal gas. + Added GT++ Coal Coke. + Added a new handler for burnable items. % Changed up the 4 Coke Oven Recipes. - Removed lots of spam log messages during material creation. --- src/Java/gtPlusPlus/GTplusplus.java | 8 +++ src/Java/gtPlusPlus/core/item/ModItems.java | 5 +- .../core/item/base/BaseItemBurnable.java | 38 +++++++++++++ src/Java/gtPlusPlus/core/item/base/CoreItem.java | 2 +- .../gtPlusPlus/core/item/chemistry/CoalTar.java | 6 ++ src/Java/gtPlusPlus/core/lib/CORE.java | 3 + src/Java/gtPlusPlus/core/material/Material.java | 64 +++++++++++----------- .../gtPlusPlus/core/recipe/RECIPES_GREGTECH.java | 26 ++++----- 8 files changed, 105 insertions(+), 47 deletions(-) create mode 100644 src/Java/gtPlusPlus/core/item/base/BaseItemBurnable.java (limited to 'src/Java/gtPlusPlus') diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java index afed638161..4dc63ff529 100644 --- a/src/Java/gtPlusPlus/GTplusplus.java +++ b/src/Java/gtPlusPlus/GTplusplus.java @@ -11,6 +11,7 @@ import java.util.Collection; import cpw.mods.fml.common.*; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.*; +import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.util.GT_Recipe; @@ -210,6 +211,13 @@ public class GTplusplus implements ActionListener { // ~ ReflectionUtils.becauseIWorkHard(); + + //Make Burnables burnable + if (!CORE.burnables.isEmpty()){ + for (int x=0;x burnables = new ArrayList(); public static final boolean MAIN_GREGTECH_5U_EXPERIMENTAL_FORK = Meta_GT_Proxy.areWeUsingGregtech5uExperimental(); public static final int GREGTECH_API_VERSION = GregTech_API.VERSION; public static IGregtech_RecipeAdder RA; diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 5f83d1a732..5a38e5cf08 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -227,11 +227,11 @@ public class Material { this.vChemicalFormula = this.getToolTip(chemicalSymbol, OrePrefixes.dust.mMaterialAmount / M, true); } else if (!this.vChemicalSymbol.equals("")){ - Utils.LOG_WARNING("materialInput is null, using a valid chemical symbol."); + Utils.LOG_MACHINE_INFO("materialInput is null, using a valid chemical symbol."); this.vChemicalFormula = this.vChemicalSymbol; } else{ - Utils.LOG_WARNING("MaterialInput == null && chemicalSymbol probably equals nothing"); + Utils.LOG_MACHINE_INFO("MaterialInput == null && chemicalSymbol probably equals nothing"); this.vChemicalFormula = "??"; } @@ -267,13 +267,13 @@ public class Material { } } - Utils.LOG_INFO("Creating a Material instance for "+materialName); - Utils.LOG_INFO("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); - Utils.LOG_INFO("Protons: "+this.vProtons); - Utils.LOG_INFO("Neutrons: "+this.vNeutrons); - Utils.LOG_INFO("Mass: "+this.vMass+"/units"); - Utils.LOG_INFO("Melting Point: "+this.meltingPointC+"C."); - Utils.LOG_INFO("Boiling Point: "+this.boilingPointC+"C."); + Utils.LOG_MACHINE_INFO("Creating a Material instance for "+materialName); + Utils.LOG_MACHINE_INFO("Formula: "+this.vChemicalFormula + " Smallest Stack: "+this.smallestStackSizeWhenProcessing+" Smallest Ratio:"+ratio); + Utils.LOG_MACHINE_INFO("Protons: "+this.vProtons); + Utils.LOG_MACHINE_INFO("Neutrons: "+this.vNeutrons); + Utils.LOG_MACHINE_INFO("Mass: "+this.vMass+"/units"); + Utils.LOG_MACHINE_INFO("Melting Point: "+this.meltingPointC+"C."); + Utils.LOG_MACHINE_INFO("Boiling Point: "+this.boilingPointC+"C."); } public final String getLocalizedName(){ @@ -427,21 +427,21 @@ public class Material { if (!this.vMaterialInput.isEmpty()){ final ItemStack[] temp = new ItemStack[this.vMaterialInput.size()]; for (int i=0;i tempInput){ if (tempInput != null){ if (!tempInput.isEmpty()){ - Utils.LOG_WARNING("length: "+tempInput.size()); - Utils.LOG_WARNING("(inputs != null): "+(tempInput != null)); - //Utils.LOG_WARNING("length: "+inputs.length); + Utils.LOG_MACHINE_INFO("length: "+tempInput.size()); + Utils.LOG_MACHINE_INFO("(inputs != null): "+(tempInput != null)); + //Utils.LOG_MACHINE_INFO("length: "+inputs.length); final long[] tempRatio = new long[tempInput.size()]; for (int x=0;x0 ? this.vMaterialInput.size() : 1); - Utils.LOG_INFO("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); + Utils.LOG_MACHINE_INFO("Dividing "+meltingPoint+" / "+divisor+" to get average melting point."); meltingPoint = (meltingPoint/divisor); return meltingPoint; } diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java index eb79614fbb..b0e4f3ac54 100644 --- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java +++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java @@ -53,11 +53,11 @@ public class RECIPES_GREGTECH { //GT Logs to Charcoal Recipe //With Sulfuric Acid CORE.RA.addCokeOvenRecipe( - GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), //Input 1 - GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), //Input 2 + GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 5L), //Input 1 + ItemUtils.getGregtechCircuit(5), //Input 2 Materials.SulfuricAcid.getFluid(20L), //Fluid Input Materials.Creosote.getFluid(175L), //Fluid Output - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 2L), //Item Output + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 8L), //Item Output 800, //Time in ticks 30); //EU }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} @@ -66,8 +66,8 @@ public class RECIPES_GREGTECH { //Coal -> Coke Recipe //With Sulfuric Acid CORE.RA.addCokeOvenRecipe( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1L), //Input 1 - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1L), //Input 2 + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 2L), //Input 1 + ItemUtils.getGregtechCircuit(5), //Input 2 Materials.SulfuricAcid.getFluid(60L), //Fluid Input Materials.Creosote.getFluid(250L), //Fluid Output ItemUtils.getItemStack("Railcraft:fuel.coke", 2), //Item Output @@ -79,8 +79,8 @@ public class RECIPES_GREGTECH { //GT Logs to Charcoal Recipe //Without Sulfuric Acid CORE.RA.addCokeOvenRecipe( - GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), //Input 1 - GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 1L), //Input 2 + GT_OreDictUnificator.get(OrePrefixes.log, Materials.Wood, 2L), //Input 1 + ItemUtils.getGregtechCircuit(5), //Input 2 FluidUtils.getFluidStack("oxygen", 80), //Fluid Input Materials.Creosote.getFluid(145L), //Fluid Output GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Charcoal, 2L), //Item Output @@ -90,13 +90,13 @@ public class RECIPES_GREGTECH { try { //Coal -> Coke Recipe - //Without Sulfuric Acid + //Make Coal Gas CORE.RA.addCokeOvenRecipe( - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1L), //Input 1 - GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 1L), //Input 2 - FluidUtils.getFluidStack("oxygen", 185), //Fluid Input - Materials.Creosote.getFluid(200L), //Fluid Output - ItemUtils.getItemStack("Railcraft:fuel.coke", 2), //Item Output + GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Coal, 10L), //Input 1 + ItemUtils.getGregtechCircuit(1), //Input 2 + FluidUtils.getFluidStack("steam", 1440), //Fluid Input + FluidUtils.getFluidStack("fluid.coalgas", 1440), //Fluid Output + ItemUtils.getItemStackOfAmountFromOreDict("gemCoalCoke", 10), //Item Output 900, //Time in ticks 120); //EU }catch (final NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");} -- cgit