Started work on OreDict handler

This commit is contained in:
TheDarkDnKTv 2021-03-03 21:04:41 +02:00
parent 3f961b3ee3
commit 33bbcb5c3a
17 changed files with 155 additions and 200 deletions

View file

@ -216,7 +216,7 @@ public class GT_Mod implements IGT_Mod {
GregTech_API.sRecipeAdder = new GT_RecipeAdder();
GregTech_API.sDummyWorld = new GT_DummyWorld();
GregTech_API.sGTCoverload.add(new GT_CoverLoader());
// GT_OreDictHandler.instance.registerHandler(); // FIXME change this
GT_OreDictHandler.instance.registerHandler();
for (int i = 0; i < mGregTechCapeList.size(); ++i) {
mGregTechCapeList.set(i, mGregTechCapeList.get(i).toLowerCase());
@ -643,7 +643,7 @@ public class GT_Mod implements IGT_Mod {
GT_Log.log.info("Activating OreDictionary Handler, this can take some time, as it scans the whole OreDictionary");
GT_Log.log.info("If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager.");
// GT_OreDictHandler.instance.activateHandler(); // FIXME change this
GT_OreDictHandler.instance.activateHandler();
GT_Log.log.info("Congratulations, you have been waiting long enough. Have a Cake.");
GT_Log.log.info("Adding Stone related Recipes");

View file

@ -143,11 +143,6 @@ public class GT_OreDictUnificator {
return GT_Utility.copyAmount(aAmount, sName2OreMap.get(aName.toString()), getFirstOre(aName, aAmount), aReplacement);
}
public static ItemStack[] setStackArray(boolean aUseBlackList, ItemStack... aStacks) {
for (int i = 0; i < aStacks.length; i++) aStacks[i] = get(aUseBlackList, GT_Utility.copy(aStacks[i]));
return aStacks;
}
public static ItemStack[] getStackArray(boolean aUseBlackList, Object... aStacks) {
ItemStack[] rStacks = new ItemStack[aStacks.length];
for (int i = 0; i < aStacks.length; i++) rStacks[i] = get(aUseBlackList, GT_Utility.copy((ItemStack)aStacks[i]));
@ -204,12 +199,8 @@ public class GT_OreDictUnificator {
return isItemStackInstanceOf(aStack, prefix.get(material));
}
public static boolean isItemStackInstanceOf(ItemStack aStack, Object aName) { // TODO rework all this class
public static boolean isItemStackInstanceOf(ItemStack aStack, Object aName) {
if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false;
// for (ItemStack tOreStack : getOres(aName.toString())) {
// if (GT_Utility.areStacksEqual(tOreStack, aStack, !tOreStack.hasTagCompound())) return true;
// }
List<String> names = Arrays.stream(OreDictionary.getOreIDs(aStack))
.mapToObj(val -> OreDictionary.getOreName(val))
.collect(Collectors.toList());
@ -242,7 +233,7 @@ public class GT_OreDictUnificator {
if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false;
String tName = aName.toString();
if (tName.equals("")) return false;
ArrayList<ItemStack> tList = getOres(tName);
List<ItemStack> tList = getOres(tName);
for (int i = 0; i < tList.size(); i++) if (GT_Utility.areStacksEqual(tList.get(i), aStack, true)) return false;
isRegisteringOre++;
OreDictionary.registerOre(tName, GT_Utility.copyAmount(1, aStack));
@ -258,7 +249,7 @@ public class GT_OreDictUnificator {
if (GT_Utility.isStringInvalid(aName) || GT_Utility.isStackInvalid(aStack)) return false;
String tName = aName.toString();
if (tName.equals("")) return false;
ArrayList<ItemStack> tList = getOres(tName);
List<ItemStack> tList = getOres(tName);
for (int i = 0; i < tList.size(); i++) if (GT_Utility.areStacksEqual(tList.get(i), aStack, true)) return false;
isRegisteringOre++;
sToRegister.put(GT_Utility.copyAmount(1, aStack), tName);
@ -277,16 +268,16 @@ public class GT_OreDictUnificator {
/**
* @return a Copy of the OreDictionary.getOres() List
*/
public static synchronized ArrayList<ItemStack> getOres(OrePrefixes aPrefix, Object aMaterial) {
public static List<ItemStack> getOres(OrePrefixes aPrefix, Materials aMaterial) {
return getOres(aPrefix.get(aMaterial));
}
/**
* @return a Copy of the OreDictionary.getOres() List
*/
public static synchronized ArrayList<ItemStack> getOres(Object aOreName) {
public static List<ItemStack> getOres(Object aOreName) {
String aName = aOreName==null?"":aOreName.toString();
ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
List<ItemStack> rList = new ArrayList<ItemStack>();
if (GT_Utility.isStringValid(aName)) rList.addAll(OreDictionary.getOres(aName));
return rList;
}

View file

@ -8,7 +8,6 @@ import gregtechmod.api.enums.GT_OreDictNames;
import gregtechmod.api.enums.GT_ToolDictNames;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.items.GT_MetaGenerated_Item;
import gregtechmod.api.util.GT_Log;
import gregtechmod.api.util.GT_ModHandler;
import gregtechmod.api.util.GT_OreDictUnificator;
@ -18,19 +17,17 @@ import gregtechmod.api.util.OreDictEntry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.util.Map;
import java.util.Map.Entry;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.ModContainer;
import cpw.mods.fml.common.ProgressManager;
import cpw.mods.fml.common.ProgressManager.ProgressBar;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge;
@ -41,7 +38,7 @@ import net.minecraftforge.oredict.OreDictionary.OreRegisterEvent;
public class GT_OreDictHandler {
public static final GT_OreDictHandler instance = new GT_OreDictHandler();
private final List<OreDictEntry> mEvents = new ArrayList<>();
private final Map<OrePrefixes, List<OreDictEntry>> mEvents = new HashMap<>();
private final List<String> mIgnoredItems = Arrays.asList(new String[]{"itemRawRubber", "itemSilicon", "itemBacon", "itemJetpackAccelerator", "itemLazurite", "itemIridium", "itemTear", "itemClaw", "itemFertilizer", "itemTar", "itemSlimeball", "itemCoke", "itemBeeswax", "itemBeeQueen", "itemForcicium", "itemForcillium", "itemRoyalJelly", "itemHoneydew", "itemHoney", "itemPollen", "itemReedTypha", "itemSulfuricAcid", "itemPotash", "itemCompressedCarbon", "itemBitumen", "itemBioFuel", "itemCokeSugar", "itemCokeCactus", "itemCharcoalSugar", "itemCharcoalCactus", "itemSludge", "itemEnrichedAlloy", "itemQuicksilver", "itemMercury", "itemOsmium", "itemUltimateCircuit", "itemEnergizedStar", "itemAntimatterMolecule", "itemAntimatterGlob", "itemCoal", "itemBoat", "itemHerbalMedicineCake", "itemCakeSponge", "itemFishandPumpkinCakeSponge", "itemSoulCleaver", "itemInstantCake", "itemWhippingCream", "itemGlisteningWhippingCream", "itemCleaver", "itemHerbalMedicineWhippingCream", "itemStrangeWhippingCream", "itemBlazeCleaver", "itemBakedCakeSponge", "itemMagmaCake", "itemGlisteningCake", "itemOgreCleaver", "itemFishandPumpkinCake", "itemMagmaWhippingCream", "itemMultimeter", "itemSuperconductor"});
private final List<String> mIgnoredNames = Arrays.asList(new String[]{"whiteStone", "stoneSlab", "clayBowl", "clayPlate", "ceramicBowl", "ceramicPlate", "ovenRack", "clayCup", "ceramicCup", "batteryBox", "transmutationStone", "torchRedstoneActive", "coal", "charcoal", "cloth", "cobblestoneSlab", "stoneBrickSlab", "cobblestoneWall", "stoneBrickWall", "cobblestoneStair", "stoneBrickStair", "blockCloud", "blockDirt", "blockTyrian", "blockCarpet", "blockFft", "blockLavastone", "blockHolystone", "blockConcrete", "sunnariumPart", "brSmallMachineCyaniteProcessor", "meteoriteCoal", "blockCobble", "pressOreProcessor", "crusherOreProcessor", "grinderOreProcessor", "blockRubber", "blockHoney", "blockHoneydew", "blockPeat", "blockRadioactive", "blockSlime", "blockCocoa", "blockSugarCane", "blockLeather", "blockClayBrick", "solarPanelHV", "cableRedNet", "stoneBowl", "crafterWood", "taintedSoil", "brickXyEngineering", "breederUranium", "wireMill", "chunkLazurite", "aluminumNatural", "aluminiumNatural", "naturalAluminum", "naturalAluminium", "antimatterMilligram", "antimatterGram", "strangeMatter", "coalGenerator", "electricFurnace", "unfinishedTank", "valvePart", "aquaRegia", "leatherSeal", "leatherSlimeSeal", "hambone", "slimeball", "enrichedUranium", "camoPaste"});
private final List<String> mInvalidNames = Arrays.asList(new String[]{"bloodstoneOre", "universalCable", "bronzeTube", "ironTube", "netherTube", "obbyTube", "infiniteBattery", "eliteBattery", "advancedBattery", "10kEUStore", "blueDye", "MonazitOre", "quartzCrystal", "whiteLuminiteCrystal", "darkStoneIngot", "invisiumIngot", "demoniteOrb", "enderGem", "starconiumGem", "osmoniumIngot", "tapaziteGem", "zectiumIngot", "foolsRubyGem", "rubyGem", "meteoriteGem", "adamiteShard", "sapphireGem", "copperIngot", "ironStick", "goldStick", "diamondStick", "reinforcedStick", "draconicStick", "emeraldStick", "copperStick", "tinStick", "silverStick", "bronzeStick", "steelStick", "leadStick", "manyullynStick", "arditeStick", "cobaltStick", "aluminiumStick", "alumiteStick", "oilsandsOre", "copperWire", "superconductorWire", "sulfuricAcid", "conveyorBelt", "ironWire", "aluminumWire", "aluminiumWire", "silverWire", "tinWire", "dustSiliconSmall", "AluminumOre", "plateHeavyT2", "blockWool", "alloyPlateEnergizedHardened", "gasWood", "alloyPlateEnergized", "SilverOre", "LeadOre", "TinOre", "CopperOre", "silverOre", "leadOre", "tinOre", "copperOre", "bauxiteOre", "HSLivingmetalIngot", "oilMoving", "oilStill", "oilBucket", "petroleumOre", "dieselFuel", "diamondNugget", "planks", "wood", "stick", "sticks", "naquadah", "obsidianRod", "stoneRod", "thaumiumRod", "steelRod", "netherrackRod", "woodRod", "ironRod", "cactusRod", "flintRod", "copperRod", "cobaltRod", "alumiteRod", "blueslimeRod", "arditeRod", "manyullynRod", "bronzeRod", "boneRod", "slimeRod"});
@ -393,9 +390,6 @@ public class GT_OreDictHandler {
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0));
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.BlueAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 1));
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.Brass, new ItemStack(aEvent.Ore.getItem(), 1, 2));
GregTech_API.sRecipeAdder.addWiremillRecipe(GT_ModHandler.getIC2Item("copperCableItem", 3L), new ItemStack(aEvent.Ore.getItem(), 1, 8), 400, 1);
GregTech_API.sRecipeAdder.addWiremillRecipe(GT_ModHandler.getIC2Item("ironCableItem", 6L), new ItemStack(aEvent.Ore.getItem(), 1, 9), 400, 2);
GregTech_API.sRecipeAdder.addCutterRecipe(new ItemStack(aEvent.Ore.getItem(), 1, 3), new ItemStack(aEvent.Ore.getItem(), 16, 4), 400, 8);
}
default: break;
}
@ -486,7 +480,10 @@ public class GT_OreDictHandler {
}
GT_Log.ore.println(e);
this.mEvents.add(OreDictEntry.create(aEvent.Ore, aOriginalMod, aEvent.Name));
List<OreDictEntry> list = mEvents.get(aPrefix);
list = list == null ? new ArrayList<>() : list;
list.add(OreDictEntry.create(aEvent.Ore, aOriginalMod, aEvent.Name));
this.mEvents.put(aPrefix, list);
if(this.mActivated) {
this.registerRecipes(aEvent, aOriginalMod);
}
@ -517,28 +514,25 @@ public class GT_OreDictHandler {
public void activateHandler() {
mActivated = true;
long time = System.currentTimeMillis();
GT_Log.log.info("Splitting tasks");
Multimap<OrePrefixes, OreDictEntry> tasks = this.splitTasks();
ExecutorService service = Executors.newFixedThreadPool(4, new ThreadFactoryBuilder().setDaemon(true).setNameFormat("GT-OreDictHandler-%d").build());
ProgressBar bar = ProgressManager.push("Handling OreDict", tasks.keySet().size(), false);
for (OrePrefixes prefix : tasks.keySet()) {
service.submit(() -> {
try {
this.processTask(prefix, new ArrayList<>(tasks.get(prefix)));
bar.step("prefix: " + prefix.toString());
} catch (Throwable e) {
bar.step("ERRORRED");
GT_Log.log.throwing(e);
}
});
}
ProgressBar bar = ProgressManager.push("Handling OreDict", mEvents.keySet().size(), false);
service.shutdown();
while (!service.isTerminated()) {
try {
Thread.sleep(100);
} catch (InterruptedException e) {}
for (Entry<OrePrefixes, List<OreDictEntry>> e : mEvents.entrySet()) {
bar.step("prefix - " + e.getKey());
if (e.getKey() != null) {
this.processTask(e.getKey(), e.getValue());
} else {
StringBuilder app = new StringBuilder();
app.append("Thingy Name: ");
app.append(":");
app.append(e.getValue());
app.append(" !!!Unknown 'Thingy' detected!!! ");
app.append("This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. ");
app.append("Please report to GregTech Intergalactical for additional compatiblity. ");
app.append("This is not an Error, it's just an Information.");
GT_Log.log.warn(app.toString());
}
}
ProgressManager.pop(bar);
@ -561,30 +555,6 @@ public class GT_OreDictHandler {
}
}
private Multimap<OrePrefixes, OreDictEntry> splitTasks() {
Multimap<OrePrefixes, OreDictEntry> tasks = ArrayListMultimap.create();
for (OreDictEntry entry : mEvents) {
OrePrefixes prefix = OrePrefixes.getOrePrefix(entry.oreDictName);
if (prefix != null) {
tasks.put(prefix, entry);
} else {
StringBuilder app = new StringBuilder();
app.append("Thingy Name: ");
app.append(entry.modName);
app.append(":");
app.append(entry.oreDictName);
app.append(" !!!Unknown 'Thingy' detected!!! ");
app.append("This Object seems to probably not follow a valid OreDictionary Convention, or I missed a Convention. ");
app.append("Please report to GregTech Intergalactical for additional compatiblity. ");
app.append("This is not an Error, it's just an Information.");
GT_Log.log.warn(app.toString());
}
}
return tasks;
}
public void registerRecipes(final OreDictionary.OreRegisterEvent aEvent, final String aMod) {
if (aEvent.Ore == null || aEvent.Ore.getItem() == null) {
return;
@ -609,34 +579,20 @@ public class GT_OreDictHandler {
GregTech_API.sUnification.mConfig.save();
GregTech_API.sUnification.mConfig.load();
for (OreDictEntry tEvent : this.mEvents) {
if (tEvent.ore.getItem() instanceof GT_MetaGenerated_Item) {
final OrePrefixes tPrefix = OrePrefixes.getOrePrefix(tEvent.oreDictName);
if (tPrefix == null || !tPrefix.mIsUnificatable) {
for (Entry<OrePrefixes, List<OreDictEntry>> e : mEvents.entrySet()) {
if (e.getKey() == null || !e.getKey().mIsUnificatable) {
continue;
}
for (OreDictEntry entry : e.getValue()) {
GT_OreDictUnificator.addAssociation(entry.oreDictName, entry.ore);
if (GT_OreDictUnificator.isBlacklisted(entry.ore)) {
continue;
}
GT_OreDictUnificator.addAssociation(tEvent.oreDictName, tEvent.ore);
if (GT_OreDictUnificator.isBlacklisted(tEvent.ore)) {
continue;
}
if (!tEvent.modName.equals("UNKNOWN_MOD_ID") && GregTech_API.sUnification.get(GT_ConfigCategories.specialunificationtargets + "." + tEvent.modName, tEvent.oreDictName, false)) {
GT_OreDictUnificator.set(tEvent.oreDictName, tEvent.ore, true, true);
if (!entry.modName.equals("UNKNOWN_MOD_ID") && GregTech_API.sUnification.get(GT_ConfigCategories.specialunificationtargets + "." + entry.modName, entry.oreDictName, false)) {
GT_OreDictUnificator.set(entry.oreDictName, entry.ore, true, true);
} else {
GT_OreDictUnificator.set(tEvent.oreDictName, tEvent.ore, false, true);
}
} else {
final OrePrefixes tPrefix = OrePrefixes.getOrePrefix(tEvent.oreDictName);
if (tPrefix == null || !tPrefix.mIsUnificatable) {
continue;
}
GT_OreDictUnificator.addAssociation(tEvent.oreDictName, tEvent.ore);
if (GT_OreDictUnificator.isBlacklisted(tEvent.ore)) {
continue;
}
if (!tEvent.modName.equals("UNKNOWN_MOD_ID") && GregTech_API.sUnification.get(GT_ConfigCategories.specialunificationtargets + "." + tEvent.modName, tEvent.oreDictName, false)) {
GT_OreDictUnificator.set(tEvent.oreDictName, tEvent.ore, true, true);
} else {
GT_OreDictUnificator.set(tEvent.oreDictName, tEvent.ore, false, true);
GT_OreDictUnificator.set(entry.oreDictName, entry.ore, false, true);
}
}
}

View file

@ -1,6 +1,5 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.enums.GT_Items;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
@ -8,6 +7,8 @@ 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.common.recipe.RecipeMaps;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@ -16,57 +17,57 @@ import net.minecraft.item.ItemStack;
public class ProcessingStone implements IOreRecipeRegistrator {
public ProcessingStone() {
OrePrefixes.stone.add((IOreRecipeRegistrator)this);
OrePrefixes.stone.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
Block aBlock = Block.getBlockFromItem(aStack.getItem());
switch(aMaterial) {
case Sand:
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.sand, 1, 0), (ItemStack)null, 10, false);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), new ItemStack(Blocks.sand, 1, 0), null, 10, false);
break;
case Endstone:
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), GT_Items.Cell_Water.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Endstone, 16L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, (Object)Materials.Tungsten, 1L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, (Object)Materials.Endstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, (Object)Materials.Tungsten, 1L), 5, false);
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(GT_Utility.copyAmount(16L, aStack)).input(GT_ModHandler.getWater(1000)).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Endstone, 16L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 1L)).buildAndRegister();
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 1L), 5, false);
break;
case Netherrack:
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), GT_Items.Cell_Water.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Netherrack, 16L), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Gold, 1L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.cell, (Object)Materials.Mercury, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Netherrack, 8L), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Gold, 5L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, (Object)Materials.Netherrack, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Gold, 1L), 5, false);
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(GT_Utility.copyAmount(16L, aStack)).input(GT_ModHandler.getWater(1000)).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 16L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L)).buildAndRegister();
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(GT_Utility.copyAmount(16L, aStack)).input(OrePrefixes.cell, Materials.Mercury).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 8L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 5L), GT_Items.Cell_Empty.get(1)).buildAndRegister();
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5, false);
break;
case NetherBrick:
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_Items.Cell_Water.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Netherrack, 16L), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Gold, 1L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.cell, (Object)Materials.Mercury, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Netherrack, 8L), GT_OreDictUnificator.get(OrePrefixes.nugget, (Object)Materials.Gold, 5L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
RecipeMaps.GRINDER.factory().EUt(120).duration(8 * 100).input(GT_Utility.copyAmount(8, aStack)).input(GT_ModHandler.getWater(1000)).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 16L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L)).buildAndRegister();
RecipeMaps.GRINDER.factory().EUt(120).duration(8 * 100).input(GT_Utility.copyAmount(8, aStack)).input(OrePrefixes.cell, Materials.Mercury).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Netherrack, 8L), GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 5L), GT_Items.Cell_Empty.get(1)).buildAndRegister();
break;
case Obsidian:
if(aBlock != null) {
aBlock.setResistance(20.0F);
}
GregTech_API.sRecipeAdder.addAssemblerRecipe(GT_Items.IC2_Compressed_Coal_Ball.get(8L, new Object[0]), GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.IC2_Compressed_Coal_Chunk.get(1L, new Object[0]), 400, 4);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getRCItem("cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), 10, true);
GregTech_API.sRecipeAdder.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, (Object)aMaterial, 1L), 200, 32);
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400).inputs(GT_Items.IC2_Compressed_Coal_Ball.get(8), GT_Utility.copyAmount(1L, aStack)).output(GT_Items.IC2_Compressed_Coal_Chunk.get(1)).buildAndRegister();
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_ModHandler.getRCItem("cube.crushed.obsidian", 1L, GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, true);
RecipeMaps.CUTTING.factory().EUt(32).duration(200).input(GT_Utility.copyAmount(1L, aStack)).output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)).buildAndRegister();
break;
case Redrock:
case Marble:
case Basalt:
case Quartzite:
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 1L), 10, false);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10, false);
break;
case Flint:
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, (Object)aMaterial, 2L), new ItemStack(Items.flint, 1), 50, false);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), new ItemStack(Items.flint, 1), 50, false);
break;
case GraniteBlack:
GregTech_API.sRecipeAdder.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateAlloy, (Object)Materials.Advanced, 1L), GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_ModHandler.getIC2Item("reinforcedStone", 8L), 400, 4);
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), GT_Items.Cell_Water.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 16L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, (Object)Materials.Thorium, 1L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
GregTech_API.sRecipeAdder.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, (Object)aMaterial, 1L), 200, 32);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)Materials.Thorium, 1L), 1, false);
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400).inputs(GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 1L), GT_Utility.copyAmount(8L, aStack)).output(GT_ModHandler.getIC2Item("reinforcedStone", 8L)).buildAndRegister();
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(GT_Utility.copyAmount(16, aStack)).input(GT_ModHandler.getWater(1000)).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Thorium, 1L)).buildAndRegister();
RecipeMaps.CUTTING.factory().EUt(32).duration(200).input(GT_Utility.copyAmount(1L, aStack)).output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)).buildAndRegister();
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Thorium, 1L), 1, false);
break;
case GraniteRed:
GregTech_API.sRecipeAdder.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateAlloy, (Object)Materials.Advanced, 1L), GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_ModHandler.getIC2Item("reinforcedStone", 8L), 400, 4);
GregTech_API.sRecipeAdder.addGrinderRecipe(GT_Utility.copyAmount(16L, new Object[]{aStack}), GT_Items.Cell_Water.get(1L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.dust, (Object)aMaterial, 16L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, (Object)Materials.Uranium, 1L), (ItemStack)null, GT_Items.Cell_Empty.get(1L, new Object[0]));
GregTech_API.sRecipeAdder.addCutterRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.plate, (Object)aMaterial, 1L), 200, 32);
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dustImpure, (Object)aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, (Object)Materials.Uranium, 1L), 1, false);
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400).inputs(GT_OreDictUnificator.get(OrePrefixes.plateAlloy, Materials.Advanced, 1L), GT_Utility.copyAmount(8L, aStack)).output(GT_ModHandler.getIC2Item("reinforcedStone", 8L)).buildAndRegister();
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(GT_Utility.copyAmount(16, aStack)).input(GT_ModHandler.getWater(1000)).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 16L), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L)).buildAndRegister();
RecipeMaps.CUTTING.factory().EUt(32).duration(200).input(GT_Utility.copyAmount(1L, aStack)).output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)).buildAndRegister();
GT_ModHandler.addPulverisationRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L), GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Uranium, 1L), 1, false);
default: break;
}
}

View file

@ -1,21 +1,21 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
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.common.recipe.RecipeMaps;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
public class ProcessingStoneCobble implements IOreRecipeRegistrator {
public ProcessingStoneCobble() {
OrePrefixes.stoneCobble.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneCobble.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
GregTech_API.sRecipeAdder.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.stick, (Object)Materials.Wood, 1L), new ItemStack(Blocks.lever, 1), 400, 1);
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(400).input(OrePrefixes.stick, Materials.Wood).input(GT_Utility.copyAmount(1L, aStack)).output(new ItemStack(Blocks.lever, 1)).buildAndRegister();
}
}

View file

@ -11,21 +11,20 @@ import net.minecraft.item.ItemStack;
public class ProcessingStoneVarious implements IOreRecipeRegistrator {
public ProcessingStoneVarious() {
OrePrefixes.stone.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneCobble.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneBricks.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneChiseled.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneCracked.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneMossy.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneMossyBricks.add((IOreRecipeRegistrator)this);
OrePrefixes.stoneSmooth.add((IOreRecipeRegistrator)this);
OrePrefixes.stone.add(this);
OrePrefixes.stoneCobble.add(this);
OrePrefixes.stoneBricks.add(this);
OrePrefixes.stoneChiseled.add(this);
OrePrefixes.stoneCracked.add(this);
OrePrefixes.stoneMossy.add(this);
OrePrefixes.stoneMossyBricks.add(this);
OrePrefixes.stoneSmooth.add(this);
}
@SuppressWarnings("deprecation")
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
Block aBlock = Block.getBlockFromItem(aStack.getItem());
if(aBlock != null) {
if(aStack.getItem().getItemStackLimit() > GT_Mod.sBlockStackSize) {
if(aStack.getMaxStackSize() > GT_Mod.sBlockStackSize) {
aStack.getItem().setMaxStackSize(GT_Mod.sBlockStackSize);
}

View file

@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadAxe implements IOreRecipeRegistrator {
public ProcessingToolHeadAxe() {
OrePrefixes.toolHeadAxe.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadAxe.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"PIH", "P ", "F ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"PIH", "P ", "F ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}

View file

@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadFile implements IOreRecipeRegistrator {
public ProcessingToolHeadFile() {
OrePrefixes.toolHeadFile.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadFile.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"PF ", "PH ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"PF ", "PH ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}

View file

@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadHammer implements IOreRecipeRegistrator {
public ProcessingToolHeadHammer() {
OrePrefixes.toolHeadHammer.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadHammer.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"II ", "IIH", "II ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"II ", "IIH", "II ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}

View file

@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadHoe implements IOreRecipeRegistrator {
public ProcessingToolHeadHoe() {
OrePrefixes.toolHeadHoe.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadHoe.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"PIH", "F ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"PIH", "F ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}

View file

@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadPickaxe implements IOreRecipeRegistrator {
public ProcessingToolHeadPickaxe() {
OrePrefixes.toolHeadPickaxe.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadPickaxe.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"PII", "F H", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"PII", "F H", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}

View file

@ -12,12 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadSaw implements IOreRecipeRegistrator {
public ProcessingToolHeadSaw() {
OrePrefixes.toolHeadSaw.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadSaw.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"PP ", "FH ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"PP ", "FH ", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}

View file

@ -12,13 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadShovel implements IOreRecipeRegistrator {
public ProcessingToolHeadShovel() {
OrePrefixes.toolHeadShovel.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadShovel.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{"FPH", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, aStack), false, true, new Object[]{"FPH", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
}
}
}

View file

@ -12,13 +12,12 @@ import net.minecraft.item.ItemStack;
public class ProcessingToolHeadSword implements IOreRecipeRegistrator {
public ProcessingToolHeadSword() {
OrePrefixes.toolHeadSword.add((IOreRecipeRegistrator)this);
OrePrefixes.toolHeadSword.add(this);
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(!aMaterial.contains(SubTag.NO_SMASHING)) {
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), false, true, new Object[]{" P ", "FPH", Character.valueOf('P'), OrePrefixes.plate.get(aMaterial), Character.valueOf('I'), OrePrefixes.ingot.get(aMaterial), Character.valueOf('H'), GT_ToolDictNames.craftingToolHardHammer, Character.valueOf('F'), GT_ToolDictNames.craftingToolFile});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack), false, true, new Object[]{" P ", "FPH", 'P', OrePrefixes.plate.get(aMaterial), 'I', OrePrefixes.ingot.get(aMaterial), 'H', GT_ToolDictNames.craftingToolHardHammer, 'F', GT_ToolDictNames.craftingToolFile});
}
}
}

View file

@ -1,10 +1,11 @@
package gregtechmod.loaders.oreprocessing;
import gregtechmod.api.GregTech_API;
import gregtechmod.api.enums.Materials;
import gregtechmod.api.enums.OrePrefixes;
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
import gregtechmod.api.util.GT_Utility;
import gregtechmod.common.recipe.RecipeMaps;
import net.minecraft.item.ItemStack;
public class ProcessingWax implements IOreRecipeRegistrator {
@ -15,8 +16,7 @@ public class ProcessingWax implements IOreRecipeRegistrator {
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
if(aOreDictName.equals("waxMagical")) {
GregTech_API.sRecipeAdder.addFuel(GT_Utility.copyAmount(1L, new Object[]{aStack}), (ItemStack)null, 6, 5);
RecipeMaps.MAGIC_FUELS.factory().EUt(6).duration(1).input(GT_Utility.copyAmount(1L, aStack)).buildAndRegister();
}
}
}

View file

@ -62,50 +62,50 @@ public class GT_OreProcessingLoader implements Runnable {
public void run() {
GT_Log.log.info("GT_Mod: Register Ore processing.");
new ProcessingBattery();
new ProcessingBlock();
new ProcessingBolt();
new ProcessingCell();
new ProcessingCellPlasma();
new ProcessingCircuit();
new ProcessingCrafting();
new ProcessingCrushed();
new ProcessingCrushedPurified();
new ProcessingCrushedCentrifuged();
new ProcessingDust();
new ProcessingDustImpure();
new ProcessingDustSmall();
new ProcessingDustTiny();
new ProcessingDye();
new ProcessingShaping();
new ProcessingGem();
new ProcessingGear();
new ProcessingIngot1();
new ProcessingIngot2();
new ProcessingIngot3();
new ProcessingIngot4();
new ProcessingIngot5();
new ProcessingIngotHot();
new ProcessingItem();
new ProcessingLeaves();
new ProcessingLog();
new ProcessingNugget();
new ProcessingOre();
new ProcessingOreSmelting();
new ProcessingPlank();
new ProcessingPlate1();
new ProcessingPlate2();
new ProcessingPlate3();
new ProcessingPlate4();
new ProcessingPlate5();
new ProcessingPlate9();
new ProcessingPlateAlloy();
new ProcessingRecycling();
new ProcessingRing();
new ProcessingSand();
new ProcessingSaplings();
new ProcessingSlab();
new ProcessingStick();
// new ProcessingBattery();
// new ProcessingBlock();
// new ProcessingBolt();
// new ProcessingCell();
// new ProcessingCellPlasma();
// new ProcessingCircuit();
// new ProcessingCrafting();
// new ProcessingCrushed();
// new ProcessingCrushedPurified();
// new ProcessingCrushedCentrifuged();
// new ProcessingDust();
// new ProcessingDustImpure();
// new ProcessingDustSmall();
// new ProcessingDustTiny();
// new ProcessingDye();
// new ProcessingShaping();
// new ProcessingGem();
// new ProcessingGear();
// new ProcessingIngot1();
// new ProcessingIngot2();
// new ProcessingIngot3();
// new ProcessingIngot4();
// new ProcessingIngot5();
// new ProcessingIngotHot();
// new ProcessingItem();
// new ProcessingLeaves();
// new ProcessingLog();
// new ProcessingNugget();
// new ProcessingOre();
// new ProcessingOreSmelting();
// new ProcessingPlank();
// new ProcessingPlate1();
// new ProcessingPlate2();
// new ProcessingPlate3();
// new ProcessingPlate4();
// new ProcessingPlate5();
// new ProcessingPlate9();
// new ProcessingPlateAlloy();
// new ProcessingRecycling();
// new ProcessingRing();
// new ProcessingSand();
// new ProcessingSaplings();
// new ProcessingSlab();
// new ProcessingStick();
new ProcessingStone();
new ProcessingStoneCobble();
new ProcessingStoneVarious();

View file

@ -69,6 +69,16 @@ public class GrinderRecipeHandler extends GT_RecipeHandler {
protected Pair<Integer, Integer> getOutputAligment(int itemIdx) {
return Pair.of(86 - sOffsetX + (18 * itemIdx), 25 - sOffsetY);
}
@Override
protected Pair<Integer, Integer> getFluidInputAligment(int itemIdx) {
return Pair.of(34 - sOffsetX, 34 - sOffsetY + (18 * itemIdx));
}
@Override
protected Pair<Integer, Integer> getFluidOutputAligment(int itemIdx) {
return Pair.of(86 - sOffsetX + (18 * itemIdx), 25 - sOffsetY);
}
};
}