diff options
Diffstat (limited to 'src/Java/gtPlusPlus/core/material')
-rw-r--r-- | src/Java/gtPlusPlus/core/material/ALLOY.java | 59 | ||||
-rw-r--r-- | src/Java/gtPlusPlus/core/material/Material.java | 38 |
2 files changed, 60 insertions, 37 deletions
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java index 0aa819ee48..ea5b90259f 100644 --- a/src/Java/gtPlusPlus/core/material/ALLOY.java +++ b/src/Java/gtPlusPlus/core/material/ALLOY.java @@ -35,7 +35,8 @@ public final class ALLOY { true, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.URANIUM, 90), + new MaterialStack(ELEMENT.URANIUM, 45), + new MaterialStack(ELEMENT.URANIUM, 45), new MaterialStack(ELEMENT.TITANIUM, 10) }); @@ -49,9 +50,9 @@ public final class ALLOY { true, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.TUNGSTEN, 7), - new MaterialStack(ELEMENT.TANTALUM, 90), - new MaterialStack(ELEMENT.TANTALUM, 2) + new MaterialStack(ELEMENT.TUNGSTEN, 8), + new MaterialStack(ELEMENT.TANTALUM, 46), + new MaterialStack(ELEMENT.TANTALUM, 46) }); public static final Material TANTALLOY_61 = new Material( @@ -64,10 +65,10 @@ public final class ALLOY { true, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.TUNGSTEN, 10), - new MaterialStack(ELEMENT.TANTALUM, 70), - new MaterialStack(ELEMENT.TITANIUM, 10), - new MaterialStack(ELEMENT.YTTRIUM, 10) + new MaterialStack(ELEMENT.TUNGSTEN, 20), + new MaterialStack(ELEMENT.TANTALUM, 60), + new MaterialStack(ELEMENT.TITANIUM, 12), + new MaterialStack(ELEMENT.YTTRIUM, 8) }); public static final Material QUANTUM = new Material( @@ -91,7 +92,8 @@ public final class ALLOY { false, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.COPPER, 75), + new MaterialStack(ELEMENT.COPPER, 35), + new MaterialStack(ELEMENT.COPPER, 40), new MaterialStack(ELEMENT.TIN, 25) }); @@ -105,7 +107,8 @@ public final class ALLOY { false, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.GOLD, 70), + new MaterialStack(ELEMENT.GOLD, 30), + new MaterialStack(ELEMENT.GOLD, 40), new MaterialStack(ELEMENT.COPPER, 30) }); @@ -193,8 +196,10 @@ public final class ALLOY { true, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.CARBON, 05), - new MaterialStack(ELEMENT.IRON, 95) + new MaterialStack(ELEMENT.CARBON, 10), + new MaterialStack(ELEMENT.IRON, 30), + new MaterialStack(ELEMENT.IRON, 30), + new MaterialStack(ELEMENT.IRON, 30) }); public static final Material ZERON_100 = new Material( @@ -224,9 +229,9 @@ public final class ALLOY { //Material Stacks with Percentage of required elements. new MaterialStack[]{ new MaterialStack(ELEMENT.TITANIUM, 5), - new MaterialStack(ELEMENT.NICKEL, 16), - new MaterialStack(ELEMENT.COBALT, 9), - new MaterialStack(ALLOY.STEEL, 70) + new MaterialStack(ELEMENT.NICKEL, 25), + new MaterialStack(ELEMENT.COBALT, 10), + new MaterialStack(ALLOY.STEEL, 60) }); public static final Material MARAGING300 = new Material( @@ -240,8 +245,8 @@ public final class ALLOY { //Material Stacks with Percentage of required elements. new MaterialStack[]{ new MaterialStack(ELEMENT.TITANIUM, 10), - new MaterialStack(ELEMENT.NICKEL, 21), - new MaterialStack(ELEMENT.COBALT, 14), + new MaterialStack(ELEMENT.NICKEL, 20), + new MaterialStack(ELEMENT.COBALT, 15), new MaterialStack(ALLOY.STEEL, 55) }); @@ -256,8 +261,8 @@ public final class ALLOY { //Material Stacks with Percentage of required elements. new MaterialStack[]{ new MaterialStack(ELEMENT.TITANIUM, 15), - new MaterialStack(ELEMENT.NICKEL, 21), - new MaterialStack(ELEMENT.COBALT, 9), + new MaterialStack(ELEMENT.NICKEL, 20), + new MaterialStack(ELEMENT.COBALT, 10), new MaterialStack(ALLOY.STEEL, 55) }); @@ -305,8 +310,8 @@ public final class ALLOY { new MaterialStack[]{ new MaterialStack(ELEMENT.IRON, 06), new MaterialStack(ELEMENT.MOLYBDENUM, 24), - new MaterialStack(ELEMENT.CHROMIUM, 5), - new MaterialStack(ELEMENT.NICKEL, 65) + new MaterialStack(ELEMENT.CHROMIUM, 8), + new MaterialStack(ELEMENT.NICKEL, 62) }); /*public static final Material HASTELLOY_X = new Material( @@ -351,10 +356,10 @@ public final class ALLOY { true, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.YTTRIUM, 05), + new MaterialStack(ELEMENT.YTTRIUM, 10), new MaterialStack(ELEMENT.MOLYBDENUM, 16), - new MaterialStack(ELEMENT.CHROMIUM, 7), - new MaterialStack(ELEMENT.NICKEL, 72) + new MaterialStack(ELEMENT.CHROMIUM, 10), + new MaterialStack(ELEMENT.NICKEL, 64) }); public static final Material HASTELLOY_C276 = new Material( @@ -415,10 +420,10 @@ public final class ALLOY { true, //Uses Blast furnace? //Material Stacks with Percentage of required elements. new MaterialStack[]{ - new MaterialStack(ELEMENT.IRON, 75), - new MaterialStack(ELEMENT.ALUMINIUM, 4), + new MaterialStack(ELEMENT.IRON, 64), + new MaterialStack(ELEMENT.ALUMINIUM, 12), new MaterialStack(ELEMENT.CHROMIUM, 20), - new MaterialStack(ELEMENT.YTTRIUM, 1) + new MaterialStack(ELEMENT.YTTRIUM, 4) }); public static final Material TUNGSTEN_CARBIDE = new Material( diff --git a/src/Java/gtPlusPlus/core/material/Material.java b/src/Java/gtPlusPlus/core/material/Material.java index 44a8c021f9..3190486537 100644 --- a/src/Java/gtPlusPlus/core/material/Material.java +++ b/src/Java/gtPlusPlus/core/material/Material.java @@ -6,10 +6,6 @@ import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.item.UtilsItems; import gtPlusPlus.core.util.materials.MaterialUtils; import gtPlusPlus.core.util.math.MathUtils; - -import java.util.ArrayList; -import java.util.List; - import net.minecraft.item.ItemStack; public class Material { @@ -20,7 +16,7 @@ public class Material { protected Object dataVar; private MaterialStack[] materialInput = new MaterialStack[4]; - final List<MaterialStack> mMaterialList = new ArrayList<MaterialStack>(); + public final long[] vSmallestRatio; final short[] RGBA; @@ -35,7 +31,7 @@ public class Material { final long vProtons; final long vNeutrons; final long vMass; - final int smallestStackSizeWhenProcessing; //Add a check for <=0 || > 64 + public final int smallestStackSizeWhenProcessing; //Add a check for <=0 || > 64 public final int vTier; public final int vVoltageMultiplier; public final String vChemicalFormula; @@ -65,14 +61,14 @@ public class Material { this.vNeutrons = neutrons; this.vMass = getMass(); - //List<MaterialStack> inputArray = Arrays.asList(inputs); + /*//List<MaterialStack> inputArray = Arrays.asList(inputs); int tempSmallestSize = getSmallestStackForCrafting(inputs); if (tempSmallestSize <= 64 && tempSmallestSize >= 1){ this.smallestStackSizeWhenProcessing = tempSmallestSize; //Valid stacksizes } else { this.smallestStackSizeWhenProcessing = 50; //Can divide my math by 1/2 and round it~ - } + }*/ //Sets the Rad level if (radiationLevel != 0){ @@ -134,6 +130,28 @@ public class Material { } } } + + this.vSmallestRatio = getSmallestRatio(materialInput); + int tempSmallestSize = 0; + + if (vSmallestRatio != null){ + for (int v=0;v<this.vSmallestRatio.length;v++){ + tempSmallestSize=(int) (tempSmallestSize+vSmallestRatio[v]); + } + this.smallestStackSizeWhenProcessing = tempSmallestSize; //Valid stacksizes + } + else { + this.smallestStackSizeWhenProcessing = 1; //Valid stacksizes + } + + + + /*if (tempSmallestSize <= 64 && tempSmallestSize >= 1){ + this.smallestStackSizeWhenProcessing = tempSmallestSize; //Valid stacksizes + } + else { + this.smallestStackSizeWhenProcessing = 50; //Can divide my math by 1/2 and round it~ + }*/ //Makes a Fancy Chemical Tooltip this.vChemicalSymbol = chemicalSymbol; @@ -152,7 +170,7 @@ public class Material { dataVar = MathUtils.generateSingularRandomHexValue(); Utils.LOG_INFO("Creating a Material instance for "+materialName); - Utils.LOG_INFO("Formula: "+vChemicalFormula); + Utils.LOG_INFO("Formula: "+vChemicalFormula + " Smallest Stack: "+smallestStackSizeWhenProcessing+" Smallest Ratio:"+vSmallestRatio); Utils.LOG_INFO("Protons: "+vProtons); Utils.LOG_INFO("Neutrons: "+vNeutrons); Utils.LOG_INFO("Mass: "+vMass+"/units"); @@ -405,7 +423,7 @@ public class Material { return null; } - public int getSmallestStackForCrafting(MaterialStack[] inputs){ + private int getSmallestStackForCrafting(MaterialStack[] inputs){ if (inputs != null){ if (inputs.length != 0){ long[] smallestRatio = getSmallestRatio(inputs); |