A lot of stuff about OreProcessors

This commit is contained in:
TheDarkDnKTv 2021-03-09 09:06:30 +02:00
parent 22c75dba20
commit ee09e84a5e
17 changed files with 582 additions and 523 deletions

View file

@ -321,10 +321,10 @@ public class GT_Mod implements IGT_Mod {
GregTech_API.sPreloadStarted = true;
GT_Log.log.info("Getting required Items of other Mods.");
GT_Items.Cell_Empty .set(GT_ModHandler.getIC2Item("cell", 1L, GT_ModHandler.getIC2Item("cell", 1L, GT_ModHandler.getIC2Item("cell", 1L))));
GT_Items.Cell_Water .set(GT_ModHandler.getIC2Item("waterCell", 1L, GT_ModHandler.getIC2Item("waterCell", 1L)));
GT_Items.Cell_Lava .set(GT_ModHandler.getIC2Item("lavaCell", 1L, GT_ModHandler.getIC2Item("lavaCell", 1L)));
GT_Items.Cell_Air .set(GT_ModHandler.getIC2Item("airCell", 1L, GT_ModHandler.getIC2Item("airCell", 1L, GT_ModHandler.getIC2Item("cellOxygen", 1L))));
GT_Items.Cell_Empty .set(GT_ModHandler.getIC2Item("cell", 1L));
GT_Items.Cell_Water .set(GT_ModHandler.getIC2Item("waterCell", 1L));
GT_Items.Cell_Lava .set(GT_ModHandler.getIC2Item("lavaCell", 1L));
GT_Items.Cell_Air .set(GT_ModHandler.getIC2Item("airCell", 1L));
GT_Items.IC2_Mixed_Metal_Ingot .set(GT_ModHandler.getIC2Item("mixedMetalIngot", 1L));
GT_Items.IC2_Fertilizer .set(GT_ModHandler.getIC2Item("fertilizer", 1L));
GT_Items.IC2_Resin .set(GT_ModHandler.getIC2Item("resin", 1L));

View file

@ -14,6 +14,7 @@ import ic2.api.recipe.RecipeOutput;
import java.lang.reflect.Method;
import java.util.*;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
@ -306,16 +307,12 @@ public class GT_ModHandler {
* Just simple Furnace smelting. Unbelievable how Minecraft fails at making a simple ItemStack->ItemStack mapping...
*/
@SuppressWarnings("deprecation")
public static synchronized boolean addSmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
public static boolean addSmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
aOutput = GT_OreDictUnificator.get(true, aOutput);
if (aInput == null || aOutput == null) return false;
if (aInput.getItem().hasContainerItem()) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.smelting, aInput, true)) return false;
Map<?, ?> recipes = FurnaceRecipes.smelting().getSmeltingList();
synchronized (recipes) {
FurnaceRecipes.smelting().func_151394_a(aInput.copy(), aOutput.copy(), 0.0F);
}
FurnaceRecipes.smelting().func_151394_a(aInput.copy(), aOutput.copy(), 0.0F);
return true;
}
@ -353,7 +350,7 @@ public class GT_ModHandler {
if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.liquidtransposer, aFullContainer, true)) return false;
try {
cofh.thermalexpansion.api.crafting.CraftingHandlers.transposer.addFillRecipe(aRF, aEmptyContainer, aFullContainer, aLiquid, true, true);
cofh.thermalexpansion.util.crafting.TransposerManager.addFillRecipe(aRF, aEmptyContainer, aFullContainer, aLiquid, true, true);
} catch(Throwable e) {/*Do nothing*/}
return true;
}
@ -366,7 +363,7 @@ public class GT_ModHandler {
if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.liquidtransposerfilling, aFullContainer, true)) return false;
try {
cofh.thermalexpansion.api.crafting.CraftingHandlers.transposer.addFillRecipe(aRF, aEmptyContainer, aFullContainer, aLiquid, false, true);
cofh.thermalexpansion.util.crafting.TransposerManager.addFillRecipe(aRF, aEmptyContainer, aFullContainer, aLiquid, false, true);
} catch(Throwable e) {/*Do nothing*/}
return true;
}
@ -379,7 +376,7 @@ public class GT_ModHandler {
if (aFullContainer == null || aEmptyContainer == null || aLiquid == null) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.liquidtransposeremptying, aFullContainer, true)) return false;
try {
cofh.thermalexpansion.api.crafting.CraftingHandlers.transposer.addExtractionRecipe(aRF, aFullContainer, aEmptyContainer, aLiquid, 100, false, true);
cofh.thermalexpansion.util.crafting.TransposerManager.addExtractionRecipe(aRF, aFullContainer, aEmptyContainer, aLiquid, 100, false, true);
} catch(Throwable e) {/*Do nothing*/}
return true;
}
@ -388,8 +385,6 @@ public class GT_ModHandler {
public static boolean addTCPulveriserRecipe(ItemStack input, ItemStack primaryOutput, ItemStack secondaryOutput, int secondaryChance, int RF) {
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.pulverization, input, true)) return false;
try {
// TODO null, maybe load later
// cofh.thermalexpansion.api.crafting.CraftingHandlers.pulverizer.addRecipe(RF, input, primaryOutput, secondaryOutput, secondaryChance, true);
cofh.thermalexpansion.util.crafting.PulverizerManager.addRecipe(RF, input, primaryOutput, secondaryOutput, secondaryChance, true);
} catch(Throwable e) {/*Do nothing*/}
return true;
@ -450,7 +445,11 @@ public class GT_ModHandler {
public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance, boolean aOverwrite) {
aOutput1 = GT_OreDictUnificator.get(true, aOutput1);
aOutput2 = GT_OreDictUnificator.get(true, aOutput2);
if (aInput == null || aOutput1 == null) return false;
String assocIn = GT_OreDictUnificator.getAssociation(aInput);
String assocOut = GT_OreDictUnificator.getAssociation(aOutput1);
if (aInput == null || aOutput1 == null || (assocIn != null ? assocIn.equals(assocOut) : false)) return false;
GT_Utility.removeSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null);
if (GT_Utility.getContainerItem(aInput) == null) {
@ -505,12 +504,39 @@ public class GT_ModHandler {
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.sawmill, aInput1, true)) return false;
try {
cofh.thermalexpansion.api.crafting.CraftingHandlers.sawmill.addRecipe(aRF, aInput1, outputs[0], outputs.length > 1 ? outputs[1] : null, aChance, true);
cofh.thermalexpansion.util.crafting.SawmillManager.addRecipe(aRF, aInput1, outputs[0], outputs.length > 1 ? outputs[1] : null, aChance, true);
} catch(Throwable e) {/*Do nothing*/}
RecipeMaps.SAWMILL.factory().EUt(30).duration(200*aInput1.stackSize).setShaped(true).inputs(aInput1).input(getWater(1000)).outputs(outputs).buildAndRegister();
return true;
}
/**
* Induction Smelter Recipes for TE
*/
public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aEnergy, int aChance) {
aOutput1 = GT_OreDictUnificator.get(true, aOutput1);
aOutput2 = GT_OreDictUnificator.get(true, aOutput2);
if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1) != null) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.inductionsmelter, aInput2==null?aInput1:aOutput1, true)) return false;
try {
cofh.thermalexpansion.util.crafting.SmelterManager.addRecipe(aEnergy, GT_Utility.copy(aInput1), aInput2==null?new ItemStack(Blocks.sand, 1, 0):aInput2, aOutput1, aOutput2, aChance, true);
} catch(Throwable e) {/*Do nothing*/}
return true;
}
public static boolean removeInductionSmelterRecipe(ItemStack output) {
if (GT_Utility.isStackInvalid(output)) return false;
try {
for (cofh.thermalexpansion.api.crafting.recipes.ISmelterRecipe recipe : cofh.thermalexpansion.util.crafting.SmelterManager.getRecipeList()) {
if (recipe.getPrimaryOutput().isItemEqual(output)) {
cofh.thermalexpansion.util.crafting.SmelterManager.removeRecipe(recipe.getPrimaryInput(), recipe.getSecondaryInput());
break;
}
}
} catch(Throwable e) {/*Do nothing*/}
return true;
}
/**
* Induction Smelter Recipes and Alloy Smelter Recipes
*/
@ -523,28 +549,6 @@ public class GT_ModHandler {
return temp;
}
/**
* Induction Smelter Recipes for TE
*/
public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aEnergy, int aChance) {
aOutput1 = GT_OreDictUnificator.get(true, aOutput1);
aOutput2 = GT_OreDictUnificator.get(true, aOutput2);
if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1) != null) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.inductionsmelter, aInput2==null?aInput1:aOutput1, true)) return false;
try {
cofh.thermalexpansion.api.crafting.CraftingHandlers.smelter.addRecipe(aEnergy, GT_Utility.copy(aInput1), aInput2==null?new ItemStack(Blocks.sand, 1, 0):aInput2, aOutput1, aOutput2, aChance, true);
} catch(Throwable e) {/*Do nothing*/}
return true;
}
/**
* Smelts dusts to Ingots
*/
@Deprecated
public static boolean addDustToIngotSmeltingRecipe(ItemStack aInput, ItemStack aOutput) {
return false;
}
/**
* Smelts Ores to Ingots
*/
@ -676,15 +680,16 @@ public class GT_ModHandler {
}
/**
* @param aValue Scrap = 5000, Scrapbox = 45000, Diamond Dust 125000
* @param aValue Scrap = 5000, Scrapbox = 45000
* @param aAmplifiers stacks apply to
*/
public static synchronized boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) {
if (aAmplifier == null || aValue <= 0) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.massfabamplifier, aAmplifier, true)) return false;
public static boolean addIC2MatterAmplifier(int aValue, String oreDict) {
if (GT_Utility.isStackInvalid(oreDict) || aValue <= 0) return false;
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.massfabamplifier, oreDict, true)) return false;
try {
NBTTagCompound tNBT = new NBTTagCompound();
tNBT.setInteger("amplification", aValue);
GT_Utility.callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT);
ic2.api.recipe.Recipes.matterAmplifier.addRecipe(new ic2.api.recipe.RecipeInputOreDict(oreDict), tNBT);
} catch(Throwable e) {/*Do nothing*/}
return true;
}
@ -895,10 +900,11 @@ public class GT_ModHandler {
/**
* Removes a Smelting Recipe
*/
public static synchronized boolean removeFurnaceSmelting(ItemStack aInput) {
public static boolean removeFurnaceSmelting(ItemStack aInput) {
if (aInput != null) {
FurnaceRecipes.smelting().getSmeltingList().remove(aInput);
return true;
@SuppressWarnings("unchecked")
Map<ItemStack, ItemStack> recipes = FurnaceRecipes.smelting().getSmeltingList();
return recipes.entrySet().removeIf(e -> e.getKey().isItemEqual(aInput));
}
return false;
}

View file

@ -715,16 +715,15 @@ public class GT_Utility {
return null;
}
public static synchronized boolean removeSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, ItemStack aOutput) {
public static boolean removeSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, ItemStack aOutput) {
if ((isStackInvalid(aInput) && isStackInvalid(aOutput)) || aRecipeList == null) return false;
boolean rReturn = false;
Iterator<Map.Entry<IRecipeInput, RecipeOutput>> tIterator = aRecipeList.entrySet().iterator();
aOutput = GT_OreDictUnificator.get(aOutput);
while (tIterator.hasNext()) {
Map.Entry<IRecipeInput, RecipeOutput> tEntry = tIterator.next();
if (aInput == null || tEntry.getKey().matches(aInput)) {
List<ItemStack> tList = tEntry.getValue().items;
if (tList != null) for (ItemStack tOutput : tList) if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) {
if (tList != null) for (ItemStack tOutput : tList) if (aOutput == null || aOutput.isItemEqual(tOutput)) {
tIterator.remove();
rReturn = true;
break;
@ -737,10 +736,11 @@ public class GT_Utility {
public static boolean addSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, NBTTagCompound aNBT, Object... aOutput) {
if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return false;
String tOreName = GT_OreDictUnificator.getAssociation(aInput);
RecipeOutput out = new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput));
if (isStringValid(tOreName)) {
aRecipeList.put(new RecipeInputOreDict(tOreName, aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput)));
aRecipeList.put(new RecipeInputOreDict(tOreName, aInput.stackSize), out);
} else {
aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput)));
aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), out);
}
return true;
}

View file

@ -35,11 +35,11 @@ public class ProcessingCell implements IOreRecipeRegistrator {
if (aMaterial != Materials.Empty) {
RecipeFactory<?> factory;
if (aMaterial.mMaterialList.size() > 0 && (aMaterial.mExtraData & 3) != 0) {
int totalMaterialAmount = 0;
long totalMaterialAmount = 0;
for (MaterialStack tMat : aMaterial.mMaterialList)
totalMaterialAmount += tMat.mAmount;
int tItemAmount1 = 0;
int capsuleCount = -totalMaterialAmount;
long capsuleCount = -totalMaterialAmount;
int tDensityMultiplier = (int) (aMaterial.getDensity() > GregTech_API.MATERIAL_UNIT ? aMaterial.getDensity() / GregTech_API.MATERIAL_UNIT : 1L);
List<ItemStack> tList = new ArrayList<>();

View file

@ -1,5 +1,7 @@
package gregtechmod.loaders.oreprocessing;
import java.util.List;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.enums.SubTag;
@ -7,19 +9,27 @@ import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import net.minecraft.item.ItemStack;
public class ProcessingCrushed implements IOreRecipeRegistrator {
public ProcessingCrushed() {
OrePrefixes.crushed.add((IOreRecipeRegistrator)this);
}
public ProcessingCrushed() {
OrePrefixes.crushed.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), 10, false);
GT_ModHandler.addOreWasherRecipe(GT_Utility.copyAmount(1L, aStack), 1000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.crushedPurified, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Stone, 1L)});
if(!aMaterial.contains(SubTag.NO_SMELTING)) {
GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), Math.min(5000, Math.abs(aMaterial.getMass() * 20)), new Object[]{GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Stone, 1L)});
}
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
for (ItemStack aStack : entry.ores) {
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), 10, false);
GT_ModHandler.addOreWasherRecipe(GT_Utility.copyAmount(1L, aStack), 1000, new Object[]{GT_OreDictUnificator.get(OrePrefixes.crushedPurified, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(0, aMaterial, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)});
if(!aMaterial.contains(SubTag.NO_SMELTING)) {
GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), Math.min(5000, Math.abs(aMaterial.getMass() * 20)), new Object[]{GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial, aMaterial.mOreByProducts), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L)});
}
}
}
}
}
}

View file

@ -1,18 +1,30 @@
package gregtechmod.loaders.oreprocessing;
import java.util.List;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import net.minecraft.item.ItemStack;
public class ProcessingCrushedCentrifuged implements IOreRecipeRegistrator {
public ProcessingCrushedCentrifuged() {
OrePrefixes.crushedCentrifuged.add((IOreRecipeRegistrator)this);
}
public ProcessingCrushedCentrifuged() {
OrePrefixes.crushedCentrifuged.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(2, aMaterial, aMaterial.mOreByProducts), 1L), 10, false);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
for (ItemStack aStack : entry.ores) {
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(2, aMaterial, aMaterial.mOreByProducts), 1L), 10, false);
}
}
}
}
}

View file

@ -1,23 +1,35 @@
package gregtechmod.loaders.oreprocessing;
import java.util.List;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.enums.SubTag;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import net.minecraft.item.ItemStack;
public class ProcessingCrushedPurified implements IOreRecipeRegistrator {
public ProcessingCrushedPurified() {
OrePrefixes.crushedPurified.add((IOreRecipeRegistrator)this);
}
public ProcessingCrushedPurified() {
OrePrefixes.crushedPurified.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial, aMaterial.mOreByProducts), 1L), 10, false);
if(!aMaterial.contains(SubTag.NO_SMELTING)) {
GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), Math.min(5000, Math.abs(aMaterial.getMass() * 20)), new Object[]{GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial, aMaterial.mOreByProducts), 1L)});
}
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
for (ItemStack aStack : entry.ores) {
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack),
GT_OreDictUnificator.get(OrePrefixes.dustPure, aMaterial, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 1L), GT_OreDictUnificator.get(OrePrefixes.dust, GT_Utility.selectItemInList(1, aMaterial, aMaterial.mOreByProducts), 1L), 10, false);
if (!aMaterial.contains(SubTag.NO_SMELTING)) {
GT_ModHandler.addThermalCentrifugeRecipe(GT_Utility.copyAmount(1L, aStack), Math.min(5000, Math.abs(aMaterial.getMass() * 20)), new Object[] { GT_OreDictUnificator.get(OrePrefixes.crushedCentrifuged, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, GT_Utility.selectItemInList(1, aMaterial, aMaterial.mOreByProducts), 1L) });
}
}
}
}
}
}

View file

@ -7,360 +7,266 @@ import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.enums.SubTag;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.recipe.RecipeFactory;
import gregtechmod.api.util.GT_Log;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Shaped_Recipe;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import gregtechmod.common.recipe.RecipeEntry;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.recipe.RecipeEntry.Match;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
public class ProcessingDust implements IOreRecipeRegistrator {
public ProcessingDust() {
OrePrefixes.dust.add((IOreRecipeRegistrator)this);
}
public ProcessingDust() {
OrePrefixes.dust.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
if(aMaterial.mFuelPower > 0) {
GregTech_API.sRecipeAdder.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), (ItemStack)null, aMaterial.mFuelPower, aMaterial.mFuelType);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
RecipeFactory<?> factory;
if (aMaterial.mFuelPower > 0) {
switch(aMaterial.mFuelType) {
case 0:
factory = RecipeMaps.DIESEL_FUELS.factory();
break;
case 1:
factory = RecipeMaps.TURBINE_FUELS.factory();
break;
case 2:
factory = RecipeMaps.HOT_FUELS.factory();
break;
case 4:
factory = RecipeMaps.PLASMA_FUELS.factory();
break;
case 5:
factory = RecipeMaps.MAGIC_FUELS.factory();
break;
default:
factory = RecipeMaps.DENSE_FUELS.factory();
break;
}
if(aMaterial.mAmplificationValue > 0) {
GT_ModHandler.addIC2MatterAmplifier(GT_Utility.copyAmount(1L, new Object[]{aStack}), aMaterial.mAmplificationValue);
}
factory.EUt(1).duration(aMaterial.mFuelPower * 1000).input(RecipeEntry.fromStacks(entry.ores, Match.STRICT)).buildAndRegister();
}
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, (Object)aMaterial, 4L), new Object[]{" X", " ", Character.valueOf('X'), aOreDictName});
GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, (Object)aMaterial, 9L), new Object[]{"X ", " ", Character.valueOf('X'), aOreDictName});
GregTech_API.sRecipeAdder.addCannerRecipe(aStack, aMaterial == Materials.Milk?GT_Items.Cell_Water.get(1L, new Object[0]):GT_Items.Cell_Empty.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.cell, (Object)aMaterial, 1L), (ItemStack)null, 100, 1);
ItemStack tStack;
if(null != (tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L)) && !aMaterial.contains(SubTag.NO_SMELTING)) {
if(aMaterial.mBlastFurnaceRequired) {
GT_ModHandler.removeFurnaceSmelting(aStack);
GregTech_API.sRecipeAdder.addBlastRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), (ItemStack)null, aMaterial.mBlastFurnaceTemp > 1750?GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, tStack, 1L):GT_Utility.copyAmount(1L, new Object[]{tStack}), (ItemStack)null, Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp);
if(aMaterial.mBlastFurnaceTemp <= 1000) {
GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Utility.copyAmount(1L, new Object[]{tStack}), aMaterial.mBlastFurnaceTemp);
}
} else {
GT_ModHandler.addSmeltingRecipe(aStack, tStack);
}
} else {
if(!OrePrefixes.block.isIgnored(aMaterial) && null == GT_OreDictUnificator.get(OrePrefixes.gem, (Object)aMaterial, 1L)) {
GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.block, (Object)aMaterial, 1L));
}
if (aMaterial.mAmplificationValue > 0) {
GT_ModHandler.addIC2MatterAmplifier(aMaterial.mAmplificationValue, entry.oreDictName);
}
if((OrePrefixes.block.isIgnored(aMaterial) || null == GT_OreDictUnificator.get(OrePrefixes.block, (Object)aMaterial, 1L)) && aMaterial != Materials.GraniteRed && aMaterial != Materials.GraniteBlack && aMaterial != Materials.Obsidian && aMaterial != Materials.Glowstone && aMaterial != Materials.Paper) {
GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, (Object)aMaterial, 1L));
}
}
GameRegistry.addRecipe(new GT_Shaped_Recipe(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4), new Object[]{" X", " ", 'X', entry.oreDictName}));
GameRegistry.addRecipe(new GT_Shaped_Recipe(GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9), new Object[]{"X ", " ", 'X', entry.oreDictName}));
if(aMaterial.mMaterialList.size() > 0 && (aMaterial.mExtraData & 3) != 0) {
long tItemAmount = 0L;
long tCapsuleCount = 0L;
long tDensityMultiplier = aMaterial.getDensity() > 3628800L?aMaterial.getDensity() / 3628800L:1L;
List<ItemStack> tList = new ArrayList<>();
Iterator<MaterialStack> iterator = aMaterial.mMaterialList.iterator();
if (GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1) != null) {
RecipeMaps.CANINNING.factory().EUt(1).duration(100)
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
.input(aMaterial == Materials.Milk ? GT_Items.Cell_Water.get(1) : GT_Items.Cell_Empty.get(1))
.output(GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1))
.buildAndRegister();
}
while(iterator.hasNext()) {
MaterialStack tMat = (MaterialStack)iterator.next();
if(tMat.mAmount > 0L) {
if(tMat.mMaterial == Materials.Oxygen) {
tStack = GT_Items.Cell_Air.get(tMat.mAmount / 2L, new Object[0]);
} else {
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, (Object)tMat.mMaterial, tMat.mAmount);
if(tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, (Object)tMat.mMaterial, tMat.mAmount);
}
}
if (aMaterial.mMaterialList.size() > 0 && (aMaterial.mExtraData & 3) != 0) {
int tItemAmount = 0;
long tCapsuleCount = 0L;
long tDensityMultiplier = aMaterial.getDensity() > GregTech_API.MATERIAL_UNIT ? aMaterial.getDensity() / GregTech_API.MATERIAL_UNIT : 1L;
List<ItemStack> tList = new ArrayList<>();
for (MaterialStack tMat : aMaterial.mMaterialList) {
if (tMat.mAmount > 0L) {
ItemStack tStack;
if (tMat.mMaterial == Materials.Oxygen) {
tStack = GT_Items.Cell_Air.get(tMat.mAmount / 2);
} else {
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat.mMaterial, tMat.mAmount);
if (tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, tMat.mMaterial, tMat.mAmount);
}
}
if(tItemAmount + tMat.mAmount * 3628800L <= (long)aStack.getMaxStackSize() * aMaterial.getDensity()) {
tItemAmount += tMat.mAmount * 3628800L;
if(tStack != null) {
for(tStack.stackSize = (int)((long)tStack.stackSize * tDensityMultiplier); tStack.stackSize > 64 && tList.size() < 4 && tCapsuleCount + (long)(GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64) <= 64L; tStack.stackSize -= 64) {
tCapsuleCount += (long)(GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64);
tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack}));
}
if (tItemAmount + tMat.mAmount * GregTech_API.MATERIAL_UNIT <= 64 * aMaterial.getDensity()) {
tItemAmount += tMat.mAmount * GregTech_API.MATERIAL_UNIT;
if (tStack != null) {
for (tStack.stackSize = (int) (tStack.stackSize * tDensityMultiplier); tStack.stackSize > 64 && tList.size() < 4 && tCapsuleCount + (GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64) <= 64L; tStack.stackSize -= 64) {
tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64;
tList.add(GT_Utility.copyAmount(64, tStack ));
}
if(tStack.stackSize > 0 && tList.size() < 4 && tCapsuleCount + (long)GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) {
tCapsuleCount += (long)GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack});
tList.add(tStack);
}
}
}
}
}
if (tStack.stackSize > 0 && tList.size() < 4 && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64L) {
tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack);
tList.add(tStack);
}
}
}
}
}
tItemAmount = (long)(tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L?1:0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity();
if(tList.size() > 0) {
if((aMaterial.mExtraData & 1) != 0) {
GregTech_API.sRecipeAdder.addElectrolyzerRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), (int)tCapsuleCount, (ItemStack)tList.get(0), tList.size() < 2?null:(ItemStack)tList.get(1), tList.size() < 3?null:(ItemStack)tList.get(2), tList.size() < 4?null:(ItemStack)tList.get(3), Math.max(1, Math.abs(aMaterial.getProtons() * 2 * (int)tItemAmount)), Math.min(4, tList.size()) * 30);
}
tItemAmount = (int) ((tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity());
if (tList.size() > 0) {
if ((aMaterial.mExtraData & 1) != 0) {
factory = RecipeMaps.ELECTROLYZER.factory()
.setShaped(true)
.EUt(Math.min(4, tList.size()) * 30)
.duration(Math.max(1, Math.abs(aMaterial.getProtons() * 2 * tItemAmount)))
.input(RecipeEntry.fromStacks(tItemAmount, entry.ores, Match.STRICT));
if (tCapsuleCount > 0)
factory.input(GT_Items.Cell_Empty.get(tCapsuleCount));
factory.outputs(tList.toArray(new ItemStack[0])).buildAndRegister();
}
if((aMaterial.mExtraData & 2) != 0) {
GregTech_API.sRecipeAdder.addCentrifugeRecipe(GT_Utility.copyAmount(tItemAmount, new Object[]{aStack}), (int)tCapsuleCount, (ItemStack)tList.get(0), tList.size() < 2?null:(ItemStack)tList.get(1), tList.size() < 3?null:(ItemStack)tList.get(2), tList.size() < 4?null:(ItemStack)tList.get(3), Math.max(1, Math.abs(aMaterial.getMass() * 8 * (int)tItemAmount)));
}
}
}
if ((aMaterial.mExtraData & 2) != 0) {
factory = RecipeMaps.CENTRIFUGE.factory()
.setShaped(true).EUt(5)
.duration(Math.max(1, Math.abs(aMaterial.getMass() * 8 * tItemAmount)))
.input(RecipeEntry.fromStacks(tItemAmount, entry.ores, Match.STRICT));
if (tCapsuleCount > 0)
factory.input(GT_Items.Cell_Empty.get(tCapsuleCount));
factory.outputs(tList.toArray(new ItemStack[0])).buildAndRegister();
}
}
}
switch(ProcessingDust.NamelessClass1657544856.$SwitchMap$gregtechmod$api$enums$Materials[aMaterial.ordinal()]) {
case 1:
default:
break;
case 2:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Items.bread, 1, 0));
break;
case 3:
GregTech_API.sRecipeAdder.addCannerRecipe(aStack, new ItemStack(Items.water_bucket, 1), new ItemStack(Items.milk_bucket, 1), (ItemStack)null, 100, 1);
break;
case 4:
GT_Log.log.error("Quicksilver Dust?, To melt that, you don\'t even need a Furnace...");
break;
case 5:
case 6:
case 7:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Copper, 6L));
break;
case 8:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Nickel, 6L));
break;
case 9:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)Materials.Nickel, 1L));
break;
case 10:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)Materials.Tin, 1L));
break;
case 11:
GT_ModHandler.addLiquidTransposerFillRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getWater(125L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.HydratedCoal, 1L), 125);
break;
case 12:
GT_ModHandler.addLiquidTransposerEmptyRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getWater(125L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Coal, 1L), 125);
break;
case 13:
GregTech_API.sRecipeAdder.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 32, GT_Items.IC2_Industrial_Diamond.get(3L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.DarkAsh, 16L));
break;
case 14:
case 15:
case 16:
case 17:
case 18:
case 19:
case 20:
case 21:
case 22:
GregTech_API.sRecipeAdder.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 24, GT_OreDictUnificator.get(OrePrefixes.gem, (Object)aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.DarkAsh, 12L));
break;
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 29:
case 30:
case 31:
GregTech_API.sRecipeAdder.addImplosionRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), 16, GT_OreDictUnificator.get(OrePrefixes.gem, (Object)aMaterial, 3L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.DarkAsh, 8L));
}
switch (aMaterial) {
case _NULL:
case Empty:
default:
continue;
case Milk:
RecipeMaps.CANINNING.factory().EUt(1).duration(100)
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
.input(new ItemStack(Items.water_bucket, 1))
.output(new ItemStack(Items.milk_bucket, 1))
.buildAndRegister();
break;
case Mercury:
GT_Log.log.error("Quicksilver Dust?, To melt that, you don't even need a Furnace...");
break;
case Diamond:
RecipeMaps.IMPLOSION_COMPRESSOR.factory().EUt(30).duration(20)
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT))
.input(GT_ModHandler.getIC2Item("industrialTnt", 32))
.output(GT_Items.IC2_Industrial_Diamond.get(3))
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 16L))
.buildAndRegister();
break;
case Opal:
case Olivine:
case Emerald:
case Ruby:
case Sapphire:
case GreenSapphire:
case Topaz:
case BlueTopaz:
case Tanzanite:
RecipeMaps.IMPLOSION_COMPRESSOR.factory().EUt(30).duration(20)
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT))
.input(GT_ModHandler.getIC2Item("industrialTnt", 24))
.output(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L))
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 12L))
.buildAndRegister();
break;
case GarnetRed:
case GarnetYellow:
case Jasper:
case Amber:
case Monazite:
case Forcicium:
case Forcillium:
case Force:
RecipeMaps.IMPLOSION_COMPRESSOR.factory().EUt(30).duration(20)
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT))
.input(GT_ModHandler.getIC2Item("industrialTnt", 16))
.output(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 3L))
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.DarkAsh, 8L))
.buildAndRegister();
}
}
ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L);
// $FF: synthetic class
static class NamelessClass1657544856 {
if (aMaterial.mBlastFurnaceRequired && null != tStack && !aMaterial.contains(SubTag.NO_SMELTING)) {
factory = RecipeMaps.BLAST_FURNANCE.factory()
.minTemperature(aMaterial.mBlastFurnaceTemp).EUt(120)
.duration(Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp)
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT));
if (aMaterial.mBlastFurnaceTemp > 1750)
factory.output(GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, tStack, 1));
else
factory.output(tStack);
factory.buildAndRegister();
}
// $FF: synthetic field
static final int[] $SwitchMap$gregtechmod$api$enums$Materials = new int[Materials.values().length];
for (ItemStack aStack : entry.ores) {
if (null != tStack && !aMaterial.contains(SubTag.NO_SMELTING)) {
if (aMaterial.mBlastFurnaceRequired) {
GT_ModHandler.removeFurnaceSmelting(aStack);
if (aStack.isItemEqual(GT_ModHandler.getIC2Item("refinedIronIngot", 1)))
GT_ModHandler.removeInductionSmelterRecipe(aStack);
if (aMaterial.mBlastFurnaceTemp <= 1000)
GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1, aStack), GT_Utility.copyAmount(1, tStack), aMaterial.mBlastFurnaceTemp);
} else {
GT_ModHandler.addSmeltingRecipe(aStack, tStack);
}
} else {
if (!OrePrefixes.block.isIgnored(aMaterial) && null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L)) {
GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(9, aStack), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L));
}
if ((OrePrefixes.block.isIgnored(aMaterial)
|| null == GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L))
&& aMaterial != Materials.GraniteRed && aMaterial != Materials.GraniteBlack
&& aMaterial != Materials.Obsidian && aMaterial != Materials.Glowstone
&& aMaterial != Materials.Paper) {
GT_ModHandler.addCompressionRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L));
}
}
static {
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials._NULL.ordinal()] = 1;
} catch (NoSuchFieldError var31) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Wheat.ordinal()] = 2;
} catch (NoSuchFieldError var30) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Milk.ordinal()] = 3;
} catch (NoSuchFieldError var29) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Mercury.ordinal()] = 4;
} catch (NoSuchFieldError var28) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Tetrahedrite.ordinal()] = 5;
} catch (NoSuchFieldError var27) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Chalcopyrite.ordinal()] = 6;
} catch (NoSuchFieldError var26) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Malachite.ordinal()] = 7;
} catch (NoSuchFieldError var25) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Pentlandite.ordinal()] = 8;
} catch (NoSuchFieldError var24) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Garnierite.ordinal()] = 9;
} catch (NoSuchFieldError var23) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Cassiterite.ordinal()] = 10;
} catch (NoSuchFieldError var22) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Coal.ordinal()] = 11;
} catch (NoSuchFieldError var21) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.HydratedCoal.ordinal()] = 12;
} catch (NoSuchFieldError var20) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Diamond.ordinal()] = 13;
} catch (NoSuchFieldError var19) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Opal.ordinal()] = 14;
} catch (NoSuchFieldError var18) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Olivine.ordinal()] = 15;
} catch (NoSuchFieldError var17) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Emerald.ordinal()] = 16;
} catch (NoSuchFieldError var16) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Ruby.ordinal()] = 17;
} catch (NoSuchFieldError var15) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Sapphire.ordinal()] = 18;
} catch (NoSuchFieldError var14) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.GreenSapphire.ordinal()] = 19;
} catch (NoSuchFieldError var13) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Topaz.ordinal()] = 20;
} catch (NoSuchFieldError var12) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.BlueTopaz.ordinal()] = 21;
} catch (NoSuchFieldError var11) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Tanzanite.ordinal()] = 22;
} catch (NoSuchFieldError var10) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.FoolsRuby.ordinal()] = 23;
} catch (NoSuchFieldError var9) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.GarnetRed.ordinal()] = 24;
} catch (NoSuchFieldError var8) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.GarnetYellow.ordinal()] = 25;
} catch (NoSuchFieldError var7) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Jasper.ordinal()] = 26;
} catch (NoSuchFieldError var6) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Amber.ordinal()] = 27;
} catch (NoSuchFieldError var5) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Monazite.ordinal()] = 28;
} catch (NoSuchFieldError var4) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Forcicium.ordinal()] = 29;
} catch (NoSuchFieldError var3) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Forcillium.ordinal()] = 30;
} catch (NoSuchFieldError var2) {
;
}
try {
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Force.ordinal()] = 31;
} catch (NoSuchFieldError var1) {
;
}
}
}
switch (aMaterial) {
default:
break;
case Wheat:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack), new ItemStack(Items.bread, 1, 0));
break;
case Tetrahedrite:
case Chalcopyrite:
case Malachite:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 6L));
break;
case Pentlandite:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 6L));
break;
case Garnierite:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nickel, 1L));
break;
case Cassiterite:
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Tin, 1L));
break;
case Coal:
GT_ModHandler.addLiquidTransposerFillRecipe(GT_Utility.copyAmount(1, aStack),
GT_ModHandler.getWater(125L),
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.HydratedCoal, 1L), 125);
break;
case HydratedCoal:
GT_ModHandler.addLiquidTransposerEmptyRecipe(GT_Utility.copyAmount(1, aStack),
GT_ModHandler.getWater(125L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Coal, 1L),
125);
break;
}
}
}
}
}
}

View file

@ -1,44 +1,77 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
import java.util.List;
import gregtechmod.api.enums.GT_Items;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import gregtechmod.common.recipe.RecipeEntry;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.recipe.RecipeEntry.Match;
import net.minecraft.item.ItemStack;
public class ProcessingDustImpure implements IOreRecipeRegistrator {
public ProcessingDustImpure() {
OrePrefixes.dustPure.add((IOreRecipeRegistrator)this);
OrePrefixes.dustImpure.add((IOreRecipeRegistrator)this);
OrePrefixes.dustRefined.add((IOreRecipeRegistrator)this);
}
public ProcessingDustImpure() {
OrePrefixes.dustPure.add(this);
OrePrefixes.dustImpure.add(this);
OrePrefixes.dustRefined.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
Materials tByProduct = (Materials)GT_Utility.selectItemInList(aPrefix == OrePrefixes.dustPure?1:(aPrefix == OrePrefixes.dustRefined?2:0), aMaterial, aMaterial.mOreByProducts);
ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tByProduct, GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)tByProduct, 1L), 1L);
if(tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.dustSmall, (Object)tByProduct, 1L);
if(tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tByProduct, GT_OreDictUnificator.get(OrePrefixes.gem, (Object)tByProduct, 1L), 1L);
if(tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, (Object)tByProduct, 1L);
if(tStack == null) {
GregTech_API.sRecipeAdder.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), (ItemStack)null, (ItemStack)null, (ItemStack)null, Math.max(1, aMaterial.getMass()));
} else {
GregTech_API.sRecipeAdder.addCentrifugeRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), 1, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 9L), tStack, (ItemStack)null, (ItemStack)null, Math.max(1, aMaterial.getMass() * 72));
}
} else {
GregTech_API.sRecipeAdder.addCentrifugeRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 9L), tStack, (ItemStack)null, (ItemStack)null, Math.max(1, aMaterial.getMass() * 72));
}
} else {
GregTech_API.sRecipeAdder.addCentrifugeRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 2L), tStack, (ItemStack)null, (ItemStack)null, Math.max(1, aMaterial.getMass() * 16));
}
} else {
GregTech_API.sRecipeAdder.addCentrifugeRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), 0, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), tStack, (ItemStack)null, (ItemStack)null, Math.max(1, aMaterial.getMass() * 8));
}
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
Materials tByProduct = (Materials) GT_Utility.selectItemInList(aPrefix == OrePrefixes.dustPure ? 1 : (aPrefix == OrePrefixes.dustRefined ? 2 : 0), aMaterial, aMaterial.mOreByProducts);
ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tByProduct, GT_OreDictUnificator.get(OrePrefixes.nugget, tByProduct, 1L), 1L);
if (tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tByProduct, 1L);
if (tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tByProduct, GT_OreDictUnificator.get(OrePrefixes.gem, tByProduct, 1L), 1L);
if (tStack == null) {
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, tByProduct, 1L);
if (tStack == null) {
RecipeMaps.CENTRIFUGE.factory().EUt(5)
.duration(Math.max(1, aMaterial.getMass()))
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
.output(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1))
.buildAndRegister();
} else {
RecipeMaps.CENTRIFUGE.factory().EUt(5).setShaped(true)
.duration(Math.max(1, aMaterial.getMass() * 72))
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
.input(GT_Items.Cell_Empty.get(1))
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9), tStack)
.buildAndRegister();
}
} else {
RecipeMaps.CENTRIFUGE.factory().EUt(5)
.duration(Math.max(1, aMaterial.getMass() * 72))
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9), tStack)
.buildAndRegister();
}
} else {
RecipeMaps.CENTRIFUGE.factory().EUt(5)
.duration(Math.max(1, aMaterial.getMass() * 16))
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2), tStack)
.buildAndRegister();
}
} else {
RecipeMaps.CENTRIFUGE.factory().EUt(5)
.duration(Math.max(1, aMaterial.getMass() * 8))
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), tStack)
.buildAndRegister();
}
}
}
}
}

View file

@ -1,26 +1,59 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
import java.util.List;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.enums.SubTag;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.recipe.RecipeFactory;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Shapeless_Recipe;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import gregtechmod.common.recipe.RecipeEntry;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.recipe.RecipeEntry.Match;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.ItemStack;
public class ProcessingDustSmall implements IOreRecipeRegistrator {
public ProcessingDustSmall() {
OrePrefixes.dustSmall.add((IOreRecipeRegistrator)this);
}
public ProcessingDustSmall() {
OrePrefixes.dustSmall.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), new Object[]{aOreDictName, aOreDictName, aOreDictName, aOreDictName});
if(aMaterial.mBlastFurnaceRequired) {
GregTech_API.sRecipeAdder.addBlastRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), (ItemStack)null, aMaterial.mBlastFurnaceTemp > 1750?GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L), 1L):GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L), (ItemStack)null, Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp);
} else {
GT_ModHandler.addAlloySmelterRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), (ItemStack)null, GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L), 130, 3, true);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
ItemStack ingot;
GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), new Object[] { entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName }));
if (!aMaterial.contains(SubTag.NO_SMELTING) && (ingot = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L)) != null) {
if (aMaterial.mBlastFurnaceRequired) {
RecipeFactory<?> factory = RecipeMaps.BLAST_FURNANCE.factory()
.minTemperature(aMaterial.mBlastFurnaceTemp)
.EUt(120).duration(Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp)
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT));
if (aMaterial.mBlastFurnaceTemp > 1750)
factory.output(GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial));
else
factory.output(ingot);
factory.buildAndRegister();
} else {
RecipeMaps.ALLOY_SMELTING.factory().EUt(3).duration(130)
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT))
.output(ingot)
.buildAndRegister();
}
for (ItemStack stack : entry.ores)
GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(4L, stack), null, ingot, null, 130 * 2, 0);
}
}
}
}
}
}

View file

@ -1,31 +1,62 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
import java.util.List;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.enums.SubTag;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.recipe.RecipeFactory;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
import gregtechmod.api.util.GT_Shapeless_Recipe;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import gregtechmod.common.recipe.RecipeEntry;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.recipe.RecipeEntry.Match;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.item.ItemStack;
public class ProcessingDustTiny implements IOreRecipeRegistrator {
public ProcessingDustTiny() {
OrePrefixes.dustTiny.add((IOreRecipeRegistrator)this);
}
public ProcessingDustTiny() {
OrePrefixes.dustTiny.add(this);
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), new Object[]{aOreDictName, aOreDictName, aOreDictName, aOreDictName, aOreDictName, aOreDictName, aOreDictName, aOreDictName, aOreDictName});
if(!aMaterial.contains(SubTag.NO_SMELTING)) {
if(aMaterial.mBlastFurnaceRequired) {
GregTech_API.sRecipeAdder.addBlastRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), (ItemStack)null, aMaterial.mBlastFurnaceTemp > 1750?GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L), 1L):GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L), (ItemStack)null, Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp, 120, aMaterial.mBlastFurnaceTemp);
GT_ModHandler.removeFurnaceSmelting(aStack);
} else {
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)aMaterial, 1L));
GT_ModHandler.addAlloySmelterRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), (ItemStack)null, GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L), 130, 3, true);
}
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
ItemStack ingot;
GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L),
new Object[] { entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName }));
if (!aMaterial.contains(SubTag.NO_SMELTING) && (ingot = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L)) != null) {
if (aMaterial.mBlastFurnaceRequired) {
RecipeFactory<?> factory = RecipeMaps.BLAST_FURNANCE.factory()
.minTemperature(aMaterial.mBlastFurnaceTemp)
.EUt(120).duration(Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp)
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT));
if (aMaterial.mBlastFurnaceTemp > 1750)
factory.output(GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial));
else
factory.output(ingot);
factory.buildAndRegister();
} else {
RecipeMaps.ALLOY_SMELTING.factory().EUt(3).duration(130)
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
.output(ingot)
.buildAndRegister();
}
for (ItemStack stack : entry.ores) {
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, stack), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L));
GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(9L, stack), null, ingot, null, 130 * 2, 0);
}
}
}
}
}
}
}

View file

@ -1,25 +1,45 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
import java.util.List;
import java.util.stream.Collectors;
import gregtechmod.api.enums.Dyes;
import gregtechmod.api.enums.GT_Items;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.api.util.OreDictEntry;
import gregtechmod.common.recipe.RecipeEntry;
import gregtechmod.common.recipe.RecipeMaps;
import gregtechmod.common.recipe.RecipeEntry.Match;
import net.minecraft.item.ItemStack;
public class ProcessingDye implements IOreRecipeRegistrator {
public ProcessingDye() {
OrePrefixes.dye.add((IOreRecipeRegistrator)this);
}
public ProcessingDye() {
OrePrefixes.dye.add(this);
}
@SuppressWarnings("deprecation")
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
Dyes aDye = Dyes.get(aOreDictName);
if(aDye.mColor >= 0 && aDye.mColor < 16 && aStack.getItem().getItemStackLimit() >= 16 && GT_Utility.getContainerItem(aStack) == null) {
GregTech_API.sRecipeAdder.addCannerRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), GT_Items.Spray_Empty.get(1L, new Object[0]), GT_Items.SPRAY_CAN_DYES[aDye.mColor].get(1L, new Object[0]), (ItemStack)null, 800, 1);
}
}
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> dictEntry) {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial)) {
Dyes aDye = Dyes.get(entry.oreDictName);
if(aDye.mColor >= 0 && aDye.mColor < 16) {
List<ItemStack> ores = entry.ores.stream()
.filter(s -> s.getMaxStackSize() >= 16 && GT_Utility.getContainerItem(s) == null)
.collect(Collectors.toList());
RecipeMaps.CANINNING.factory()
.EUt(1).duration(800)
.input(RecipeEntry.fromStacks(16, ores, Match.STRICT))
.input(GT_Items.Spray_Empty.get(1))
.output(GT_Items.SPRAY_CAN_DYES[aDye.mColor].get(1))
.buildAndRegister();
}
}
}
}
}

View file

@ -29,8 +29,8 @@ public class ProcessingRecycling implements IOreRecipeRegistrator {
for (OreDictEntry entry : dictEntry) {
Materials aMaterial = this.getMaterial(aPrefix, entry);
if (this.isExecutable(aPrefix, aMaterial) && aMaterial != Materials.Blaze) {
if (aPrefix.mIsContainer) {
for (ItemStack aStack : entry.ores) {
for (ItemStack aStack : entry.ores) {
if (aPrefix.mIsContainer) {
if (aMaterial != Materials.Empty && aPrefix != OrePrefixes.cell) {
if (aMaterial == Materials.Mercury) {
RecipeMaps.CANINNING.factory().EUt(2).duration(Math.max(aMaterial.getMass() / 2, 1))
@ -51,13 +51,13 @@ public class ProcessingRecycling implements IOreRecipeRegistrator {
.output(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, aPrefix.mMaterialAmount / 3628800L))
.buildAndRegister();
}
} else {
GT_RecipeRegistrator.registerBasicReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount);
if (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial) != null
&& !aMaterial.contains(SubTag.NO_SMELTING) && aPrefix != OrePrefixes.ingot
&& aPrefix != OrePrefixes.nugget) {
GT_RecipeRegistrator.registerBasicReverseSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, true);
}
}
} else {
GT_RecipeRegistrator.registerBasicReverseMacerating(aStack, aMaterial, aPrefix.mMaterialAmount);
if (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial) != null
&& !aMaterial.contains(SubTag.NO_SMELTING) && aPrefix != OrePrefixes.ingot
&& aPrefix != OrePrefixes.nugget) {
GT_RecipeRegistrator.registerBasicReverseSmelting(aStack, aMaterial, aPrefix.mMaterialAmount, true);
}
}
}

View file

@ -63,16 +63,16 @@ public class GT_MachineRecipeLoader implements Runnable
GT_ModHandler.addExtractionRecipe(GT_Items.Crop_Drop_Coppon.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Copper, 1L));
GT_ModHandler.addExtractionRecipe(GT_Items.Crop_Drop_Tine.get(1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tin, 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Plumbilia.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Argentia.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Indigo.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Ferru.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Aurelia.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_OilBerry.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_BobsYerUncleRanks.get(8L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Plumbilia.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Argentia.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Indigo.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Ferru.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Aurelia.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_OilBerry.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_BobsYerUncleRanks.get(8L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Coppon.get(4L), new ItemStack(Blocks.wool, 1, 1));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Tine.get(4L), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GregTech_API.getGregTechMaterial(8, 8), GT_ModHandler.getIC2Item("compressedPlantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.Crop_Drop_Tine.get(4L), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GregTech_API.getGregTechMaterial(8, 8), GT_ModHandler.getIC2Item("plantBall", 1L));
GT_ModHandler.addCompressionRecipe(GT_Items.IC2_Compressed_Coal_Chunk.get(1L), GT_Items.IC2_Industrial_Diamond.get(1L));
GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 8L), new ItemStack(GregTech_API.sItemList[8], 1, 17809));
GT_ModHandler.addCompressionRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Uranium, 1L), GT_ModHandler.getIC2Item("Uran238", 1L));

View file

@ -21,7 +21,6 @@ public class GT_DictRegistratorPreItem implements Runnable {
GT_OreDictUnificator.registerOre("molecule_2o" , GT_ModHandler.getIC2Item("airCell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Empty , GT_ModHandler.getEmptyCell(1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Empty , GT_ModHandler.getIC2Item("cell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Empty , GT_ModHandler.getIC2Item("cellEmpty", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Oxygen , GT_ModHandler.getAirCell(1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Oxygen , GT_ModHandler.getIC2Item("airCell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Lava , GT_ModHandler.getLavaCell(1));
@ -30,7 +29,7 @@ public class GT_DictRegistratorPreItem implements Runnable {
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Water , GT_ModHandler.getIC2Item("waterCell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.Creosote , GT_ModHandler.getRCItem("fluid.creosote.cell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.BioFuel , GT_ModHandler.getIC2Item("biogasCell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.UUMatter , GT_ModHandler.getIC2Item("UuMatterCell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.UUMatter , GT_ModHandler.getIC2Item("uuMatterCell", 1));
GT_OreDictUnificator.add(OrePrefixes.cell , Materials.ConstructionFoam, GT_ModHandler.getIC2Item("CFCell", 1));
GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.Diamond , GT_ModHandler.getIC2Item("industrialDiamond", 1));
@ -57,14 +56,14 @@ public class GT_DictRegistratorPreItem implements Runnable {
GT_OreDictUnificator.add("plateAlloyIridium" , GT_ModHandler.getIC2Item("iridiumPlate", 1));
GT_OreDictUnificator.add("plateAlloyAdvanced" , GT_ModHandler.getIC2Item("advancedAlloy", 1));
GT_OreDictUnificator.add("plateAlloyCarbon" , GT_ModHandler.getIC2Item("carbonPlate", 1));
GT_OreDictUnificator.add("plateDenseCopper" , GT_ModHandler.getIC2Item("denseCopperPlate", 1, GT_ModHandler.getIC2Item("denseplatecopper", 1)));
GT_OreDictUnificator.add("plateDenseCopper" , GT_ModHandler.getIC2Item("denseplatecopper", 1));
GT_OreDictUnificator.add("plateDenseTin" , GT_ModHandler.getIC2Item("denseplatetin", 1));
GT_OreDictUnificator.add("plateDenseBronze" , GT_ModHandler.getIC2Item("denseplatebronze", 1));
GT_OreDictUnificator.add("plateDenseGold" , GT_ModHandler.getIC2Item("denseplategold", 1));
GT_OreDictUnificator.add("plateDenseIron" , GT_ModHandler.getIC2Item("denseplateiron", 1));
GT_OreDictUnificator.add("plateDenseRefinedIron" , GT_ModHandler.getIC2Item("denseplateadviron", 1));
GT_OreDictUnificator.add("plateDenseLead" , GT_ModHandler.getIC2Item("denseplatelead", 1));
GT_OreDictUnificator.add("plateDenseLapis" , GT_ModHandler.getIC2Item("denseplatelapi", 1, GT_ModHandler.getIC2Item("denseplatelapis", 1)));
GT_OreDictUnificator.add("plateDenseLapis" , GT_ModHandler.getIC2Item("denseplatelapi", 1));
GT_OreDictUnificator.add("plateDenseObsidian" , GT_ModHandler.getIC2Item("denseplateobsidian", 1));
GT_OreDictUnificator.registerOre("itemRecord" , new ItemStack(Items.record_13, 1));

View file

@ -1,7 +1,5 @@
package gregtechmod.loaders.preload;
import java.util.Map.Entry;
import gregtechmod.api.util.GT_Log;
import gregtechmod.loaders.oreprocessing.ProcessingBattery;
import gregtechmod.loaders.oreprocessing.ProcessingBlock;
@ -59,7 +57,6 @@ import gregtechmod.loaders.oreprocessing.ProcessingToolHeadSaw;
import gregtechmod.loaders.oreprocessing.ProcessingToolHeadShovel;
import gregtechmod.loaders.oreprocessing.ProcessingToolHeadSword;
import gregtechmod.loaders.oreprocessing.ProcessingWax;
import net.minecraftforge.fluids.FluidRegistry;
public class GT_OreProcessingLoader implements Runnable {
@ -72,14 +69,14 @@ public class GT_OreProcessingLoader implements Runnable {
new ProcessingCellPlasma();
new ProcessingCircuit();
new ProcessingCrafting();
// new ProcessingCrushed();
// new ProcessingCrushedPurified();
// new ProcessingCrushedCentrifuged();
// new ProcessingDust();
// new ProcessingDustImpure();
// new ProcessingDustSmall();
// new ProcessingDustTiny();
// new ProcessingDye();
new ProcessingCrushed();
new ProcessingCrushedPurified();
new ProcessingCrushedCentrifuged();
new ProcessingDust();
new ProcessingDustImpure();
new ProcessingDustSmall();
new ProcessingDustTiny();
new ProcessingDye();
// new ProcessingShaping();
// new ProcessingGem();
// new ProcessingGear();