aboutsummaryrefslogtreecommitdiff
path: root/src/Java
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java')
-rw-r--r--src/Java/miscutil/core/handler/COMPAT_HANDLER.java2
-rw-r--r--src/Java/miscutil/core/handler/registration/gregtech/GregtechIndustrialMassFabricator.java27
-rw-r--r--src/Java/miscutil/core/lib/LoadedMods.java2
-rw-r--r--src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java23
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java6
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java12
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/api/util/GregtechRecipe.java128
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/common/GregtechRecipeAdder.java119
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java23
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialWireMill.java378
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityMassFabricator.java238
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/recipes/GregtechRecipeAdder.java136
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/recipes/machines/RECIPEHANDLER_CokeOven.java46
-rw-r--r--src/Java/miscutil/core/xmod/gregtech/recipes/machines/RECIPEHANDLER_MatterFabricator.java45
14 files changed, 842 insertions, 343 deletions
diff --git a/src/Java/miscutil/core/handler/COMPAT_HANDLER.java b/src/Java/miscutil/core/handler/COMPAT_HANDLER.java
index 11167f5371..5ca2ea5c4a 100644
--- a/src/Java/miscutil/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/miscutil/core/handler/COMPAT_HANDLER.java
@@ -25,6 +25,7 @@ import miscutil.core.handler.registration.gregtech.GregtechIndustrialCentrifuge;
import miscutil.core.handler.registration.gregtech.GregtechIndustrialCokeOven;
import miscutil.core.handler.registration.gregtech.GregtechIndustrialElectrolyzer;
import miscutil.core.handler.registration.gregtech.GregtechIndustrialMacerator;
+import miscutil.core.handler.registration.gregtech.GregtechIndustrialMassFabricator;
import miscutil.core.handler.registration.gregtech.GregtechIndustrialPlatePress;
import miscutil.core.handler.registration.gregtech.GregtechIndustrialWiremill;
import miscutil.core.handler.registration.gregtech.GregtechIronBlastFurnace;
@@ -93,6 +94,7 @@ public class COMPAT_HANDLER {
GregtechIndustrialElectrolyzer.run();
GregtechIndustrialMacerator.run();
GregtechIndustrialWiremill.run();
+ GregtechIndustrialMassFabricator.run();
}
}
diff --git a/src/Java/miscutil/core/handler/registration/gregtech/GregtechIndustrialMassFabricator.java b/src/Java/miscutil/core/handler/registration/gregtech/GregtechIndustrialMassFabricator.java
new file mode 100644
index 0000000000..4d36de7df4
--- /dev/null
+++ b/src/Java/miscutil/core/handler/registration/gregtech/GregtechIndustrialMassFabricator.java
@@ -0,0 +1,27 @@
+package miscutil.core.handler.registration.gregtech;
+
+import miscutil.core.util.Utils;
+import miscutil.core.xmod.gregtech.api.enums.GregtechItemList;
+import miscutil.core.xmod.gregtech.common.tileentities.machines.multi.GregtechMetaTileEntityMassFabricator;
+
+public class GregtechIndustrialMassFabricator
+{
+
+
+
+ public static void run()
+ {
+ if (miscutil.core.lib.LoadedMods.Gregtech){
+ Utils.LOG_INFO("MiscUtils: Gregtech5u Content | Registering Industrial Mass Fabricator Multiblock.");
+ run1();
+ }
+
+ }
+
+ private static void run1()
+ {
+ //Industrial Electrolyzer Multiblock
+ GregtechItemList.Industrial_MassFab.set(new GregtechMetaTileEntityMassFabricator(799, "industrialmassfab.controller.tier.single", "Matter Fabrication Controller").getStackForm(1L));
+
+ }
+} \ No newline at end of file
diff --git a/src/Java/miscutil/core/lib/LoadedMods.java b/src/Java/miscutil/core/lib/LoadedMods.java
index 352fffa3df..b1b95a6af3 100644
--- a/src/Java/miscutil/core/lib/LoadedMods.java
+++ b/src/Java/miscutil/core/lib/LoadedMods.java
@@ -1,7 +1,7 @@
package miscutil.core.lib;
import miscutil.core.util.Utils;
-import miscutil.core.xmod.gregtech.common.GregtechRecipeAdder;
+import miscutil.core.xmod.gregtech.recipes.GregtechRecipeAdder;
import cpw.mods.fml.common.Loader;
public class LoadedMods {
diff --git a/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java b/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java
index 040c4e8377..1845e1304c 100644
--- a/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/miscutil/core/recipe/RECIPES_GREGTECH.java
@@ -19,6 +19,7 @@ public class RECIPES_GREGTECH {
private static void execute(){
cokeOvenRecipes();
+ matterFabRecipes();
assemblerRecipes();
distilleryRecipes();
addFuels();
@@ -80,6 +81,28 @@ public class RECIPES_GREGTECH {
120); //EU
}catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
}
+
+ private static void matterFabRecipes(){
+ Utils.LOG_INFO("Loading Recipes for Matter Fabricator.");
+
+ try {
+
+ CORE.RA.addMattrFabricatorRecipe(
+ Materials.UUAmplifier.getFluid(1L), //Fluid Input
+ Materials.UUMatter.getFluid(1L), //Fluid Output
+ 800, //Time in ticks
+ 32); //EU
+ }catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+ try {
+
+ CORE.RA.addMattrFabricatorRecipe(
+ null, //Fluid Input
+ Materials.UUMatter.getFluid(1L), //Fluid Output
+ 3200, //Time in ticks
+ 32); //EU
+ }catch (NullPointerException e){Utils.LOG_INFO("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");}
+
+ }
private static void assemblerRecipes(){
//GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Titanium, 6L), ItemList.Casing_Turbine.get(1L, new Object[0]), ItemList.Casing_Turbine2.get(1L, new Object[0]), 50, 16);
diff --git a/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java
index a358ff8bba..060ef75a54 100644
--- a/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/miscutil/core/xmod/gregtech/api/enums/GregtechItemList.java
@@ -68,7 +68,7 @@ public enum GregtechItemList implements GregtechItemContainer {
Circuit_Parts_Wiring_IV, Circuit_Parts_Wiring_LuV, Circuit_Parts_Wiring_ZPM,
//Unused Machine Casings
- Casing_U4, Casing_U5, Casing_U6, Casing_U7,
+ Casing_U4, Casing_MatterGen, Casing_MatterFab, Casing_U7,
//Unused Machine Coils
Casing_Coil_U1, Casing_Coil_U2, Casing_Coil_U3, Casing_Coil_U4,
@@ -85,7 +85,9 @@ public enum GregtechItemList implements GregtechItemContainer {
Casing_Macerator, Industrial_MacerationStack,
//Industrial Wire Factory
- Industrial_WireFactory;
+ Industrial_WireFactory,
+
+ Industrial_MassFab;
public static final GregtechItemList[]
DYE_ONLY_ITEMS = {
diff --git a/src/Java/miscutil/core/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/miscutil/core/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 3668dd51db..6ee921f4bf 100644
--- a/src/Java/miscutil/core/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/miscutil/core/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -21,4 +21,16 @@ public interface IGregtech_RecipeAdder {
public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType);
+
+ /**
+ * Adds a Matter Fabricator Recipe
+ *
+ * @param aFluidOutput = Output of the UU-Matter (not null, and respects StackSize)
+ * @param aFluidInput = fluid Input (can be UU_Amp or null, and respects StackSize)
+ * @param aDuration = Duration (must be >= 0)
+ * @param aEUt = EU needed for heating up (must be >= 0)
+ * @return true if the Recipe got added, otherwise false.
+ */
+ public boolean addMattrFabricatorRecipe(FluidStack aFluidInput, FluidStack aFluidOutput, int aDuration, int aEUt);
+
}
diff --git a/src/Java/miscutil/core/xmod/gregtech/api/util/GregtechRecipe.java b/src/Java/miscutil/core/xmod/gregtech/api/util/GregtechRecipe.java
index 6d73a94364..7c75489cef 100644
--- a/src/Java/miscutil/core/xmod/gregtech/api/util/GregtechRecipe.java
+++ b/src/Java/miscutil/core/xmod/gregtech/api/util/GregtechRecipe.java
@@ -4,6 +4,7 @@ import static gregtech.api.enums.GT_Values.E;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import static gregtech.api.enums.GT_Values.W;
import gregtech.api.GregTech_API;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.objects.GT_FluidStack;
import gregtech.api.objects.GT_ItemStack;
@@ -165,9 +166,9 @@ public class GregtechRecipe {
}
public GregtechRecipe(ItemStack aInput1, ItemStack aOutput1, int aFuelValue, int aType) {
- this(aInput1, aOutput1, null, null, null, aFuelValue, aType);
- }
-
+ this(aInput1, aOutput1, null, null, null, aFuelValue, aType);
+ }
+
// aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000!
public GregtechRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aSpecialValue, int aType) {
this(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue));
@@ -208,6 +209,31 @@ public class GregtechRecipe {
GT_Log.out.println("GT_Mod: Re-Unificating Recipes.");
for (Gregtech_Recipe_Map tMapEntry : Gregtech_Recipe_Map.sMappings) tMapEntry.reInit();
}
+
+ public ItemStack getRepresentativeInput(int aIndex) {
+ if (aIndex < 0 || aIndex >= mInputs.length) return null;
+ return GT_Utility.copy(mInputs[aIndex]);
+ }
+
+ public ItemStack getOutput(int aIndex) {
+ if (aIndex < 0 || aIndex >= mOutputs.length) return null;
+ return GT_Utility.copy(mOutputs[aIndex]);
+ }
+
+ public int getOutputChance(int aIndex) {
+ if (aIndex < 0 || aIndex >= mChances.length) return 10000;
+ return mChances[aIndex];
+ }
+
+ public FluidStack getRepresentativeFluidInput(int aIndex) {
+ if (aIndex < 0 || aIndex >= mFluidInputs.length || mFluidInputs[aIndex] == null) return null;
+ return mFluidInputs[aIndex].copy();
+ }
+
+ public FluidStack getFluidOutput(int aIndex) {
+ if (aIndex < 0 || aIndex >= mFluidOutputs.length || mFluidOutputs[aIndex] == null) return null;
+ return mFluidOutputs[aIndex].copy();
+ }
public GregtechRecipe copy() {
return new GregtechRecipe(this);
@@ -277,6 +303,8 @@ public class GregtechRecipe {
public static final Collection<Gregtech_Recipe_Map> sMappings = new ArrayList<Gregtech_Recipe_Map>();
//public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.chemicalbath", "Chemical Bath", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true);
public static final GT_Recipe_Map sCokeOvenRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.cokeoven", "Coke Oven", null, RES_PATH_GUI + "basicmachines/ChemicalBath", 1, 3, 1, 1, 1, E, 1, E, true, true);
+ public static final GT_Recipe_Map sMatterFab2Recipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.matterfab2", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Default", 1, 3, 1, 1, 1, E, 1, E, true, true);
+ //public static final Gregtech_Recipe_Map sMatterFabRecipes = new Gregtech_Recipe_Map(new HashSet<GregtechRecipe>(200), "gt.recipe.matterfab", "Matter Fabricator", null, RES_PATH_GUI + "basicmachines/Massfabricator", 1, 3, 1, 1, 1, E, 1, E, true, true);
public static final Gregtech_Recipe_Map_Fuel sRocketFuels = new Gregtech_Recipe_Map_Fuel(new HashSet<GregtechRecipe>(10), "gt.recipe.rocketenginefuel", "Rocket Engine Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 3000, " EU", true, true);
@@ -322,28 +350,8 @@ public class GregtechRecipe {
* @param aNEISpecialValuePost the String after the Special Value. Usually for a Unit or something.
* @param aNEIAllowed if NEI is allowed to display this Recipe Handler in general.
*/
- public Gregtech_Recipe_Map(Collection<GregtechRecipe> aRecipeList, String aUnlocalizedName, String aLocalName, String aNEIName, String aNEIGUIPath, int aUsualInputCount, int aUsualOutputCount, int aMinimalInputItems, int aMinimalInputFluids, int aAmperage, String aNEISpecialValuePre, int aNEISpecialValueMultiplier, String aNEISpecialValuePost, boolean aShowVoltageAmperageInNEI, boolean aNEIAllowed) {
- sMappings.add(this);
- mNEIAllowed = aNEIAllowed;
- mShowVoltageAmperageInNEI = aShowVoltageAmperageInNEI;
- mRecipeList = aRecipeList;
- mNEIName = aNEIName == null ? aUnlocalizedName : aNEIName;
- mNEIGUIPath = aNEIGUIPath.endsWith(".png") ? aNEIGUIPath : aNEIGUIPath + ".png";
- mNEISpecialValuePre = aNEISpecialValuePre;
- mNEISpecialValueMultiplier = aNEISpecialValueMultiplier;
- mNEISpecialValuePost = aNEISpecialValuePost;
- mAmperage = aAmperage;
- mUsualInputCount = aUsualInputCount;
- mUsualOutputCount = aUsualOutputCount;
- mMinimalInputItems = aMinimalInputItems;
- mMinimalInputFluids = aMinimalInputFluids;
- GregTech_API.sFluidMappings.add(mRecipeFluidMap);
- GregTech_API.sItemStackMappings.add(mRecipeItemMap);
- GT_LanguageManager.addStringLocalization(mUnlocalizedName = aUnlocalizedName, aLocalName);
- }
-
- public Gregtech_Recipe_Map(HashSet<GregtechRecipe> hashSet,
- String aUnlocalizedName, String aLocalName, Object aNEIName,
+ public Gregtech_Recipe_Map(Collection<GregtechRecipe> aRecipeList,
+ String aUnlocalizedName, String aLocalName, String aNEIName,
String aNEIGUIPath, int aUsualInputCount,
int aUsualOutputCount, int aMinimalInputItems,
int aMinimalInputFluids, int aAmperage,
@@ -353,8 +361,8 @@ public class GregtechRecipe {
sMappings.add(this);
mNEIAllowed = aNEIAllowed;
mShowVoltageAmperageInNEI = aShowVoltageAmperageInNEI;
- mRecipeList = hashSet;
- mNEIName = (String) (aNEIName == null ? aUnlocalizedName : aNEIName);
+ mRecipeList = aRecipeList;
+ mNEIName = aNEIName == null ? aUnlocalizedName : aNEIName;
mNEIGUIPath = aNEIGUIPath.endsWith(".png") ? aNEIGUIPath : aNEIGUIPath + ".png";
mNEISpecialValuePre = aNEISpecialValuePre;
mNEISpecialValueMultiplier = aNEISpecialValueMultiplier;
@@ -381,6 +389,10 @@ public class GregtechRecipe {
return addRecipe(new GregtechRecipe(aOptimize, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
}
+ public GregtechRecipe addRecipe(boolean aOptimize, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {
+ return addRecipe(new GregtechRecipe(aOptimize, null, null, null, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue));
+ }
+
/*public GregtechRecipe addRecipe(boolean aOptimize, FluidStack aInput1, FluidStack aOutput1, ItemStack[] bInput1, ItemStack[] bOutput1, int aDuration, int aEUt, int aSpecialValue) {
return addRecipe(new GregtechRecipe(aOptimize, aInput1, aOutput1, bInput1,bOutput1, aDuration, aEUt, aSpecialValue));
@@ -561,12 +573,72 @@ public class GregtechRecipe {
if (tList == null){
Utils.LOG_INFO("Method 4 - brrr list was NUll");
mRecipeItemMap.put(tStack, tList = new HashSet<GregtechRecipe>(1));
- }
+ }
tList.add(aRecipe);
Utils.LOG_INFO("Method 4 - Added recipe to map? I think.");
}
return aRecipe;
}
+
+ public GregtechRecipe findRecipe(IGregTechTileEntity baseMetaTileEntity, GregtechRecipe aRecipe, boolean aNotUnificated,
+ long aVoltage, FluidStack[] aFluids, FluidStack[] fluidStacks) {
+
+ ItemStack aInputs[] = null;
+ // No Recipes? Well, nothing to be found then.
+ if (mRecipeList.isEmpty()) return null;
+
+ // Some Recipe Classes require a certain amount of Inputs of certain kinds. Like "at least 1 Fluid + 1 Stack" or "at least 2 Stacks" before they start searching for Recipes.
+ // This improves Performance massively, especially if people leave things like Circuits, Molds or Shapes in their Machines to select Sub Recipes.
+ if (GregTech_API.sPostloadFinished) {
+ if (mMinimalInputFluids > 0) {
+ if (aFluids == null) return null;
+ int tAmount = 0;
+ for (FluidStack aFluid : aFluids) if (aFluid != null) tAmount++;
+ if (tAmount < mMinimalInputFluids) return null;
+ }
+ if (mMinimalInputItems > 0) {
+ if (aInputs == null) return null;
+ int tAmount = 0;
+ for (ItemStack aInput : aInputs) if (aInput != null) tAmount++;
+ if (tAmount < mMinimalInputItems) return null;
+ }
+ }
+
+ // Unification happens here in case the Input isn't already unificated.
+ if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(true, (Object[]) aInputs);
+
+ // Check the Recipe which has been used last time in order to not have to search for it again, if possible.
+ if (aRecipe != null)
+ if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
+ return aRecipe.mEnabled && aVoltage * mAmperage >= aRecipe.mEUt ? aRecipe : null;
+
+ // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items.
+ if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs)
+ if (tStack != null) {
+ Collection<GregtechRecipe>
+ tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack));
+ if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack)));
+ if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ }
+
+ // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too.
+ if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids)
+ if (aFluid != null) {
+ Collection<GregtechRecipe>
+ tRecipes = mRecipeFluidMap.get(aFluid.getFluid());
+ if (tRecipes != null) for (GregtechRecipe tRecipe : tRecipes)
+ if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs))
+ return tRecipe.mEnabled && aVoltage * mAmperage >= tRecipe.mEUt ? tRecipe : null;
+ }
+
+ // And nothing has been found.
+ return null;
+ }
}
// -----------------------------------------------------------------------------------------------------------------
diff --git a/src/Java/miscutil/core/xmod/gregtech/common/GregtechRecipeAdder.java b/src/Java/miscutil/core/xmod/gregtech/common/GregtechRecipeAdder.java
deleted file mode 100644
index 076915b633..0000000000
--- a/src/Java/miscutil/core/xmod/gregtech/common/GregtechRecipeAdder.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package miscutil.core.xmod.gregtech.common;
-
-import gregtech.api.GregTech_API;
-import miscutil.core.util.Utils;
-import miscutil.core.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
-import miscutil.core.xmod.gregtech.api.util.GregtechRecipe;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.FluidStack;
-
-public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
-
- @SuppressWarnings("static-method")
- private void debug1(){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Walking Through CokeOven Recipe Creation.");
- Utils.LOG_WARNING("My name is Ralph and I will be your humble host.");
- }
- @SuppressWarnings("static-method")
- private void debug2(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("aInput1 == null && aFluidInput == null || aOutput == null && aFluidOutput == null");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
- }
- @SuppressWarnings("static-method")
- private void debug3(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aOutput, aDuration)) <= 0)");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
- }
- @SuppressWarnings("static-method")
- private void debug4(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("Taking a step forward.");
- Utils.LOG_WARNING("(aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get(cokeoven, aFluidOutput.getFluid().getName(), aDuration)) <= 0)");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Passed.");
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
-
- }
- @SuppressWarnings("static-method")
- private void debug5(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt){
- Utils.LOG_INFO("Successfully added a Coke Oven recipe for: "+aOutput.getDisplayName()+" & "+aFluidOutput.getFluid().getName()+", Using "+aInput1.getDisplayName()+" & "+aInput2.getDisplayName()+" & liquid "+aFluidInput.getFluid().getName()+". This takes "+(aDuration/20)+" seconds for "+aEUt+"eu/t.");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- Utils.LOG_WARNING("==================================================================================");
- }
-
- @Override
- public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt) {
- try {
- try {
- debug1();
- if (((aInput1 == null) /*&& (aFluidInput == null)*/) || ((aOutput == null) || (aFluidOutput == null))) {
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
- return false;
- }
-
- } catch (NullPointerException e){e.getStackTrace();}
- try {
- debug2(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
- if ((aOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) {
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
- return false;
- }
-
- } catch (NullPointerException e){e.getStackTrace();}
- try {
-
- debug3(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
- if ((aFluidOutput == null) && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Something was null, returning false");
- return false;
- }
-
- } catch (NullPointerException e){e.getStackTrace();}
- try {
- debug4(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
- if (aFluidInput == null){
- GregtechRecipe.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, null, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- }
- else {
- GregtechRecipe.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2}, new ItemStack[]{aOutput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- }
- debug5(aInput1, aInput2, aFluidInput, aFluidOutput, aOutput, aDuration, aEUt);
-
- return true;
-
- } catch (NullPointerException e){
- return false;
- }
- } catch (Throwable e){
- Utils.LOG_WARNING("aInput1:"+aInput1.toString()+" aInput2:"+aInput2.toString()+" aFluidInput:"+aFluidInput.toString()+" aFluidOutput:"+aFluidOutput.toString()+" aOutput:"+aOutput.toString()+" aDuration:"+aDuration+" aEU/t:"+aEUt);
- Utils.LOG_WARNING("Failed.");
- e.getStackTrace();
- return false;
- }
- }
-
- @Override
- public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType) {
- if (aInput1 == null) {
- Utils.LOG_INFO("Fuel Input is Invalid.");
- return false;
- }
- new GregtechRecipe(aInput1, aOutput1, GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
- return true;
- }
-
-
-}
diff --git a/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java b/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
index be318d9865..b6a71c128c 100644
--- a/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
+++ b/src/Java/miscutil/core/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks.java
@@ -28,13 +28,13 @@ extends GregtechMetaCasingBlocksAbstract {
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Centrifuge Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Structural Coke Oven Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Heat Resistant Coke Oven Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".3.name", "Heat Proof Coke Oven Casing"); //60
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".4.name", "Material Press Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".5.name", "Electrolyzer Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "BROKEN BLUE FUSION Casing");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".6.name", "Wire Factory Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Maceration Stack Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "BROKEN PINK FUSION Casing");
- GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Unused Casing");
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Matter Generation Block"); //65
+ GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Matter Fabricator Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Iron Plated Bricks");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Unused Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Unused Coil Block");
@@ -49,8 +49,8 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_Electrolyzer.set(new ItemStack(this, 1, 5));
GregtechItemList.Casing_Macerator.set(new ItemStack(this, 1, 6));
GregtechItemList.Casing_U4.set(new ItemStack(this, 1, 7));
- GregtechItemList.Casing_U5.set(new ItemStack(this, 1, 8));
- GregtechItemList.Casing_U6.set(new ItemStack(this, 1, 9));
+ GregtechItemList.Casing_MatterGen.set(new ItemStack(this, 1, 8));
+ GregtechItemList.Casing_MatterFab.set(new ItemStack(this, 1, 9));
GregtechItemList.Casing_IronPlatedBricks.set(new ItemStack(this, 1, 10));
GregtechItemList.Casing_U7.set(new ItemStack(this, 1, 11));
GregtechItemList.Casing_Coil_U1.set(new ItemStack(this, 1, 12));
@@ -82,14 +82,17 @@ extends GregtechMetaCasingBlocksAbstract {
case 5:
return Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon();
//Broken Blue Fusion Casings
- /*case 6:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon();*/
+ case 6:
+ return Textures.BlockIcons.MACHINE_CASING_FUSION.getIcon();
//Maceration Stack Casings
case 7:
return Textures.BlockIcons.MACHINE_LuV_BOTTOM.getIcon();
//Broken Pink Fusion Casings
- /*case 8:
- return Textures.BlockIcons.MACHINE_CASING_FIREBOX_TITANIUM.getIcon();*/
+ case 8:
+ return Textures.BlockIcons.MACHINE_CASING_FUSION_2.getIcon();
+ //Matter Fabricator Casings
+ case 9:
+ return Textures.BlockIcons.MACHINE_CASING_MAGIC.getIcon();
//Iron Blast Fuance Textures
case 10:
return Textures.BlockIcons.MACHINE_CASING_SOLID_STEEL.getIcon();
diff --git a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialWireMill.java b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialWireMill.java
index 1e5fa6427b..1dd4d2bd00 100644
--- a/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialWireMill.java
+++ b/src/Java/miscutil/core/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntityIndustrialWireMill.java
@@ -6,7 +6,7 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
@@ -21,212 +21,224 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
public class GregtechMetaTileEntityIndustrialWireMill
- extends GT_MetaTileEntity_MultiBlockBase {
- public GregtechMetaTileEntityIndustrialWireMill(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
+extends GT_MetaTileEntity_MultiBlockBase {
+ public GregtechMetaTileEntityIndustrialWireMill(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
- public GregtechMetaTileEntityIndustrialWireMill(String aName) {
- super(aName);
- }
+ public GregtechMetaTileEntityIndustrialWireMill(String aName) {
+ super(aName);
+ }
- @Override
+ @Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GregtechMetaTileEntityIndustrialWireMill(this.mName);
- }
+ return new GregtechMetaTileEntityIndustrialWireMill(this.mName);
+ }
- @Override
+ @Override
public String[] getDescription() {
- return new String[]{
- "Controller Block for the Vacuum Freezer",
- "Size: 3x3x3 (Hollow)",
- "Controller (front centered)",
- "1x Input (anywhere)",
- "1x Output (anywhere)",
- "1x Energy Hatch (anywhere)",
- "1x Maintenance Hatch (anywhere)",
- "Frost Proof Casings for the rest (16 at least!)",
- "",
- "Controller Block for the Large Plasma Generator",
- "Size: 3x4x3 (Hollow)", "Controller (front centered)",
- "1x Input Hatch (side centered)",
- "1x Dynamo Hatch (back centered)",
- "1x Maintenance Hatch (side centered)",
- "Turbine Casings for the rest (24 at least!)",
- "Needs a Turbine Item (inside controller GUI)"
- };
- }
-
- @Override
+ return new String[]{
+ "Controller Block for the Industrial Wire Factory",
+ "Size: 3x5x3 (Hollow)", "Controller (front centered)",
+ "2x Input Bus (side centered)",
+ "2x Output Bus (side centered)",
+ "1x Energy Hatch (top or bottom centered)",
+ "1x Maintenance Hatch (back centered)",
+ "Wire Factory Casings for the rest (32 at least!)"
+ };
+ }
+
+ @Override
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[17], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[17]};
- }
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[63], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_VACUUM_FREEZER)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[63]};
+ }
- @Override
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png");
- }
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "LargeTurbine.png");
+ }
- @Override
+ @Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
- }
+ return GT_Recipe.GT_Recipe_Map.sWiremillRecipes;
+ }
- @Override
+ @Override
public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
+ return true;
+ }
- @Override
+ @Override
public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
+ return aFacing > 1;
+ }
- @Override
+ @Override
public boolean checkRecipe(ItemStack aStack) {
- ArrayList<ItemStack> tInputList = getStoredInputs();
- for (ItemStack tInput : tInputList) {
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
-
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sWiremillRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], null, new ItemStack[]{tInput});
- if (tRecipe != null) {
- if (tRecipe.isRecipeInputEqual(true, null, new ItemStack[]{tInput})) {
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tRecipe.mDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = tRecipe.mDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
-