parent
85a5fcc1b4
commit
e9e329af14
3 changed files with 139 additions and 106 deletions
|
@ -18,173 +18,120 @@ public class ProcessingShaping implements IOreRecipeRegistrator {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
|
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
|
||||||
if(GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, 1L) != null && !aMaterial.contains(SubTag.NO_SMELTING)) {
|
if(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null && !aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||||
int tAmount = (int)(aPrefix.mMaterialAmount / 3628800L);
|
int tAmount = (int)(aPrefix.mMaterialAmount / GregTech_API.MATERIAL_UNIT);
|
||||||
if(tAmount > 0 && tAmount <= 64 && aPrefix.mMaterialAmount % 3628800L == 0L) {
|
if(tAmount > 0 && tAmount <= 64 && aPrefix.mMaterialAmount % GregTech_API.MATERIAL_UNIT == 0L) {
|
||||||
if(!OrePrefixes.block.isIgnored(aMaterial)) {
|
if(!OrePrefixes.block.isIgnored(aMaterial)) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(9L, new Object[]{aStack}), GT_Items.Shape_Extruder_Block.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.block, (Object)aMaterial, (long)tAmount), 10 * tAmount, 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(9, aStack), GT_Items.Shape_Extruder_Block.get(0), GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, tAmount), 10 * tAmount, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Pipe_Small.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, (Object)aMaterial, (long)tAmount), 8 * tAmount, 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Pipe_Small.get(0), GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, tAmount), 8 * tAmount, 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), GT_Items.Shape_Extruder_Pipe_Medium.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, (Object)aMaterial, (long)tAmount), 24 * tAmount, 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(3, aStack), GT_Items.Shape_Extruder_Pipe_Medium.get(0), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, tAmount), 24 * tAmount, 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), GT_Items.Shape_Extruder_Pipe_Large.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, (Object)aMaterial, (long)tAmount), 48 * tAmount, 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(6, aStack), GT_Items.Shape_Extruder_Pipe_Large.get(0), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, tAmount), 48 * tAmount, 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Ingot.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.ingot, (Object)aMaterial, (long)tAmount), 10, 80);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Ingot.get(0), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, tAmount), 10, 80);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Plate.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 1 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Plate.get(0), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, tAmount), Math.max(aMaterial.getMass() * 1 * tAmount, tAmount), 128);
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Rod.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.stick, (Object)aMaterial, (long)(tAmount * 2)), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 96);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Rod.get(0), GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, (tAmount * 2)), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 96);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 8 <= 64) {
|
if(tAmount * 8 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Bolt.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.bolt, (Object)aMaterial, (long)(tAmount * 8)), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Bolt.get(0), GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, (tAmount * 8)), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 4 <= 64) {
|
if(tAmount * 4 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Ring.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.ring, (Object)aMaterial, (long)(tAmount * 4)), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 96);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Ring.get(0), GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, (tAmount * 4)), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 96);
|
||||||
}
|
}
|
||||||
|
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Extruder_Sword.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Extruder_Sword.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), GT_Items.Shape_Extruder_Pickaxe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 3 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(3, aStack), GT_Items.Shape_Extruder_Pickaxe.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, tAmount), Math.max(aMaterial.getMass() * 3 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Shovel.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 1 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Shovel.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, tAmount), Math.max(aMaterial.getMass() * 1 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(3L, new Object[]{aStack}), GT_Items.Shape_Extruder_Axe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 3 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(3, aStack), GT_Items.Shape_Extruder_Axe.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, tAmount), Math.max(aMaterial.getMass() * 3 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Extruder_Hoe.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Extruder_Hoe.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(6L, new Object[]{aStack}), GT_Items.Shape_Extruder_Hammer.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 6 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(6, aStack), GT_Items.Shape_Extruder_Hammer.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, tAmount), Math.max(aMaterial.getMass() * 6 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Extruder_File.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Extruder_File.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial, tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Extruder_Saw.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Extruder_Saw.get(0), GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(4L, new Object[]{aStack}), GT_Items.Shape_Extruder_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGt, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 5 * tAmount, tAmount), 128);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(4, aStack), GT_Items.Shape_Extruder_Gear.get(0), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, tAmount), Math.max(aMaterial.getMass() * 5 * tAmount, tAmount), 128);
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Plate.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.plate, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 32);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Plate.get(0), GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, tAmount), Math.max(aMaterial.getMass() * 2 * tAmount, tAmount), 32);
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(8L, new Object[]{aStack}), GT_Items.Shape_Mold_Gear.get(0L, new Object[0]), GT_OreDictUnificator.get(OrePrefixes.gearGt, (Object)aMaterial, (long)tAmount), Math.max(aMaterial.getMass() * 10 * tAmount, tAmount), 32);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(8, aStack), GT_Items.Shape_Mold_Gear.get(0), GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, tAmount), Math.max(aMaterial.getMass() * 10 * tAmount, tAmount), 32);
|
||||||
switch(ProcessingShaping.NamelessClass1439261823.$SwitchMap$gregtechmod$api$enums$Materials[aMaterial.ordinal()]) {
|
switch(aMaterial) {
|
||||||
case 1:
|
case Iron:
|
||||||
if(tAmount * 6 <= 64) {
|
if(tAmount * 6 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Wire.get(0L, new Object[0]), GT_ModHandler.getIC2Item("ironCableItem", (long)(tAmount * 6)), tAmount * 8, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Wire.get(0), GT_ModHandler.getIC2Item("ironCableItem", (tAmount * 6)), tAmount * 8, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Cell.get(0L, new Object[0]), GT_ModHandler.getIC2Item("fuelRod", (long)tAmount), tAmount * 32, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Cell.get(0), GT_ModHandler.getIC2Item("fuelRod", tAmount), tAmount * 32, 64);
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingiron", (long)(tAmount * 2)), tAmount * 32, 48);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Casing.get(0), GT_ModHandler.getIC2Item("casingiron", (tAmount * 2)), tAmount * 32, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingiron", (long)(tAmount * 3)), tAmount * 128, 12);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Casing.get(0), GT_ModHandler.getIC2Item("casingiron", (tAmount * 3)), tAmount * 128, 12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case Tin:
|
||||||
if(tAmount * 4 <= 64) {
|
if(tAmount * 4 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Wire.get(0L, new Object[0]), GT_ModHandler.getIC2Item("tinCableItem", (long)(tAmount * 4)), tAmount * 3, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Wire.get(0), GT_ModHandler.getIC2Item("tinCableItem", (tAmount * 4)), tAmount * 3, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Extruder_Cell.get(0L, new Object[0]), GT_Items.Cell_Empty.get((long)tAmount, new Object[0]), tAmount * 32, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Extruder_Cell.get(0), GT_Items.Cell_Empty.get(tAmount), tAmount * 32, 64);
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingtin", (long)(tAmount * 2)), tAmount * 32, 48);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Casing.get(0), GT_ModHandler.getIC2Item("casingtin", (tAmount * 2)), tAmount * 32, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingtin", (long)(tAmount * 3)), tAmount * 128, 12);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Casing.get(0), GT_ModHandler.getIC2Item("casingtin", (tAmount * 3)), tAmount * 128, 12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case SolderingAlloy:
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Wire.get(0L, new Object[0]), GT_Items.Tool_SolderingMaterial_Tin.get((long)tAmount, new Object[0]), tAmount * 8, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Wire.get(0), GT_Items.Tool_SolderingMaterial_Tin.get(tAmount), tAmount * 8, 64);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case Lead:
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Wire.get(0L, new Object[0]), GT_Items.Tool_SolderingMaterial_Lead.get((long)tAmount, new Object[0]), tAmount * 8, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Wire.get(0), GT_Items.Tool_SolderingMaterial_Lead.get(tAmount), tAmount * 8, 64);
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinglead", (long)(tAmount * 2)), tAmount * 32, 48);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Casing.get(0), GT_ModHandler.getIC2Item("casinglead", (tAmount * 2)), tAmount * 32, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinglead", (long)(tAmount * 3)), tAmount * 128, 12);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Casing.get(0), GT_ModHandler.getIC2Item("casinglead", (tAmount * 3)), tAmount * 128, 12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case Copper:
|
||||||
if(tAmount * 3 <= 64) {
|
if(tAmount * 3 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Wire.get(0L, new Object[0]), GT_ModHandler.getIC2Item("copperCableItem", (long)(tAmount * 3)), tAmount * 4, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Wire.get(0), GT_ModHandler.getIC2Item("copperCableItem", (tAmount * 3)), tAmount * 4, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingcopper", (long)(tAmount * 2)), tAmount * 32, 48);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Casing.get(0), GT_ModHandler.getIC2Item("casingcopper", (tAmount * 2)), tAmount * 32, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingcopper", (long)(tAmount * 3)), tAmount * 128, 12);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Casing.get(0), GT_ModHandler.getIC2Item("casingcopper", (tAmount * 3)), tAmount * 128, 12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 6:
|
case Bronze:
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingbronze", (long)(tAmount * 2)), tAmount * 32, 48);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Casing.get(0), GT_ModHandler.getIC2Item("casingbronze", (tAmount * 2)), tAmount * 32, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casingbronze", (long)(tAmount * 3)), tAmount * 128, 12);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Casing.get(0), GT_ModHandler.getIC2Item("casingbronze", (tAmount * 3)), tAmount * 128, 12);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case Gold:
|
||||||
if(tAmount * 6 <= 64) {
|
if(tAmount * 6 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Wire.get(0L, new Object[0]), GT_ModHandler.getIC2Item("goldCableItem", (long)(tAmount * 6)), tAmount * 4, 64);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Wire.get(0), GT_ModHandler.getIC2Item("goldCableItem", (tAmount * 6)), tAmount * 4, 64);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_Items.Shape_Extruder_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinggold", (long)(tAmount * 2)), tAmount * 32, 48);
|
GregTech_API.sRecipeAdder.addExtruderRecipe(GT_Utility.copyAmount(1, aStack), GT_Items.Shape_Extruder_Casing.get(0), GT_ModHandler.getIC2Item("casinggold", (tAmount * 2)), tAmount * 32, 48);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tAmount * 2 <= 64) {
|
if(tAmount * 2 <= 64) {
|
||||||
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2L, new Object[]{aStack}), GT_Items.Shape_Mold_Casing.get(0L, new Object[0]), GT_ModHandler.getIC2Item("casinggold", (long)(tAmount * 3)), tAmount * 128, 12);
|
GregTech_API.sRecipeAdder.addAlloySmelterRecipe(GT_Utility.copyAmount(2, aStack), GT_Items.Shape_Mold_Casing.get(0), GT_ModHandler.getIC2Item("casinggold", (tAmount * 3)), tAmount * 128, 12);
|
||||||
}
|
}
|
||||||
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// $FF: synthetic class
|
|
||||||
static class NamelessClass1439261823 {
|
|
||||||
|
|
||||||
// $FF: synthetic field
|
|
||||||
static final int[] $SwitchMap$gregtechmod$api$enums$Materials = new int[Materials.values().length];
|
|
||||||
|
|
||||||
|
|
||||||
static {
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Iron.ordinal()] = 1;
|
|
||||||
} catch (NoSuchFieldError var7) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Tin.ordinal()] = 2;
|
|
||||||
} catch (NoSuchFieldError var6) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.SolderingAlloy.ordinal()] = 3;
|
|
||||||
} catch (NoSuchFieldError var5) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Lead.ordinal()] = 4;
|
|
||||||
} catch (NoSuchFieldError var4) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Copper.ordinal()] = 5;
|
|
||||||
} catch (NoSuchFieldError var3) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Bronze.ordinal()] = 6;
|
|
||||||
} catch (NoSuchFieldError var2) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
$SwitchMap$gregtechmod$api$enums$Materials[Materials.Gold.ordinal()] = 7;
|
|
||||||
} catch (NoSuchFieldError var1) {
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,85 @@
|
||||||
|
package gregtechmod.mistaqur.nei;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.awt.Rectangle;
|
||||||
|
import codechicken.nei.PositionedStack;
|
||||||
|
import gregtechmod.api.GregTech_API;
|
||||||
|
import gregtechmod.api.util.GT_Log;
|
||||||
|
import gregtechmod.api.util.GT_Recipe;
|
||||||
|
import gregtechmod.api.util.GT_Utility;
|
||||||
|
import gregtechmod.common.gui.GT_GUIContainer_BasicMachine_Extruder;
|
||||||
|
|
||||||
|
public class ExtruderRecipeHandler extends GT_RecipeHandler {
|
||||||
|
public void loadTransferRects() {
|
||||||
|
try {
|
||||||
|
this.transferRects.add(new RecipeTransferRect(new Rectangle(70 - GT_RecipeHandler.sOffsetX, 24 - GT_RecipeHandler.sOffsetY, 36, 18),this.getRecipeId()));
|
||||||
|
RecipeTransferRectHandler.registerRectsToGuis(Collections.singletonList(GT_GUIContainer_BasicMachine_Extruder.class),
|
||||||
|
Collections.singletonList(new RecipeTransferRect(new Rectangle(65, 13, 36, 18), this.getRecipeId())));
|
||||||
|
} catch (Throwable e) {
|
||||||
|
GT_Log.log.catching(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecipeName() {
|
||||||
|
return "Extruder";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getRecipeId() {
|
||||||
|
return "gregtech.Extruder";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getGuiTexture() {
|
||||||
|
return GregTech_API.GUI_PATH + "NEIExtruder.png";
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOverlayIdentifier() {
|
||||||
|
return "gregtech.extruder";
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<GT_Recipe> getRecipeList() {
|
||||||
|
return GT_Recipe.sExtruderRecipes;
|
||||||
|
}
|
||||||
|
|
||||||
|
public GT_RecipeHandler.CachedGT_Recipe getRecipe(GT_Recipe irecipe) {
|
||||||
|
return new CachedExtruderRecipe(irecipe);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawExtras(int recipe) {
|
||||||
|
Integer time = Integer.valueOf(((CachedExtruderRecipe) this.arecipes.get(recipe)).mDuration);
|
||||||
|
drawText(30, 80, "EU: " + GT_Utility.parseNumberToString(time.intValue() * ((CachedExtruderRecipe) this.arecipes.get(recipe)).mEUt), 0xFF000000, false);
|
||||||
|
drawText(30, 90, "Time: " + GT_Utility.parseNumberToString(time.intValue() / 20) + " secs", 0xFF000000, false);
|
||||||
|
drawText(30, 100, "MaxEnergy: " + GT_Utility.parseNumberToString(((CachedExtruderRecipe) this.arecipes.get(recipe)).mEUt) + " EU/t", 0xFF000000, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CachedExtruderRecipe extends GT_RecipeHandler.CachedGT_Recipe {
|
||||||
|
|
||||||
|
public int mDuration;
|
||||||
|
public int mEUt;
|
||||||
|
|
||||||
|
public CachedExtruderRecipe(GT_Recipe aRecipe) {
|
||||||
|
super();
|
||||||
|
super.resources = new ArrayList<>();
|
||||||
|
if (aRecipe.getRepresentativeInput1() != null) {
|
||||||
|
super.resources.add(new PositionedStack(aRecipe.getRepresentativeInput1(),
|
||||||
|
35 - GT_RecipeHandler.sOffsetX, 25 - GT_RecipeHandler.sOffsetY));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aRecipe.getRepresentativeInput2() != null) {
|
||||||
|
super.resources.add(new PositionedStack(aRecipe.getRepresentativeInput2(),
|
||||||
|
53 - GT_RecipeHandler.sOffsetX, 25 - GT_RecipeHandler.sOffsetY));
|
||||||
|
}
|
||||||
|
|
||||||
|
super.products = new ArrayList<>();
|
||||||
|
if (aRecipe.getOutput(0) != null) {
|
||||||
|
super.products.add(new PositionedStack(aRecipe.getOutput(0), 107 - GT_RecipeHandler.sOffsetX,
|
||||||
|
25 - GT_RecipeHandler.sOffsetY));
|
||||||
|
}
|
||||||
|
|
||||||
|
this.mDuration = aRecipe.mDuration;
|
||||||
|
this.mEUt = aRecipe.mEUt;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -29,8 +29,9 @@ public class NEI_GregTech_Config implements IConfigureNEI {
|
||||||
new AssemblerRecipeHandler();
|
new AssemblerRecipeHandler();
|
||||||
new LatheRecipeHandler();
|
new LatheRecipeHandler();
|
||||||
new CutterRecipeHandler();
|
new CutterRecipeHandler();
|
||||||
|
new ExtruderRecipeHandler();
|
||||||
/*
|
/*
|
||||||
new DieselFuelsHandler();
|
new DieselFuelsHandler(); // TODO NEI overlays
|
||||||
new TurbineFuelsHandler();
|
new TurbineFuelsHandler();
|
||||||
new HotFuelsHandler();
|
new HotFuelsHandler();
|
||||||
new DenseLiquidFuelsHandler();
|
new DenseLiquidFuelsHandler();
|
||||||
|
|
Loading…
Reference in a new issue