feat: allow running alongside GregTech 5
This commit is contained in:
parent
a74a138fab
commit
eca41ee7a6
38 changed files with 2056 additions and 1408 deletions
|
@ -96,12 +96,6 @@ jar {
|
|||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
output.resourcesDir = output.classesDir
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "codechicken:CodeChickenCore:${mc_ver}-${ccc_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${mc_ver}-${nei_version}:dev"
|
||||
|
|
0
gradlew
vendored
Normal file → Executable file
0
gradlew
vendored
Normal file → Executable file
|
@ -253,11 +253,11 @@ public class GT_Mod implements IGT_Mod {
|
|||
GT_Log.log.catching(e);
|
||||
}
|
||||
}
|
||||
File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg");
|
||||
File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTechAddon"), "GregTech.cfg");
|
||||
Configuration tConfig1 = new Configuration(tFile);
|
||||
tConfig1.load();
|
||||
|
||||
File gtDir = new File(aEvent.getModConfigurationDirectory(), "GregTech");
|
||||
File gtDir = new File(aEvent.getModConfigurationDirectory(), "GregTechAddon");
|
||||
GregTech_API.sRecipeFile = new GT_Config(new Configuration(new File(gtDir, "DynamicConfig.cfg")));
|
||||
GregTech_API.sMachineFile = new GT_Config(new Configuration(new File(gtDir, "MachineStats.cfg")));
|
||||
GregTech_API.sWorldgenFile = new GT_Config(new Configuration(new File(gtDir, "WorldGeneration.cfg")));
|
||||
|
|
|
@ -7,7 +7,9 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -24,16 +26,20 @@ public class ProcessingBattery implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials material = this.getMaterial(aPrefix, entry);
|
||||
if (material == Materials.Lithium && this.isExecutable(aPrefix, material)) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(16).duration(12800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GT_ModHandler.getIC2Item("cropnalyzer", 1L, 32767))
|
||||
.output(GT_Items.Tool_Scanner.getAlmostBroken(1))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(3200)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.plate, Materials.Aluminium)
|
||||
.output(GregTech_API.getGregTechComponent(26, 1))
|
||||
.buildAndRegister();
|
||||
try {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(16).duration(12800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GT_ModHandler.getIC2Item("cropnalyzer", 1L, 32767))
|
||||
.output(GT_Items.Tool_Scanner.getAlmostBroken(1))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(3200)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.plate, Materials.Aluminium)
|
||||
.output(GregTech_API.getGregTechComponent(26, 1))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
|||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -28,69 +29,84 @@ public class ProcessingBlock implements IOreRecipeRegistrator {
|
|||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial) ) {
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
int outFromBlock = aMaterial == Materials.NetherQuartz || aMaterial == Materials.CertusQuartz ? 4 : 9;
|
||||
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial) != null)
|
||||
RecipeMaps.CUTTING.factory().EUt(30).duration(Math.max(aMaterial.getMass() * 10, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9))
|
||||
.buildAndRegister();
|
||||
ItemStack tStack1 = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L);
|
||||
ItemStack tStack2 = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L);
|
||||
ItemStack tStack3 = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L);
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false)) {
|
||||
if (tStack1 == null && tStack2 == null && tStack3 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L),
|
||||
new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'), OrePrefixes.dust.get(aMaterial) }));
|
||||
}
|
||||
try {
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial) != null)
|
||||
RecipeMaps.CUTTING.factory().EUt(30).duration(Math.max(aMaterial.getMass() * 10, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 9))
|
||||
.buildAndRegister();
|
||||
ItemStack tStack1 = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L);
|
||||
ItemStack tStack2 = GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L);
|
||||
ItemStack tStack3 = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L);
|
||||
|
||||
if (tStack2 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L),
|
||||
new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'), OrePrefixes.gem.get(aMaterial) }));
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting,
|
||||
OrePrefixes.block.get(aMaterial), false)) {
|
||||
if (tStack1 == null && tStack2 == null && tStack3 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(
|
||||
GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L),
|
||||
new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'),
|
||||
OrePrefixes.dust.get(aMaterial) }));
|
||||
}
|
||||
|
||||
if (tStack2 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(
|
||||
GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L),
|
||||
new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'),
|
||||
OrePrefixes.gem.get(aMaterial) }));
|
||||
}
|
||||
|
||||
if (tStack1 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(
|
||||
GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L),
|
||||
new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'),
|
||||
OrePrefixes.ingot.get(aMaterial) }));
|
||||
}
|
||||
}
|
||||
|
||||
if (tStack1 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L),
|
||||
new Object[] { "XXX", "XXX", "XXX", Character.valueOf('X'), OrePrefixes.ingot.get(aMaterial) }));
|
||||
tStack1.stackSize = outFromBlock;
|
||||
}
|
||||
}
|
||||
|
||||
if (tStack1 != null) {
|
||||
tStack1.stackSize = outFromBlock;
|
||||
}
|
||||
if (tStack2 != null) {
|
||||
tStack2.stackSize = outFromBlock;
|
||||
}
|
||||
|
||||
if (tStack2 != null) {
|
||||
tStack2.stackSize = outFromBlock;
|
||||
}
|
||||
|
||||
if (tStack3 != null) {
|
||||
tStack3.stackSize = outFromBlock;
|
||||
}
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockdecrafting, OrePrefixes.block.get(aMaterial), tStack2 != null)) {
|
||||
if (tStack3 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(tStack3, new Object[] { OrePrefixes.block.get(aMaterial) }));
|
||||
tStack3.stackSize = outFromBlock;
|
||||
}
|
||||
|
||||
if (tStack2 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(tStack2, new Object[] { OrePrefixes.block.get(aMaterial) }));
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockdecrafting,
|
||||
OrePrefixes.block.get(aMaterial), tStack2 != null)) {
|
||||
if (tStack3 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(tStack3,
|
||||
new Object[] { OrePrefixes.block.get(aMaterial) }));
|
||||
}
|
||||
|
||||
if (tStack2 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(tStack2,
|
||||
new Object[] { OrePrefixes.block.get(aMaterial) }));
|
||||
}
|
||||
|
||||
if (tStack1 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(tStack1,
|
||||
new Object[] { OrePrefixes.block.get(aMaterial) }));
|
||||
}
|
||||
}
|
||||
|
||||
if (tStack1 != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(tStack1, new Object[] { OrePrefixes.block.get(aMaterial) }));
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
GT_Log.log.error(
|
||||
"\'blockQuickSilver\'?, In which Ice Desert can you actually place this as a solid Block?");
|
||||
} else if (aMaterial == Materials.Iron) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GT_Items.IC2_Compressed_Coal_Ball.get(8))
|
||||
.output(GT_Items.IC2_Compressed_Coal_Chunk.get(1))
|
||||
.buildAndRegister();
|
||||
}
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
GT_Log.log.error("\'blockQuickSilver\'?, In which Ice Desert can you actually place this as a solid Block?");
|
||||
} else if (aMaterial == Materials.Iron) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GT_Items.IC2_Compressed_Coal_Ball.get(8))
|
||||
.output(GT_Items.IC2_Compressed_Coal_Chunk.get(1))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ import java.util.List;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
import gregtechmod.common.recipe.RecipeMaps;
|
||||
|
@ -21,10 +23,14 @@ public class ProcessingBolt implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial) && (aMaterial.mTypes & 2) != 0) {
|
||||
try {
|
||||
RecipeMaps.LATHE.factory().EUt(4).duration(Math.max(aMaterial.getMass() / 8, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.screw, aMaterial, 1))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,10 @@ import gregtechmod.api.enums.Materials;
|
|||
import gregtechmod.api.enums.OrePrefixes;
|
||||
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_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -32,138 +34,158 @@ public class ProcessingCell implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
if (aMaterial != Materials.Empty) {
|
||||
RecipeFactory<?> factory;
|
||||
if (aMaterial.mMaterialList.size() > 0 && (aMaterial.mExtraData & 3) != 0) {
|
||||
long totalMaterialAmount = 0;
|
||||
for (MaterialStack tMat : aMaterial.mMaterialList)
|
||||
totalMaterialAmount += tMat.mAmount;
|
||||
int tItemAmount1 = 0;
|
||||
long capsuleCount = -totalMaterialAmount;
|
||||
int tDensityMultiplier = (int) (aMaterial.getDensity() > GregTech_API.MATERIAL_UNIT ? aMaterial.getDensity() / GregTech_API.MATERIAL_UNIT : 1L);
|
||||
List<ItemStack> tList = new ArrayList<>();
|
||||
|
||||
for (MaterialStack tMat1 : aMaterial.mMaterialList) {
|
||||
if (tMat1.mAmount > 0L) {
|
||||
ItemStack tStack;
|
||||
if (tMat1.mMaterial == Materials.Oxygen) {
|
||||
tStack = GT_Items.Cell_Air.get(tMat1.mAmount * tDensityMultiplier / 2L);
|
||||
} else {
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat1.mMaterial, tMat1.mAmount);
|
||||
if (tStack == null) {
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, tMat1.mMaterial, tMat1.mAmount);
|
||||
}
|
||||
}
|
||||
try {
|
||||
if (aMaterial != Materials.Empty) {
|
||||
RecipeFactory<?> factory;
|
||||
if (aMaterial.mMaterialList.size() > 0 && (aMaterial.mExtraData & 3) != 0) {
|
||||
long totalMaterialAmount = 0;
|
||||
for (MaterialStack tMat : aMaterial.mMaterialList)
|
||||
totalMaterialAmount += tMat.mAmount;
|
||||
int tItemAmount1 = 0;
|
||||
long capsuleCount = -totalMaterialAmount;
|
||||
int tDensityMultiplier = (int) (aMaterial.getDensity() > GregTech_API.MATERIAL_UNIT
|
||||
? aMaterial.getDensity() / GregTech_API.MATERIAL_UNIT
|
||||
: 1L);
|
||||
List<ItemStack> tList = new ArrayList<>();
|
||||
|
||||
if (tItemAmount1 + (tMat1.mAmount * GregTech_API.MATERIAL_UNIT) <= 64 * aMaterial.getDensity()) {
|
||||
tItemAmount1 += tMat1.mAmount * GregTech_API.MATERIAL_UNIT;
|
||||
if (tStack != null) {
|
||||
for (tStack.stackSize *= tDensityMultiplier; tStack.stackSize > 64; tStack.stackSize -= 64) {
|
||||
if (capsuleCount + GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 < 0) {
|
||||
if (tList.size() >= 3) {
|
||||
for (MaterialStack tMat1 : aMaterial.mMaterialList) {
|
||||
if (tMat1.mAmount > 0L) {
|
||||
ItemStack tStack;
|
||||
if (tMat1.mMaterial == Materials.Oxygen) {
|
||||
tStack = GT_Items.Cell_Air.get(tMat1.mAmount * tDensityMultiplier / 2L);
|
||||
} else {
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tMat1.mMaterial,
|
||||
tMat1.mAmount);
|
||||
if (tStack == null) {
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, tMat1.mMaterial,
|
||||
tMat1.mAmount);
|
||||
}
|
||||
}
|
||||
|
||||
if (tItemAmount1 + (tMat1.mAmount * GregTech_API.MATERIAL_UNIT) <= 64
|
||||
* aMaterial.getDensity()) {
|
||||
tItemAmount1 += tMat1.mAmount * GregTech_API.MATERIAL_UNIT;
|
||||
if (tStack != null) {
|
||||
for (tStack.stackSize *= tDensityMultiplier; tStack.stackSize > 64; tStack.stackSize -= 64) {
|
||||
if (capsuleCount
|
||||
+ GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64 < 0) {
|
||||
if (tList.size() >= 3) {
|
||||
break;
|
||||
}
|
||||
} else if (tList.size() >= 4) {
|
||||
break;
|
||||
}
|
||||
} else if (tList.size() >= 4) {
|
||||
break;
|
||||
|
||||
if (capsuleCount + (GT_ModHandler.getCapsuleCellContainerCount(tStack)
|
||||
* 64) > 64) {
|
||||
break;
|
||||
}
|
||||
|
||||
capsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64;
|
||||
tList.add(GT_Utility.copyAmount(64, tStack));
|
||||
}
|
||||
|
||||
if (capsuleCount + (GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64) > 64) {
|
||||
break;
|
||||
}
|
||||
|
||||
capsuleCount += GT_ModHandler.getCapsuleCellContainerCount(tStack) * 64;
|
||||
tList.add(GT_Utility.copyAmount(64, tStack));
|
||||
}
|
||||
|
||||
if (tStack.stackSize > 0 && capsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64) {
|
||||
if (capsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) < 0) {
|
||||
if (tList.size() >= 3) {
|
||||
if (tStack.stackSize > 0 && capsuleCount
|
||||
+ GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(
|
||||
tStack) <= 64) {
|
||||
if (capsuleCount + GT_ModHandler
|
||||
.getCapsuleCellContainerCountMultipliedWithStackSize(
|
||||
tStack) < 0) {
|
||||
if (tList.size() >= 3) {
|
||||
continue;
|
||||
}
|
||||
} else if (tList.size() >= 4) {
|
||||
continue;
|
||||
}
|
||||
} else if (tList.size() >= 4) {
|
||||
continue;
|
||||
}
|
||||
|
||||
capsuleCount += (long) GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack);
|
||||
tList.add(tStack);
|
||||
capsuleCount += (long) GT_ModHandler
|
||||
.getCapsuleCellContainerCountMultipliedWithStackSize(tStack);
|
||||
tList.add(tStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tItemAmount1 = (int) ((tItemAmount1 * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1
|
||||
: 0) + tItemAmount1 * 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() * 8 * tItemAmount1)))
|
||||
.input(RecipeEntry.fromStacks(tItemAmount1, entry.ores, Match.DAMAGE,
|
||||
Match.NBT));
|
||||
factory.outputs(tList.toArray(new ItemStack[0]));
|
||||
if (capsuleCount > 0)
|
||||
factory.input(GT_Items.Cell_Empty.get(capsuleCount));
|
||||
else if (capsuleCount != 0)
|
||||
factory.output(GT_Items.Cell_Empty.get(-capsuleCount));
|
||||
factory.buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mExtraData & 2) != 0) {
|
||||
factory = RecipeMaps.CENTRIFUGE.factory()
|
||||
.setShaped(true)
|
||||
.EUt(5)
|
||||
.duration(Math.max(1, Math.abs(aMaterial.getMass() * 2 * tItemAmount1)))
|
||||
.input(RecipeEntry.fromStacks(tItemAmount1, entry.ores, Match.DAMAGE,
|
||||
Match.NBT));
|
||||
factory.outputs(tList.toArray(new ItemStack[0]));
|
||||
if (capsuleCount > 0)
|
||||
factory.input(GT_Items.Cell_Empty.get(capsuleCount));
|
||||
else if (capsuleCount != 0)
|
||||
factory.output(GT_Items.Cell_Empty.get(-capsuleCount));
|
||||
factory.buildAndRegister();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tItemAmount1 = (int) ((tItemAmount1 * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount1 * 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() * 8 * tItemAmount1)))
|
||||
.input(RecipeEntry.fromStacks(tItemAmount1, entry.ores, Match.DAMAGE, Match.NBT));
|
||||
factory.outputs(tList.toArray(new ItemStack[0]));
|
||||
if (capsuleCount > 0)
|
||||
factory.input(GT_Items.Cell_Empty.get(capsuleCount));
|
||||
else if (capsuleCount != 0)
|
||||
factory.output(GT_Items.Cell_Empty.get(-capsuleCount));
|
||||
factory.buildAndRegister();
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
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;
|
||||
}
|
||||
|
||||
FluidStack fuel = GT_Utility.getFluidForFilledItem(aStack);
|
||||
if (fuel != null) {
|
||||
factory.input(new FluidStack(fuel, 1)).duration(aMaterial.mFuelPower);
|
||||
} else {
|
||||
ItemStack container = GT_Utility.getContainerItem(aStack);
|
||||
factory.input(aStack).duration(aMaterial.mFuelPower * 1000);
|
||||
if (container != null)
|
||||
factory.output(container);
|
||||
}
|
||||
|
||||
factory.EUt(1).buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mExtraData & 2) != 0) {
|
||||
factory = RecipeMaps.CENTRIFUGE.factory()
|
||||
.setShaped(true)
|
||||
.EUt(5)
|
||||
.duration(Math.max(1, Math.abs(aMaterial.getMass() * 2 * tItemAmount1)))
|
||||
.input(RecipeEntry.fromStacks(tItemAmount1, entry.ores, Match.DAMAGE, Match.NBT));
|
||||
factory.outputs(tList.toArray(new ItemStack[0]));
|
||||
if (capsuleCount > 0)
|
||||
factory.input(GT_Items.Cell_Empty.get(capsuleCount));
|
||||
else if (capsuleCount != 0)
|
||||
factory.output(GT_Items.Cell_Empty.get(-capsuleCount));
|
||||
factory.buildAndRegister();
|
||||
if (aMaterial == Materials.Ice) {
|
||||
GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(GT_Utility.copyAmount(1L, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
FluidStack fuel = GT_Utility.getFluidForFilledItem(aStack);
|
||||
if (fuel != null) {
|
||||
factory.input(new FluidStack(fuel, 1)).duration(aMaterial.mFuelPower);
|
||||
} else {
|
||||
ItemStack container = GT_Utility.getContainerItem(aStack);
|
||||
factory.input(aStack).duration(aMaterial.mFuelPower * 1000);
|
||||
if (container != null) factory.output(container);
|
||||
}
|
||||
|
||||
factory.EUt(1).buildAndRegister();
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Ice) {
|
||||
GT_ModHandler.addSmeltingAndAlloySmeltingRecipe(GT_Utility.copyAmount(1L, aStack), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Water, 1L));
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@ import gregtechmod.api.enums.Materials;
|
|||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.recipe.RecipeFactory;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -23,24 +25,30 @@ public class ProcessingCellPlasma implements IOreRecipeRegistrator {
|
|||
}
|
||||
|
||||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
// if (aMaterial == Materials.Empty) {
|
||||
// GT_ModHandler.removeRecipeByOutput(aStack);
|
||||
// }
|
||||
// if (aMaterial == Materials.Empty) {
|
||||
// GT_ModHandler.removeRecipeByOutput(aStack);
|
||||
// }
|
||||
for (OreDictEntry entry : entries) {
|
||||
Materials material = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, material) && material != Materials.Empty) {
|
||||
RecipeFactory<?> factory = RecipeMaps.PLASMA_FUELS.factory().EUt(1);
|
||||
if (GT_Utility.isFluidStackValid(material.mPlasma))
|
||||
factory.duration(1024 * Math.max(1, material.getMass())).input(new FluidStack(material.mPlasma, 1));
|
||||
else
|
||||
factory.duration(1000 * 1024 * Math.max(1, material.getMass())).input(RecipeEntry.fromStacks(entry.ores, Match.STRICT));
|
||||
factory.buildAndRegister();
|
||||
RecipeMaps.VACUUM_FREEZER.factory()
|
||||
.EUt(120)
|
||||
.duration(Math.max(material.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, material, 1))
|
||||
.buildAndRegister();
|
||||
try {
|
||||
RecipeFactory<?> factory = RecipeMaps.PLASMA_FUELS.factory().EUt(1);
|
||||
if (GT_Utility.isFluidStackValid(material.mPlasma))
|
||||
factory.duration(1024 * Math.max(1, material.getMass()))
|
||||
.input(new FluidStack(material.mPlasma, 1));
|
||||
else
|
||||
factory.duration(1000 * 1024 * Math.max(1, material.getMass()))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT));
|
||||
factory.buildAndRegister();
|
||||
RecipeMaps.VACUUM_FREEZER.factory()
|
||||
.EUt(120)
|
||||
.duration(Math.max(material.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, material, 1))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,9 @@ import gregtechmod.api.enums.GT_OreDictNames;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -28,26 +30,70 @@ public class ProcessingCrafting implements IOreRecipeRegistrator {
|
|||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
if (this.isExecutable(aPrefix, this.getMaterial(aPrefix, entry))) {
|
||||
if (entry.oreDictName.equals(GT_OreDictNames.craftingRedstoneTorch.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(16).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(OrePrefixes.plate, Materials.Iron, 1).output(GregTech_API.getGregTechComponent(30, 1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(16).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(OrePrefixes.plate, Materials.Aluminium, 1).output(GregTech_API.getGregTechComponent(87, 1)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingRawMachineTier01.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(new ItemStack(Blocks.noteblock, 1, GregTech_API.ITEM_WILDCARD_DAMAGE)).output(new ItemStack(GregTech_API.sBlockList[1], 1, 66)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(new ItemStack(Blocks.stone_button, 1, GregTech_API.ITEM_WILDCARD_DAMAGE)).output(new ItemStack(GregTech_API.sBlockList[1], 1, 67)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(2).duration(1600).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(GregTech_API.getGregTechComponent(7, 1)).output(GT_ModHandler.getIC2Item("solarPanel", 1)).buildAndRegister();
|
||||
ItemStack machineBlock = new ItemStack(GregTech_API.sBlockList[1], 1, 79);
|
||||
List<ItemStack> filtered = entry.ores.stream().filter(s -> !s.isItemEqual(machineBlock)).collect(Collectors.toList());
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(2).duration(1600).input(RecipeEntry.fromStacks(filtered, Match.DAMAGE)).input(GregTech_API.getGregTechComponent(22, 1)).output(new ItemStack(GregTech_API.sBlockList[1], 1, 79)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingGenerator.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(3200).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(OrePrefixes.gearGt, Materials.Steel, 1).output(GregTech_API.getGregTechComponent(25, 1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(3200).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(OrePrefixes.gearGt, Materials.StainlessSteel, 1).output(GregTech_API.getGregTechComponent(25, 1)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingWireCopper.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(2).duration(1600).input(RecipeEntry.fromStacks(2, entry.ores, Match.DAMAGE)).input(OrePrefixes.plate, Materials.BatteryAlloy, 6).output(GT_Items.Battery_Hull_MV.get(1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800).input(RecipeEntry.fromStacks(3, entry.ores, Match.DAMAGE)).input(GT_Items.Circuit_Board_Basic.get(1)).output(GT_Items.Circuit_Basic.get(1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(GT_Items.Circuit_Basic.get(1)).output(GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingWireTin.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(OrePrefixes.plate, Materials.BatteryAlloy, 2).output(GT_Items.Battery_Hull_LV.get(1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).input(GT_Items.Circuit_Basic.get(1)).output(GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)).buildAndRegister();
|
||||
try {
|
||||
if (entry.oreDictName.equals(GT_OreDictNames.craftingRedstoneTorch.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(16).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.plate, Materials.Iron, 1)
|
||||
.output(GregTech_API.getGregTechComponent(30, 1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(16).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.plate, Materials.Aluminium, 1)
|
||||
.output(GregTech_API.getGregTechComponent(87, 1)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingRawMachineTier01.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(new ItemStack(Blocks.noteblock, 1, GregTech_API.ITEM_WILDCARD_DAMAGE))
|
||||
.output(new ItemStack(GregTech_API.sBlockList[1], 1, 66)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(new ItemStack(Blocks.stone_button, 1, GregTech_API.ITEM_WILDCARD_DAMAGE))
|
||||
.output(new ItemStack(GregTech_API.sBlockList[1], 1, 67)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(2).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GregTech_API.getGregTechComponent(7, 1))
|
||||
.output(GT_ModHandler.getIC2Item("solarPanel", 1)).buildAndRegister();
|
||||
ItemStack machineBlock = new ItemStack(GregTech_API.sBlockList[1], 1, 79);
|
||||
List<ItemStack> filtered = entry.ores.stream().filter(s -> !s.isItemEqual(machineBlock))
|
||||
.collect(Collectors.toList());
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(2).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(filtered, Match.DAMAGE))
|
||||
.input(GregTech_API.getGregTechComponent(22, 1))
|
||||
.output(new ItemStack(GregTech_API.sBlockList[1], 1, 79)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingGenerator.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(3200)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.gearGt, Materials.Steel, 1)
|
||||
.output(GregTech_API.getGregTechComponent(25, 1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(3200)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.gearGt, Materials.StainlessSteel, 1)
|
||||
.output(GregTech_API.getGregTechComponent(25, 1)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingWireCopper.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(2).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.plate, Materials.BatteryAlloy, 6)
|
||||
.output(GT_Items.Battery_Hull_MV.get(1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800)
|
||||
.input(RecipeEntry.fromStacks(3, entry.ores, Match.DAMAGE))
|
||||
.input(GT_Items.Circuit_Board_Basic.get(1)).output(GT_Items.Circuit_Basic.get(1))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GT_Items.Circuit_Basic.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)).buildAndRegister();
|
||||
} else if (entry.oreDictName.equals(GT_OreDictNames.craftingWireTin.toString())) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(OrePrefixes.plate, Materials.BatteryAlloy, 2)
|
||||
.output(GT_Items.Battery_Hull_LV.get(1)).buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(800)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.input(GT_Items.Circuit_Basic.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("frequencyTransmitter", 1L)).buildAndRegister();
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_RecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
@ -38,253 +39,288 @@ public class ProcessingDust implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
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;
|
||||
try {
|
||||
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;
|
||||
}
|
||||
|
||||
factory.EUt(1).duration(aMaterial.mFuelPower * 1000)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT)).buildAndRegister();
|
||||
}
|
||||
|
||||
factory.EUt(1).duration(aMaterial.mFuelPower * 1000).input(RecipeEntry.fromStacks(entry.ores, Match.STRICT)).buildAndRegister();
|
||||
}
|
||||
|
||||
if (aMaterial.mAmplificationValue > 0) {
|
||||
GT_ModHandler.addIC2MatterAmplifier(aMaterial.mAmplificationValue, entry.oreDictName);
|
||||
}
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
ItemStack tStack;
|
||||
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4)) != null)
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(tStack, new Object[]{" X", " ", 'X', entry.oreDictName}).setMirrored(false));
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9)) != null)
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(tStack, new Object[]{"X ", " ", 'X', entry.oreDictName}).setMirrored(false));
|
||||
});
|
||||
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1) != null) {
|
||||
RecipeMaps.CANNING.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();
|
||||
if (aMaterial != Materials.Milk) RecipeMaps.CANNING.factory().EUt(1).duration(100)
|
||||
.input(OrePrefixes.cell, aMaterial)
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1))
|
||||
.output(GT_OreDictUnificator.get(GT_Items.Cell_Empty.get(1)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
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 (aMaterial.mAmplificationValue > 0) {
|
||||
GT_ModHandler.addIC2MatterAmplifier(aMaterial.mAmplificationValue, entry.oreDictName);
|
||||
}
|
||||
|
||||
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 ));
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
ItemStack tStack;
|
||||
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 4)) != null)
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(tStack, new Object[] { " X", " ", 'X', entry.oreDictName })
|
||||
.setMirrored(false));
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.dustTiny, aMaterial, 9)) != null)
|
||||
GameRegistry.addRecipe(
|
||||
new ShapedOreRecipe(tStack, new Object[] { "X ", " ", 'X', entry.oreDictName })
|
||||
.setMirrored(false));
|
||||
});
|
||||
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1) != null) {
|
||||
RecipeMaps.CANNING.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();
|
||||
if (aMaterial != Materials.Milk)
|
||||
RecipeMaps.CANNING.factory().EUt(1).duration(100)
|
||||
.input(OrePrefixes.cell, aMaterial)
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1))
|
||||
.output(GT_OreDictUnificator.get(GT_Items.Cell_Empty.get(1)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
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 (tStack.stackSize > 0 && tList.size() < 4 && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64L) {
|
||||
tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(tStack);
|
||||
tList.add(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 + GT_ModHandler
|
||||
.getCapsuleCellContainerCountMultipliedWithStackSize(tStack) <= 64L) {
|
||||
tCapsuleCount += GT_ModHandler
|
||||
.getCapsuleCellContainerCountMultipliedWithStackSize(tStack);
|
||||
tList.add(tStack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
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) {
|
||||
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 (aMaterial) {
|
||||
case _NULL:
|
||||
case Empty:
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
case Milk:
|
||||
RecipeMaps.CANNING.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);
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING) && tStack != null) {
|
||||
if (aMaterial.mBlastFurnaceRequired && null != tStack) {
|
||||
factory = RecipeMaps.BLAST_FURNACE.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();
|
||||
}
|
||||
} else {
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial) && null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L)) {
|
||||
GT_RecipeRegistrator.registerBlockForcibly(aPrefix, aMaterial, entry.ores);
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(), (in, out) -> in.matches(entry.ores.get(0)));
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)));
|
||||
for (ItemStack a : entry.ores)
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, a, a, a, a, a, a, a, a, a));
|
||||
}
|
||||
|
||||
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) {
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(), (in, out) -> in.matches(GT_Utility.copyAmount(9, entry.ores.get(0))));
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 1, GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (null != tStack && !aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
if (aMaterial.mBlastFurnaceRequired) {
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> in.isItemEqual(aStack));
|
||||
if (aMaterial.mBlastFurnaceTemp <= 1000)
|
||||
GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1, aStack), GT_Utility.copyAmount(1, tStack), aMaterial.mBlastFurnaceTemp);
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(aStack, tStack));
|
||||
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 (aMaterial) {
|
||||
default:
|
||||
break;
|
||||
case Wheat:
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack), new ItemStack(Items.bread, 1, 0)));
|
||||
break;
|
||||
case Tetrahedrite:
|
||||
case Chalcopyrite:
|
||||
case Malachite:
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 6L)));
|
||||
break;
|
||||
case Pentlandite:
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 6L)));
|
||||
break;
|
||||
case Garnierite:
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nickel, 1L)));
|
||||
break;
|
||||
case Cassiterite:
|
||||
RecipeHandler.executeOnFinish(() -> 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;
|
||||
case _NULL:
|
||||
case Empty:
|
||||
continue;
|
||||
default:
|
||||
break;
|
||||
case Milk:
|
||||
RecipeMaps.CANNING.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);
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING) && tStack != null) {
|
||||
if (aMaterial.mBlastFurnaceRequired && null != tStack) {
|
||||
factory = RecipeMaps.BLAST_FURNACE.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();
|
||||
}
|
||||
} else {
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial)
|
||||
&& null == GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, 1L)) {
|
||||
GT_RecipeRegistrator.registerBlockForcibly(aPrefix, aMaterial, entry.ores);
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(),
|
||||
(in, out) -> in.matches(entry.ores.get(0)));
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9,
|
||||
GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L)));
|
||||
for (ItemStack a : entry.ores)
|
||||
RecipeHandler.scheduleCraftingToRemove(
|
||||
new RecipeHandler.InventoryRecipeMatcher(false, a, a, a, a, a, a, a, a, a));
|
||||
}
|
||||
|
||||
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) {
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(),
|
||||
(in, out) -> in.matches(GT_Utility.copyAmount(9, entry.ores.get(0))));
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)));
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (null != tStack && !aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
if (aMaterial.mBlastFurnaceRequired) {
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> in.isItemEqual(aStack));
|
||||
if (aMaterial.mBlastFurnaceTemp <= 1000)
|
||||
GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_Utility.copyAmount(1, tStack), aMaterial.mBlastFurnaceTemp);
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(aStack, tStack));
|
||||
}
|
||||
}
|
||||
|
||||
switch (aMaterial) {
|
||||
default:
|
||||
break;
|
||||
case Wheat:
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(
|
||||
GT_Utility.copyAmount(1, aStack), new ItemStack(Items.bread, 1, 0)));
|
||||
break;
|
||||
case Tetrahedrite:
|
||||
case Chalcopyrite:
|
||||
case Malachite:
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Copper, 6L)));
|
||||
break;
|
||||
case Pentlandite:
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Nickel, 6L)));
|
||||
break;
|
||||
case Garnierite:
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, Materials.Nickel, 1L)));
|
||||
break;
|
||||
case Cassiterite:
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> 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;
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -28,48 +30,56 @@ public class ProcessingDustImpure implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
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);
|
||||
try {
|
||||
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.dust, tByProduct, GT_OreDictUnificator.get(OrePrefixes.gem, tByProduct, 1L), 1L);
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tByProduct, 1L);
|
||||
if (tStack == null) {
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.cell, tByProduct, 1L);
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.dust, tByProduct,
|
||||
GT_OreDictUnificator.get(OrePrefixes.gem, tByProduct, 1L), 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();
|
||||
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).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();
|
||||
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() * 72))
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 9), tStack)
|
||||
.buildAndRegister();
|
||||
.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() * 16))
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
|
||||
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 2), tStack)
|
||||
.buildAndRegister();
|
||||
.duration(Math.max(1, aMaterial.getMass() * 8))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1), 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();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,10 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_Shapeless_Recipe;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
@ -30,27 +32,36 @@ public class ProcessingDustSmall implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
ItemStack ingot;
|
||||
RecipeHandler.executeOnFinish(() -> 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_FURNACE.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();
|
||||
|
||||
GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(4L, entry.ores.get(0)), null, ingot, null, 130 * 3 * 2, 0);
|
||||
try {
|
||||
ItemStack ingot;
|
||||
RecipeHandler.executeOnFinish(() -> 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_FURNACE.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();
|
||||
|
||||
GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(4L, entry.ores.get(0)), null,
|
||||
ingot, null, 130 * 3 * 2, 0);
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,8 +7,10 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_Shapeless_Recipe;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
@ -30,34 +32,45 @@ public class ProcessingDustTiny implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
ItemStack ingot;
|
||||
RecipeHandler.executeOnFinish(() -> 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_FURNACE.factory()
|
||||
.minTemperature(aMaterial.mBlastFurnaceTemp)
|
||||
.EUt(120).duration(Math.max(aMaterial.getMass() / 40, 1) * aMaterial.mBlastFurnaceTemp)
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT));
|
||||
try {
|
||||
ItemStack ingot;
|
||||
RecipeHandler.executeOnFinish(() -> 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_FURNACE.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();
|
||||
|
||||
GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(9L, entry.ores.get(0)), null, ingot, null, 130 * 3 * 2, 0);
|
||||
|
||||
for (ItemStack stack : entry.ores) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, stack), GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L));
|
||||
});
|
||||
} else {
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(3).duration(130)
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.output(ingot)
|
||||
.buildAndRegister();
|
||||
|
||||
GT_ModHandler.addInductionSmelterRecipe(GT_Utility.copyAmount(9L, entry.ores.get(0)), null,
|
||||
ingot, null, 130 * 3 * 2, 0);
|
||||
|
||||
for (ItemStack stack : entry.ores) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, stack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L));
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -27,18 +29,22 @@ public class ProcessingDye implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
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.CANNING.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();
|
||||
}
|
||||
try {
|
||||
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.CANNING.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();
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_RecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
@ -25,7 +27,7 @@ import net.minecraft.init.Items;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ProcessingGem implements IOreRecipeRegistrator {
|
||||
|
||||
|
||||
public ProcessingGem() {
|
||||
OrePrefixes.gem.add(this);
|
||||
}
|
||||
|
@ -34,88 +36,104 @@ public class ProcessingGem implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
if ((aMaterial == Materials.Charcoal || aMaterial == Materials.Coal) && GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.disabledrecipes, "torchesFromCoal", false)) {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, GT_OreDictUnificator.get(aPrefix, aMaterial), null, null, new ItemStack(Items.stick, 1, 0)));
|
||||
}
|
||||
|
||||
if (aMaterial.mFuelPower > 0) {
|
||||
RecipeFactory<?> factory;
|
||||
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;
|
||||
try {
|
||||
if ((aMaterial == Materials.Charcoal || aMaterial == Materials.Coal) && GregTech_API.sRecipeFile
|
||||
.get(GT_ConfigCategories.Recipes.disabledrecipes, "torchesFromCoal", false)) {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false,
|
||||
GT_OreDictUnificator.get(aPrefix, aMaterial), null, null,
|
||||
new ItemStack(Items.stick, 1, 0)));
|
||||
}
|
||||
|
||||
factory.EUt(1)
|
||||
.duration(aMaterial.mFuelPower * 2 * 1000)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mTypes & 4) != 0 && aMaterial.mTransparent && GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1) == null) {
|
||||
RecipeMaps.LATHE.factory().EUt(16)
|
||||
.duration(Math.max(aMaterial.getMass(), 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.lense, aMaterial, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
RecipeMaps.CANNING.factory().EUt(1).duration(100)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.input(GT_Items.Cell_Empty.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.NetherQuartz) {
|
||||
System.err.print("");
|
||||
}
|
||||
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial)) {
|
||||
GT_RecipeRegistrator.registerBlockForcibly(aPrefix, aMaterial, entry.ores);
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(), (in, out) -> in.matches(entry.ores.get(0)));
|
||||
ItemStack block = GT_OreDictUnificator.get(OrePrefixes.block, aMaterial);
|
||||
|
||||
if (block != null) {
|
||||
if (aMaterial.mSmallBlock) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 4, block));
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9, block));
|
||||
|
||||
if (aMaterial.mFuelPower > 0) {
|
||||
RecipeFactory<?> factory;
|
||||
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 (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false)) {
|
||||
for (ItemStack b : entry.ores) {
|
||||
if (aMaterial.mSmallBlock) {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, b, b, null, b, b, null));
|
||||
} else {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, b, b, b, b, b, b, b, b, b));
|
||||
|
||||
factory.EUt(1)
|
||||
.duration(aMaterial.mFuelPower * 2 * 1000)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mTypes & 4) != 0 && aMaterial.mTransparent
|
||||
&& GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1) == null) {
|
||||
RecipeMaps.LATHE.factory().EUt(16)
|
||||
.duration(Math.max(aMaterial.getMass(), 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.lense, aMaterial, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
RecipeMaps.CANNING.factory().EUt(1).duration(100)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.input(GT_Items.Cell_Empty.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.NetherQuartz) {
|
||||
System.err.print("");
|
||||
}
|
||||
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial)) {
|
||||
GT_RecipeRegistrator.registerBlockForcibly(aPrefix, aMaterial, entry.ores);
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(),
|
||||
(in, out) -> in.matches(entry.ores.get(0)));
|
||||
ItemStack block = GT_OreDictUnificator.get(OrePrefixes.block, aMaterial);
|
||||
|
||||
if (block != null) {
|
||||
if (aMaterial.mSmallBlock) {
|
||||
RecipeHandler
|
||||
.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 4, block));
|
||||
} else {
|
||||
RecipeHandler
|
||||
.executeOnFinish(() -> GT_ModHandler.addCompressionRecipe(entry, 9, block));
|
||||
}
|
||||
|
||||
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting,
|
||||
OrePrefixes.block.get(aMaterial), false)) {
|
||||
for (ItemStack b : entry.ores) {
|
||||
if (aMaterial.mSmallBlock) {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(
|
||||
false, b, b, null, b, b, null));
|
||||
} else {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(
|
||||
false, b, b, b, b, b, b, b, b, b));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack stack : entry.ores) {
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, stack), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L)));
|
||||
|
||||
for (ItemStack stack : entry.ores) {
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, stack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L)));
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_RecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
@ -35,93 +36,123 @@ public class ProcessingIngot1 implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
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;
|
||||
}
|
||||
|
||||
factory.EUt(1).duration(aMaterial.mFuelPower * 1000).input(RecipeEntry.fromStacks(entry.ores, Match.STRICT)).buildAndRegister();
|
||||
}
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING) && GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial) != null) {
|
||||
RecipeMaps.HAMMER.factory().EUt(16).duration(Math.max(aMaterial.getMass(), 1)).input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT)).output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1)).buildAndRegister();
|
||||
RecipeMaps.BENDING.factory().EUt(24).duration(Math.max(aMaterial.getMass() * 2, 1)).setShaped(true).input(RecipeEntry.fromStacks(1, entry.ores, Match.STRICT)).nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1)).output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1)).buildAndRegister();
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial) != null)
|
||||
RecipeMaps.BENDING.factory().EUt(24).duration(Math.max(aMaterial.getMass() * 18, 1)).setShaped(true).input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT)).nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 9)).output(GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1)).buildAndRegister();
|
||||
}
|
||||
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial)) {
|
||||
GT_RecipeRegistrator.registerBlockForcibly(aPrefix, aMaterial, entry.ores);
|
||||
GT_ModHandler.addCompressionRecipe(entry, 9, GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L));
|
||||
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting, OrePrefixes.block.get(aMaterial), false))
|
||||
for (ItemStack a : entry.ores)
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, a, a, a, a, a, a, a, a, a));
|
||||
}
|
||||
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial) != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), new Object[] { "F", "I", 'F', GT_ToolDictNames.craftingToolFile, 'I', entry.oreDictName }));
|
||||
RecipeMaps.LATHE.factory().EUt(16)
|
||||
.duration(Math.max(aMaterial.getMass() * 5, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING) && GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L) != null) {
|
||||
boolean needRecipe = false;
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (GT_ModHandler.getSmeltingOutput(aStack, false, null) == null) {
|
||||
if (aStack.getItem().hasContainerItem(aStack) || !GregTech_API.sRecipeFile.get(GT_ConfigCategories.Machines.smelting, entry.oreDictName, true)) {
|
||||
needRecipe = true;
|
||||
try {
|
||||
RecipeFactory<?> factory;
|
||||
if (aMaterial.mFuelPower > 0) {
|
||||
switch (aMaterial.mFuelType) {
|
||||
case 0:
|
||||
factory = RecipeMaps.DIESEL_FUELS.factory();
|
||||
break;
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L)));
|
||||
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;
|
||||
}
|
||||
|
||||
factory.EUt(1).duration(aMaterial.mFuelPower * 1000)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT)).buildAndRegister();
|
||||
}
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING)
|
||||
&& GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial) != null) {
|
||||
RecipeMaps.HAMMER.factory().EUt(16).duration(Math.max(aMaterial.getMass(), 1))
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1)).buildAndRegister();
|
||||
RecipeMaps.BENDING.factory().EUt(24).duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.setShaped(true).input(RecipeEntry.fromStacks(1, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1)).buildAndRegister();
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial) != null)
|
||||
RecipeMaps.BENDING.factory().EUt(24).duration(Math.max(aMaterial.getMass() * 18, 1))
|
||||
.setShaped(true).input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 9))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial)) {
|
||||
GT_RecipeRegistrator.registerBlockForcibly(aPrefix, aMaterial, entry.ores);
|
||||
GT_ModHandler.addCompressionRecipe(entry, 9,
|
||||
GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1L));
|
||||
if (!GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.storageblockcrafting,
|
||||
OrePrefixes.block.get(aMaterial), false))
|
||||
for (ItemStack a : entry.ores)
|
||||
RecipeHandler.scheduleCraftingToRemove(
|
||||
new RecipeHandler.InventoryRecipeMatcher(false, a, a, a, a, a, a, a, a, a));
|
||||
}
|
||||
|
||||
if (GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial) != null) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(
|
||||
GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L), new Object[] { "F", "I",
|
||||
'F', GT_ToolDictNames.craftingToolFile, 'I', entry.oreDictName }));
|
||||
RecipeMaps.LATHE.factory().EUt(16)
|
||||
.duration(Math.max(aMaterial.getMass() * 5, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 2L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING)
|
||||
&& GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 1L) != null) {
|
||||
boolean needRecipe = false;
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (GT_ModHandler.getSmeltingOutput(aStack, false, null) == null) {
|
||||
if (aStack.getItem().hasContainerItem(aStack) || !GregTech_API.sRecipeFile
|
||||
.get(GT_ConfigCategories.Machines.smelting, entry.oreDictName, true)) {
|
||||
needRecipe = true;
|
||||
break;
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(aStack,
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (needRecipe) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L), new Object[] { entry.oreDictName }));
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack tStack;
|
||||
if (null != (tStack = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L))) {
|
||||
if (aMaterial.mBlastFurnaceRequired || aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> in.isItemEqual(tStack));
|
||||
if (needRecipe) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial, 9L),
|
||||
new Object[] { entry.oreDictName }));
|
||||
}
|
||||
}
|
||||
|
||||
GT_RecipeRegistrator.registerUsagesForMaterials(GT_Utility.copyAmount(1, entry.ores.get(0)), // TODO vanilla recipe replcer
|
||||
GT_Utility.copyAmount(1, tStack), OrePrefixes.plate.get(aMaterial),
|
||||
!aMaterial.contains(SubTag.NO_SMELTING), true, !aMaterial.contains(SubTag.NO_SMASHING));
|
||||
} else {
|
||||
GT_RecipeRegistrator.registerUsagesForMaterials(GT_Utility.copyAmount(1, entry.ores.get(0)),
|
||||
GT_Utility.copyAmount(1, entry.ores.get(0)), OrePrefixes.plate.get(aMaterial),
|
||||
!aMaterial.contains(SubTag.NO_SMELTING), false, !aMaterial.contains(SubTag.NO_SMASHING));
|
||||
}
|
||||
ItemStack tStack;
|
||||
if (null != (tStack = GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L))) {
|
||||
if (aMaterial.mBlastFurnaceRequired || aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> in.isItemEqual(tStack));
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
GT_Log.log.error("Quicksilver Ingots?, Don\'t tell me there is an Armor made of that highly toxic and very likely to be melting Material!");
|
||||
GT_RecipeRegistrator.registerUsagesForMaterials(GT_Utility.copyAmount(1, entry.ores.get(0)), // TODO
|
||||
// vanilla
|
||||
// recipe
|
||||
// replcer
|
||||
GT_Utility.copyAmount(1, tStack), OrePrefixes.plate.get(aMaterial),
|
||||
!aMaterial.contains(SubTag.NO_SMELTING), true, !aMaterial.contains(SubTag.NO_SMASHING));
|
||||
} else {
|
||||
GT_RecipeRegistrator.registerUsagesForMaterials(GT_Utility.copyAmount(1, entry.ores.get(0)),
|
||||
GT_Utility.copyAmount(1, entry.ores.get(0)), OrePrefixes.plate.get(aMaterial),
|
||||
!aMaterial.contains(SubTag.NO_SMELTING), false,
|
||||
!aMaterial.contains(SubTag.NO_SMASHING));
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
GT_Log.log.error(
|
||||
"Quicksilver Ingots?, Don\'t tell me there is an Armor made of that highly toxic and very likely to be melting Material!");
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -30,36 +32,44 @@ public class ProcessingIngot2 implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.ingotDouble, aMaterial);
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 4, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 2)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 2))
|
||||
.output(aStack)
|
||||
.buildAndRegister();
|
||||
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerdoubleingot, OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.ingot.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack), new Object[] { OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial) }));
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial);
|
||||
if (plate != null) {
|
||||
try {
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.ingotDouble, aMaterial);
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
.duration(Math.max(aMaterial.getMass() * 4, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 2)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 2))
|
||||
.output(aStack)
|
||||
.buildAndRegister();
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerdoubleingot,
|
||||
OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.ingot.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler
|
||||
.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack), new Object[] {
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial) }));
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial);
|
||||
if (plate != null) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ import gregtechmod.api.enums.GT_ToolDictNames;
|
|||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.enums.SubTag;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -30,36 +32,45 @@ public class ProcessingIngot3 implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial);
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 6, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 3)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3))
|
||||
.output(aStack);
|
||||
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammertripleingot, OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.ingotDouble.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial) }));
|
||||
try {
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial);
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 6, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 3)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3))
|
||||
.output(aStack);
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammertripleingot,
|
||||
OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.ingotDouble.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial) }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial);
|
||||
if (plate != null) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial);
|
||||
if (plate != null) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -31,35 +33,45 @@ public class ProcessingIngot4 implements IOreRecipeRegistrator {
|
|||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
ItemStack aStack = GT_OreDictUnificator.get(aPrefix, aMaterial);
|
||||
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 4)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 4))
|
||||
.output(aStack)
|
||||
.buildAndRegister();
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerquadrupleingot, OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.ingotTriple.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial)));
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial);
|
||||
if (plate != null) {
|
||||
try {
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 4, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 4)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 4))
|
||||
.output(aStack)
|
||||
.buildAndRegister();
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerquadrupleingot,
|
||||
OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.ingotTriple.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial)));
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial);
|
||||
if (plate != null) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 4, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -31,34 +33,46 @@ public class ProcessingIngot5 implements IOreRecipeRegistrator {
|
|||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
ItemStack aStack = GT_OreDictUnificator.get(aPrefix, aMaterial);
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 5)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 5))
|
||||
.output(aStack)
|
||||
.buildAndRegister();
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerquintupleingot, OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.ingotQuadruple.get(aMaterial), 'B', OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial) }));
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial);
|
||||
if (plate != null) {
|
||||
try {
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 5, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(OrePrefixes.ingot, aMaterial, 5)
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 5))
|
||||
.output(aStack)
|
||||
.buildAndRegister();
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerquintupleingot,
|
||||
OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.ingotQuadruple.get(aMaterial), 'B',
|
||||
OrePrefixes.ingot.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(
|
||||
GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial), OrePrefixes.ingot.get(aMaterial),
|
||||
OrePrefixes.ingot.get(aMaterial) }));
|
||||
}
|
||||
|
||||
ItemStack plate = GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial);
|
||||
if (plate != null) {
|
||||
RecipeMaps.BENDING.factory().EUt(24).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 5, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 1))
|
||||
.output(plate)
|
||||
.buildAndRegister();
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ import java.util.List;
|
|||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -22,11 +24,15 @@ public class ProcessingIngotHot implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
RecipeMaps.VACUUM_FREEZER.factory().EUt(120)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
try {
|
||||
RecipeMaps.VACUUM_FREEZER.factory().EUt(120)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,10 @@ import gregtechmod.api.enums.GT_ToolDictNames;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -33,112 +35,145 @@ public class ProcessingLog implements IOreRecipeRegistrator {
|
|||
|
||||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
List<Integer> logs = entries.stream()
|
||||
.map(ent -> ent.ores)
|
||||
.flatMap(List::stream)
|
||||
.map(s -> GT_Utility.stackToInt(s))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
.map(ent -> ent.ores)
|
||||
.flatMap(List::stream)
|
||||
.map(s -> GT_Utility.stackToInt(s))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.disabledrecipes, "wood2charcoalsmelting", false)) {
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> out.isItemEqual(new ItemStack(Items.coal, 1, 1)) && logs.contains(GT_Utility.stackToInt(in)));
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> out.isItemEqual(new ItemStack(Items.coal, 1, 1))
|
||||
&& logs.contains(GT_Utility.stackToInt(in)));
|
||||
}
|
||||
|
||||
|
||||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
RecipeEntry recEntry = RecipeEntry.fromStacks(entry.ores, Match.STRICT);
|
||||
if (aMaterial == Materials.Rubber) {
|
||||
RecipeMaps.CENTRIFUGE.factory().EUt(5)
|
||||
.duration(5000).setShaped(true)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores, Match.STRICT))
|
||||
.input(GT_Items.Cell_Empty.get(1))
|
||||
.output(GT_Items.IC2_Resin.get(8))
|
||||
.output(GT_ModHandler.getIC2Item("plantBall", 6L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 4))
|
||||
.buildAndRegister();
|
||||
GT_ModHandler.addSawmillRecipe(entry, 1, 100, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L), GT_Items.IC2_Resin.get(1));
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_Items.IC2_Resin.get(1), 33);
|
||||
|
||||
|
||||
RecipeMaps.SAWMILL.factory().EUt(30).duration(200).setShaped(true).input(recEntry).input(GT_ModHandler.getWater(1000)).outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L), GT_Items.IC2_Resin.get(1)).buildAndRegister();
|
||||
|
||||
// TODO Schedule removal of extractor recipe
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addExtractionRecipe(recEntry, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 1L)));
|
||||
} else {
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80);
|
||||
}
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock && GT_Mod.sWoodStackSize < aStack.getMaxStackSize()) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sWoodStackSize);
|
||||
}
|
||||
|
||||
int aMeta = aStack.getItemDamage();
|
||||
ItemStack tStack;
|
||||
if (aMeta == 32767) {
|
||||
for (int tPlanks = 0; tPlanks < 16; ++tPlanks) {
|
||||
tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, tPlanks));
|
||||
if (tStack != null) {
|
||||
ItemStack tPlanks1 = GT_Utility.copy(tStack);
|
||||
tPlanks1.stackSize = tPlanks1.stackSize * 3 / 2;
|
||||
|
||||
final ItemStack planks = new ItemStack(aStack.getItem(), 1, tPlanks);
|
||||
|
||||
RecipeMaps.CUTTING.factory()
|
||||
.EUt(8).duration(200)
|
||||
.input(planks)
|
||||
.output(GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack.stackSize : (tStack.stackSize * 5 / 4), tStack))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.SAWMILL.factory()
|
||||
.EUt(30).duration(200)
|
||||
.input(planks)
|
||||
.input(GT_ModHandler.getWater(1000))
|
||||
.outputs(tPlanks1, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L))
|
||||
.buildAndRegister();
|
||||
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, planks, null, null, null));
|
||||
GT_ModHandler.addSawmillRecipe(planks, tPlanks1, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
|
||||
|
||||
final ItemStack tStack1 = tStack.copy();
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack1.stackSize : (tStack1.stackSize * 5 / 4), tStack1),
|
||||
new Object[] { "S", "L", 'S', GT_ToolDictNames.craftingToolSaw, 'L', planks });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount((tStack1.stackSize / (GT_Mod.sNerfedWoodPlank ? 2 : 1)), tStack1),
|
||||
new Object[] { planks });
|
||||
});
|
||||
} else break;
|
||||
}
|
||||
} else {
|
||||
tStack = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1, aStack));
|
||||
if (tStack != null) {
|
||||
ItemStack var10 = GT_Utility.copy(tStack);
|
||||
var10.stackSize = var10.stackSize * 3 / 2;
|
||||
RecipeMaps.CUTTING.factory()
|
||||
.EUt(8).duration(200)
|
||||
.input(aStack)
|
||||
.output(GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack.stackSize : (tStack.stackSize * 5 / 4), tStack))
|
||||
try {
|
||||
RecipeEntry recEntry = RecipeEntry.fromStacks(entry.ores, Match.STRICT);
|
||||
if (aMaterial == Materials.Rubber) {
|
||||
RecipeMaps.CENTRIFUGE.factory().EUt(5)
|
||||
.duration(5000).setShaped(true)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores, Match.STRICT))
|
||||
.input(GT_Items.Cell_Empty.get(1))
|
||||
.output(GT_Items.IC2_Resin.get(8))
|
||||
.output(GT_ModHandler.getIC2Item("plantBall", 6L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Methane, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Carbon, 4))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.SAWMILL.factory()
|
||||
.EUt(30).duration(200)
|
||||
.input(aStack)
|
||||
GT_ModHandler.addSawmillRecipe(entry, 1, 100,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L),
|
||||
GT_Items.IC2_Resin.get(1));
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L),
|
||||
GT_Items.IC2_Resin.get(1), 33);
|
||||
|
||||
RecipeMaps.SAWMILL.factory().EUt(30).duration(200).setShaped(true).input(recEntry)
|
||||
.input(GT_ModHandler.getWater(1000))
|
||||
.outputs(var10, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L))
|
||||
.outputs(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 16L),
|
||||
GT_Items.IC2_Resin.get(1))
|
||||
.buildAndRegister();
|
||||
|
||||
GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1, aStack), var10, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false, GT_Utility.copyAmount(1, aStack), null, null, null));
|
||||
|
||||
final ItemStack tStack1 = tStack.copy();
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack1.stackSize : (tStack1.stackSize * 5 / 4) , tStack1),
|
||||
new Object[] { "S", "L", 'S', GT_ToolDictNames.craftingToolSaw, 'L', GT_Utility.copyAmount(1, aStack) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount((tStack1.stackSize / (GT_Mod.sNerfedWoodPlank ? 2 : 1)), tStack1),
|
||||
new Object[] { GT_Utility.copyAmount(1, aStack) });
|
||||
});
|
||||
|
||||
// TODO Schedule removal of extractor recipe
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addExtractionRecipe(recEntry,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Rubber, 1L)));
|
||||
} else {
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 6L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), 80);
|
||||
}
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock && GT_Mod.sWoodStackSize < aStack.getMaxStackSize()) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sWoodStackSize);
|
||||
}
|
||||
|
||||
int aMeta = aStack.getItemDamage();
|
||||
ItemStack tStack;
|
||||
if (aMeta == 32767) {
|
||||
for (int tPlanks = 0; tPlanks < 16; ++tPlanks) {
|
||||
tStack = GT_ModHandler.getRecipeOutput(new ItemStack(aStack.getItem(), 1, tPlanks));
|
||||
if (tStack != null) {
|
||||
ItemStack tPlanks1 = GT_Utility.copy(tStack);
|
||||
tPlanks1.stackSize = tPlanks1.stackSize * 3 / 2;
|
||||
|
||||
final ItemStack planks = new ItemStack(aStack.getItem(), 1, tPlanks);
|
||||
|
||||
RecipeMaps.CUTTING.factory()
|
||||
.EUt(8).duration(200)
|
||||
.input(planks)
|
||||
.output(GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack.stackSize
|
||||
: (tStack.stackSize * 5 / 4), tStack))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.SAWMILL.factory()
|
||||
.EUt(30).duration(200)
|
||||
.input(planks)
|
||||
.input(GT_ModHandler.getWater(1000))
|
||||
.outputs(tPlanks1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L))
|
||||
.buildAndRegister();
|
||||
|
||||
RecipeHandler.scheduleCraftingToRemove(
|
||||
new RecipeHandler.InventoryRecipeMatcher(false, planks, null, null, null));
|
||||
GT_ModHandler.addSawmillRecipe(planks, tPlanks1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
|
||||
|
||||
final ItemStack tStack1 = tStack.copy();
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(
|
||||
GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack1.stackSize
|
||||
: (tStack1.stackSize * 5 / 4), tStack1),
|
||||
new Object[] { "S", "L", 'S', GT_ToolDictNames.craftingToolSaw, 'L',
|
||||
planks });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(
|
||||
(tStack1.stackSize / (GT_Mod.sNerfedWoodPlank ? 2 : 1)), tStack1),
|
||||
new Object[] { planks });
|
||||
});
|
||||
} else
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
tStack = GT_ModHandler.getRecipeOutput(GT_Utility.copyAmount(1, aStack));
|
||||
if (tStack != null) {
|
||||
ItemStack var10 = GT_Utility.copy(tStack);
|
||||
var10.stackSize = var10.stackSize * 3 / 2;
|
||||
RecipeMaps.CUTTING.factory()
|
||||
.EUt(8).duration(200)
|
||||
.input(aStack)
|
||||
.output(GT_Utility.copyAmount(
|
||||
GT_Mod.sNerfedWoodPlank ? tStack.stackSize : (tStack.stackSize * 5 / 4),
|
||||
tStack))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.SAWMILL.factory()
|
||||
.EUt(30).duration(200)
|
||||
.input(aStack)
|
||||
.input(GT_ModHandler.getWater(1000))
|
||||
.outputs(var10, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L))
|
||||
.buildAndRegister();
|
||||
|
||||
GT_ModHandler.addSawmillRecipe(GT_Utility.copyAmount(1, aStack), var10,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L));
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(false,
|
||||
GT_Utility.copyAmount(1, aStack), null, null, null));
|
||||
|
||||
final ItemStack tStack1 = tStack.copy();
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(
|
||||
GT_Utility.copyAmount(GT_Mod.sNerfedWoodPlank ? tStack1.stackSize
|
||||
: (tStack1.stackSize * 5 / 4), tStack1),
|
||||
new Object[] { "S", "L", 'S', GT_ToolDictNames.craftingToolSaw, 'L',
|
||||
GT_Utility.copyAmount(1, aStack) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(
|
||||
GT_Utility.copyAmount(
|
||||
(tStack1.stackSize / (GT_Mod.sNerfedWoodPlank ? 2 : 1)), tStack1),
|
||||
new Object[] { GT_Utility.copyAmount(1, aStack) });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,9 @@ import gregtechmod.api.enums.GT_ToolDictNames;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Shapeless_Recipe;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -28,22 +30,33 @@ public class ProcessingNugget implements IOreRecipeRegistrator {
|
|||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial) && (aMaterial.mTypes & 2) != 0) {
|
||||
ItemStack round = GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L);
|
||||
|
||||
if (round != null) RecipeMaps.LATHE.factory().EUt(8)
|
||||
.duration(Math.max(aMaterial.getMass() / 4, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(round)
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(2).duration(200)
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), new Object[] { entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName, entry.oreDictName }));
|
||||
try {
|
||||
if (round != null)
|
||||
GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L), new Object[] { GT_ToolDictNames.craftingToolFile.toString(), entry.oreDictName, entry.oreDictName }));
|
||||
});
|
||||
RecipeMaps.LATHE.factory().EUt(8)
|
||||
.duration(Math.max(aMaterial.getMass() / 4, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(round)
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(2).duration(200)
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GameRegistry.addRecipe(
|
||||
new GT_Shapeless_Recipe(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L),
|
||||
new Object[] { entry.oreDictName, entry.oreDictName, entry.oreDictName,
|
||||
entry.oreDictName, entry.oreDictName, entry.oreDictName,
|
||||
entry.oreDictName, entry.oreDictName, entry.oreDictName }));
|
||||
if (round != null)
|
||||
GameRegistry.addRecipe(
|
||||
new GT_Shapeless_Recipe(GT_OreDictUnificator.get(OrePrefixes.round, aMaterial, 1L),
|
||||
new Object[] { GT_ToolDictNames.craftingToolFile.toString(),
|
||||
entry.oreDictName, entry.oreDictName }));
|
||||
});
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -40,6 +42,7 @@ public class ProcessingOre implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
try {
|
||||
int mult = aPrefix != OrePrefixes.oreNether && aPrefix != OrePrefixes.oreDense ? 1 : 2;
|
||||
|
||||
if (aMaterial == Materials.Oilsands) {
|
||||
|
@ -70,6 +73,9 @@ public class ProcessingOre implements IOreRecipeRegistrator {
|
|||
if (aStack.getItem() instanceof ItemBlock && aStack.getMaxStackSize() > GT_Mod.sOreStackSize)
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sOreStackSize);
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +89,7 @@ public class ProcessingOre implements IOreRecipeRegistrator {
|
|||
}
|
||||
}
|
||||
|
||||
private static boolean registerStandardOreRecipes(OrePrefixes aPrefix, Materials aMaterial, OreDictEntry entry, int aMultiplier) {
|
||||
private static boolean registerStandardOreRecipes(OrePrefixes aPrefix, Materials aMaterial, OreDictEntry entry, int aMultiplier) throws GT_RecipeException {
|
||||
if (aMaterial != null) {
|
||||
Materials tMaterial = aMaterial.mOreReplacement;
|
||||
Materials tPrimaryByMaterial = null;
|
||||
|
|
|
@ -6,8 +6,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -21,7 +23,8 @@ import net.minecraft.item.ItemStack;
|
|||
public class ProcessingOreSmelting implements IOreRecipeRegistrator {
|
||||
|
||||
private final static OrePrefixes[] mSmeltingPrefixes = new OrePrefixes[] {
|
||||
OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.dustImpure, OrePrefixes.dustPure, OrePrefixes.dustRefined
|
||||
OrePrefixes.crushed, OrePrefixes.crushedPurified, OrePrefixes.crushedCentrifuged, OrePrefixes.dustImpure,
|
||||
OrePrefixes.dustPure, OrePrefixes.dustRefined
|
||||
};
|
||||
|
||||
public ProcessingOreSmelting() {
|
||||
|
@ -35,44 +38,53 @@ public class ProcessingOreSmelting implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial) && !aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
if (!aMaterial.mBlastFurnaceRequired && !aMaterial.mDirectSmelting.mBlastFurnaceRequired) {
|
||||
switch (aPrefix) {
|
||||
case crushed:
|
||||
case crushedPurified:
|
||||
case crushedCentrifuged:
|
||||
ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.nugget, aMaterial.mDirectSmelting, 10L);
|
||||
if (tStack == null)
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L);
|
||||
try {
|
||||
if (!aMaterial.mBlastFurnaceRequired && !aMaterial.mDirectSmelting.mBlastFurnaceRequired) {
|
||||
switch (aPrefix) {
|
||||
case crushed:
|
||||
case crushedPurified:
|
||||
case crushedCentrifuged:
|
||||
ItemStack tStack = GT_OreDictUnificator.get(OrePrefixes.nugget,
|
||||
aMaterial.mDirectSmelting, 10L);
|
||||
if (tStack == null)
|
||||
tStack = GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L);
|
||||
|
||||
for (ItemStack aStack : entry.ores)
|
||||
GT_ModHandler.addSmeltingRecipe(aStack, tStack);
|
||||
break;
|
||||
default:
|
||||
for (ItemStack aStack : entry.ores)
|
||||
GT_ModHandler.addSmeltingRecipe(aStack, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L));
|
||||
}
|
||||
} else if (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null) {
|
||||
for (final ItemStack aStack : entry.ores)
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> in.isItemEqual(aStack));
|
||||
|
||||
ItemStack out = aMaterial.mBlastFurnaceTemp > 1750
|
||||
? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial, GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L)
|
||||
: GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L);
|
||||
|
||||
if (out == null) {
|
||||
System.err.println(aMaterial);
|
||||
}
|
||||
|
||||
RecipeMaps.BLAST_FURNACE.factory()
|
||||
.minTemperature(aMaterial.mBlastFurnaceTemp)
|
||||
.EUt(120).duration(Math.max(aMaterial.getMass() / 4, 1) * aMaterial.mBlastFurnaceTemp)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(out)
|
||||
.buildAndRegister();
|
||||
if (aMaterial.mBlastFurnaceTemp <= 1000) {
|
||||
for (ItemStack aStack : entry.ores)
|
||||
GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1, aStack), GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), aMaterial.mBlastFurnaceTemp * 2);
|
||||
for (ItemStack aStack : entry.ores)
|
||||
GT_ModHandler.addSmeltingRecipe(aStack, tStack);
|
||||
break;
|
||||
default:
|
||||
for (ItemStack aStack : entry.ores)
|
||||
GT_ModHandler.addSmeltingRecipe(aStack,
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial.mDirectSmelting, 1L));
|
||||
}
|
||||
} else if (GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null) {
|
||||
for (final ItemStack aStack : entry.ores)
|
||||
RecipeHandler.scheduleSmeltingToRemove((in, out) -> in.isItemEqual(aStack));
|
||||
|
||||
ItemStack out = aMaterial.mBlastFurnaceTemp > 1750
|
||||
? GT_OreDictUnificator.get(OrePrefixes.ingotHot, aMaterial,
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L), 1L)
|
||||
: GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L);
|
||||
|
||||
if (out == null) {
|
||||
System.err.println(aMaterial);
|
||||
}
|
||||
|
||||
RecipeMaps.BLAST_FURNACE.factory()
|
||||
.minTemperature(aMaterial.mBlastFurnaceTemp)
|
||||
.EUt(120).duration(Math.max(aMaterial.getMass() / 4, 1) * aMaterial.mBlastFurnaceTemp)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(out)
|
||||
.buildAndRegister();
|
||||
if (aMaterial.mBlastFurnaceTemp <= 1000) {
|
||||
for (ItemStack aStack : entry.ores)
|
||||
GT_ModHandler.addRCBlastFurnaceRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L),
|
||||
aMaterial.mBlastFurnaceTemp * 2);
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ import gregtechmod.GT_Mod;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -28,29 +30,35 @@ public class ProcessingPlank implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
if (aMaterial == Materials.Wood) {
|
||||
RecipeMaps.LATHE.factory().EUt(8).duration(10)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(8, entry.ores, Match.STRICT))
|
||||
.input(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))
|
||||
.output(new ItemStack(Blocks.noteblock, 1))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(8, entry.ores, Match.STRICT))
|
||||
.input(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L))
|
||||
.output(new ItemStack(Blocks.jukebox, 1))
|
||||
.buildAndRegister();
|
||||
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1, GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), null, 0);
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock && GT_Mod.sPlankStackSize < aStack.getMaxStackSize()) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sPlankStackSize);
|
||||
try {
|
||||
if (aMaterial == Materials.Wood) {
|
||||
RecipeMaps.LATHE.factory().EUt(8).duration(10)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.stick, Materials.Wood, 2L))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(8, entry.ores, Match.STRICT))
|
||||
.input(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))
|
||||
.output(new ItemStack(Blocks.noteblock, 1))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(1600)
|
||||
.input(RecipeEntry.fromStacks(8, entry.ores, Match.STRICT))
|
||||
.input(GT_OreDictUnificator.get(OrePrefixes.gem, Materials.Diamond, 1L))
|
||||
.output(new ItemStack(Blocks.jukebox, 1))
|
||||
.buildAndRegister();
|
||||
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Wood, 1L), null, 0);
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock
|
||||
&& GT_Mod.sPlankStackSize < aStack.getMaxStackSize()) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sPlankStackSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,10 @@ 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_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
|
@ -34,123 +36,141 @@ public class ProcessingPlate1 implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
RecipeHandler.scheduleCraftingToRemove(new RecipeHandler.InventoryRecipeMatcher(true, entry.ores.get(0)));
|
||||
|
||||
if (aMaterial.mFuelPower > 0) {
|
||||
RecipeFactory<?> factory;
|
||||
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;
|
||||
}
|
||||
|
||||
factory.EUt(1)
|
||||
.duration(aMaterial.mFuelPower * 2 * 1000)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(), (in, out) -> in.matches(GT_Utility.copyAmount(9, entry.ores.get(0))));
|
||||
|
||||
if ((aMaterial.mTypes & 4) != 0 && aMaterial.mTransparent) {
|
||||
RecipeMaps.LATHE.factory().EUt(16)
|
||||
.duration(Math.max(aMaterial.getMass() / 2, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.lense, aMaterial, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
try {
|
||||
RecipeHandler.scheduleCraftingToRemove(
|
||||
new RecipeHandler.InventoryRecipeMatcher(true, entry.ores.get(0)));
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
ItemStack tStack;
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 2))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(3, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 4, 1))
|
||||
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 4))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 5, 1))
|
||||
.input(RecipeEntry.fromStacks(5, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 5))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 9, 1))
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 9))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial);
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerplating, OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { "H", "I", "I", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.ingot.get(aMaterial) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingot.get(aMaterial) });
|
||||
});
|
||||
if (aMaterial.mFuelPower > 0) {
|
||||
RecipeFactory<?> factory;
|
||||
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;
|
||||
}
|
||||
|
||||
factory.EUt(1)
|
||||
.duration(aMaterial.mFuelPower * 2 * 1000)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerplating, OrePrefixes.ingotDouble.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { "H", "I", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.ingotDouble.get(aMaterial) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(2, aStack), new Object[] {
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.ingotDouble.get(aMaterial) });
|
||||
});
|
||||
RecipeHandler.scheduleIC2RecipeToRemove(GT_ModHandler.getCompressorRecipeList(),
|
||||
(in, out) -> in.matches(GT_Utility.copyAmount(9, entry.ores.get(0))));
|
||||
|
||||
if ((aMaterial.mTypes & 4) != 0 && aMaterial.mTransparent) {
|
||||
RecipeMaps.LATHE.factory().EUt(16)
|
||||
.duration(Math.max(aMaterial.getMass() / 2, 1))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.lense, aMaterial, 1L))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dustSmall, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
}
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
RecipeHandler.scheduleCraftingToRemove(rec -> rec != null && rec.getRecipeOutput() != null && rec.getRecipeOutput().isItemEqual(aStack));
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L)));
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
ItemStack tStack;
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 2))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(3, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 4, 1))
|
||||
.input(RecipeEntry.fromStacks(4, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 4))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateQuintuple, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 5, 1))
|
||||
.input(RecipeEntry.fromStacks(5, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 5))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
if ((tStack = GT_OreDictUnificator.get(OrePrefixes.plateDense, aMaterial, 1L)) != null)
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 9, 1))
|
||||
.input(RecipeEntry.fromStacks(9, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 9))
|
||||
.output(tStack)
|
||||
.buildAndRegister();
|
||||
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial);
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerplating,
|
||||
OrePrefixes.ingot.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { "H", "I", "I", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.ingot.get(aMaterial) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { GT_ToolDictNames.craftingToolForgeHammer,
|
||||
OrePrefixes.ingot.get(aMaterial) });
|
||||
});
|
||||
}
|
||||
|
||||
if (GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerplating,
|
||||
OrePrefixes.ingotDouble.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { "H", "I", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.ingotDouble.get(aMaterial) });
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(2, aStack),
|
||||
new Object[] {
|
||||
GT_ToolDictNames.craftingToolForgeHammer,
|
||||
OrePrefixes.ingotDouble.get(aMaterial) });
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Paper) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(GregTech_API.sRecipeFile.get(GT_ConfigCategories.Recipes.harderrecipes, aStack, true) ? 2 : 3, aStack),
|
||||
new Object[] { "XXX", 'X', new ItemStack(Items.reeds, 1, 32767) }));
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
RecipeHandler.scheduleCraftingToRemove(rec -> rec != null && rec.getRecipeOutput() != null
|
||||
&& rec.getRecipeOutput().isItemEqual(aStack));
|
||||
|
||||
if (!aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addSmeltingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L)));
|
||||
}
|
||||
|
||||
if (aMaterial == Materials.Paper) {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addCraftingRecipe(
|
||||
GT_Utility.copyAmount(GregTech_API.sRecipeFile
|
||||
.get(GT_ConfigCategories.Recipes.harderrecipes, aStack, true) ? 2 : 3,
|
||||
aStack),
|
||||
new Object[] { "XXX", 'X', new ItemStack(Items.reeds, 1, 32767) }));
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -31,25 +33,33 @@ public class ProcessingPlate2 implements IOreRecipeRegistrator {
|
|||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 2))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
try {
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 2, 1))
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 2))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plateQuadruple, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack aStack = GT_OreDictUnificator.get(OrePrefixes.plateDouble, aMaterial);
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING) && GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammerdoubleplate, OrePrefixes.plate.get(aMaterial), true)) {
|
||||
if (aStack != null && !aMaterial.contains(SubTag.NO_SMASHING) && GregTech_API.sRecipeFile
|
||||
.get(GT_ConfigCategories.Tools.hammerdoubleplate, OrePrefixes.plate.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.plate.get(aMaterial), 'B', OrePrefixes.plate.get(aMaterial));
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.plate.get(aMaterial), 'B', OrePrefixes.plate.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial));
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.plate.get(aMaterial),
|
||||
OrePrefixes.plate.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(
|
||||
GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial) }));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,8 +10,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.RecipeHandler;
|
||||
|
@ -30,27 +32,36 @@ public class ProcessingPlate3 implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(3, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
ItemStack aStack = GT_OreDictUnificator.get(aPrefix, aMaterial);
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING) && GregTech_API.sRecipeFile.get(GT_ConfigCategories.Tools.hammertripleplate, OrePrefixes.plate.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I', OrePrefixes.plateDouble.get(aMaterial), 'B', OrePrefixes.plate.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial) }));
|
||||
try {
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING)) {
|
||||
RecipeMaps.BENDING.factory()
|
||||
.setShaped(true).EUt(24)
|
||||
.duration(Math.max(aMaterial.getMass() * 3, 1))
|
||||
.input(RecipeEntry.fromStacks(3, entry.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Circuit_Integrated.getWithDamage(0, 3))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plateTriple, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
ItemStack aStack = GT_OreDictUnificator.get(aPrefix, aMaterial);
|
||||
if (!aMaterial.contains(SubTag.NO_SMASHING) && GregTech_API.sRecipeFile
|
||||
.get(GT_ConfigCategories.Tools.hammertripleplate, OrePrefixes.plate.get(aMaterial), true)) {
|
||||
RecipeHandler.executeOnFinish(() -> {
|
||||
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
"I", "B", "H", 'H', GT_ToolDictNames.craftingToolHardHammer, 'I',
|
||||
OrePrefixes.plateDouble.get(aMaterial), 'B', OrePrefixes.plate.get(aMaterial));
|
||||
GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
GT_ToolDictNames.craftingToolForgeHammer, OrePrefixes.plate.get(aMaterial),
|
||||
OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial));
|
||||
});
|
||||
} else {
|
||||
RecipeHandler.executeOnFinish(
|
||||
() -> GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1, aStack),
|
||||
new Object[] { OrePrefixes.plate.get(aMaterial),
|
||||
OrePrefixes.plate.get(aMaterial), OrePrefixes.plate.get(aMaterial) }));
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@ import java.util.List;
|
|||
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
import gregtechmod.common.recipe.RecipeMaps;
|
||||
|
@ -22,18 +24,22 @@ public class ProcessingPlateAlloy implements IOreRecipeRegistrator {
|
|||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
if (this.isExecutable(aPrefix, this.getMaterial(aPrefix, entry))) {
|
||||
if (entry.oreDictName.equals("plateAlloyCarbon")) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(8).duration(6400)
|
||||
.input(RecipeEntry.fromStacks(4, entry.ores, Match.DAMAGE))
|
||||
.input(GT_ModHandler.getIC2Item("generator", 1L))
|
||||
.output(GT_ModHandler.getIC2Item("windMill", 1))
|
||||
.buildAndRegister();
|
||||
} else if (entry.oreDictName.equals("plateAlloyAdvanced")) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400)
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.DAMAGE))
|
||||
.input(new ItemStack(Blocks.glass, 7, 0))
|
||||
.output(GT_ModHandler.getIC2Item("reinforcedGlass", 7L))
|
||||
.buildAndRegister();
|
||||
try {
|
||||
if (entry.oreDictName.equals("plateAlloyCarbon")) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(8).duration(6400)
|
||||
.input(RecipeEntry.fromStacks(4, entry.ores, Match.DAMAGE))
|
||||
.input(GT_ModHandler.getIC2Item("generator", 1L))
|
||||
.output(GT_ModHandler.getIC2Item("windMill", 1))
|
||||
.buildAndRegister();
|
||||
} else if (entry.oreDictName.equals("plateAlloyAdvanced")) {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400)
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.DAMAGE))
|
||||
.input(new ItemStack(Blocks.glass, 7, 0))
|
||||
.output(GT_ModHandler.getIC2Item("reinforcedGlass", 7L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,9 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.GT_RecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Utility;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
@ -18,7 +20,8 @@ public class ProcessingRecycling implements IOreRecipeRegistrator {
|
|||
|
||||
public ProcessingRecycling() {
|
||||
for (OrePrefixes tPrefix : OrePrefixes.values()) {
|
||||
if (tPrefix.mIsMaterialBased && tPrefix.mMaterialAmount > 0L && tPrefix != OrePrefixes.ingotHot && tPrefix != OrePrefixes.cellPlasma) {
|
||||
if (tPrefix.mIsMaterialBased && tPrefix.mMaterialAmount > 0L && tPrefix != OrePrefixes.ingotHot
|
||||
&& tPrefix != OrePrefixes.cellPlasma) {
|
||||
tPrefix.add(this);
|
||||
}
|
||||
}
|
||||
|
@ -29,37 +32,48 @@ public class ProcessingRecycling implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial) && aMaterial != Materials.Blaze) {
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aPrefix.mIsContainer) {
|
||||
if (aMaterial != Materials.Empty && aPrefix != OrePrefixes.cell) {
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
RecipeMaps.CANNING.factory().EUt(2).duration(Math.max(aMaterial.getMass() / 2, 1))
|
||||
.input(aStack)
|
||||
.output(GT_Utility.getContainerItem(aStack))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial, aPrefix.mMaterialAmount / 3628800L))
|
||||
.buildAndRegister();
|
||||
try {
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aPrefix.mIsContainer) {
|
||||
if (aMaterial != Materials.Empty && aPrefix != OrePrefixes.cell) {
|
||||
if (aMaterial == Materials.Mercury) {
|
||||
RecipeMaps.CANNING.factory().EUt(2)
|
||||
.duration(Math.max(aMaterial.getMass() / 2, 1))
|
||||
.input(aStack)
|
||||
.output(GT_Utility.getContainerItem(aStack))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.gem, aMaterial,
|
||||
aPrefix.mMaterialAmount / 3628800L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mTypes & 15) != 0 && aMaterial != Materials.Creosote
|
||||
&& aMaterial != Materials.Mercury && aMaterial != Materials.SulfuricAcid
|
||||
&& aMaterial != Materials.BioFuel && aMaterial != Materials.Water
|
||||
&& aMaterial != Materials.Nitrogen
|
||||
&& aMaterial != Materials.ConstructionFoam) {
|
||||
|
||||
RecipeMaps.CANNING.factory().EUt(2)
|
||||
.duration(Math.max(aMaterial.getMass() / 2, 1))
|
||||
.input(aStack)
|
||||
.output(GT_Utility.getContainerItem(aStack))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial,
|
||||
aPrefix.mMaterialAmount / 3628800L))
|
||||
.buildAndRegister();
|
||||
}
|
||||
}
|
||||
|
||||
if ((aMaterial.mTypes & 15) != 0 && aMaterial != Materials.Creosote
|
||||
&& aMaterial != Materials.Mercury && aMaterial != Materials.SulfuricAcid
|
||||
&& aMaterial != Materials.BioFuel && aMaterial != Materials.Water
|
||||
&& aMaterial != Materials.Nitrogen && aMaterial != Materials.ConstructionFoam) {
|
||||
|
||||
RecipeMaps.CANNING.factory().EUt(2).duration(Math.max(aMaterial.getMass() / 2, 1))
|
||||
.input(aStack)
|
||||
.output(GT_Utility.getContainerItem(aStack))
|
||||
.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);
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,9 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
import gregtechmod.common.recipe.RecipeMaps;
|
||||
|
@ -27,28 +29,33 @@ public class ProcessingSand implements IOreRecipeRegistrator {
|
|||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
if (this.isExecutable(aPrefix, this.getMaterial(aPrefix, entry))) {
|
||||
if (entry.oreDictName.equals("sandCracked")) {
|
||||
RecipeMaps.CENTRIFUGE.factory().EUt(5).duration(2500)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 8))
|
||||
.output(new ItemStack(Blocks.sand, 10))
|
||||
.buildAndRegister();
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock) {
|
||||
if (aStack.getItem().getItemStackLimit(aStack) > GT_Mod.sBlockStackSize) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sBlockStackSize);
|
||||
try {
|
||||
if (entry.oreDictName.equals("sandCracked")) {
|
||||
RecipeMaps.CENTRIFUGE.factory().EUt(5).duration(2500)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Saltpeter, 8))
|
||||
.output(new ItemStack(Blocks.sand, 10))
|
||||
.buildAndRegister();
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock) {
|
||||
if (aStack.getItem().getItemStackLimit(aStack) > GT_Mod.sBlockStackSize) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sBlockStackSize);
|
||||
}
|
||||
|
||||
GregTech_API.sRecipeAdder
|
||||
.addJackHammerMinableBlock(Block.getBlockFromItem(aStack.getItem()), false);
|
||||
}
|
||||
|
||||
GregTech_API.sRecipeAdder.addJackHammerMinableBlock(Block.getBlockFromItem(aStack.getItem()), false);
|
||||
}
|
||||
} else if (entry.oreDictName.equals("sandOil")) {
|
||||
RecipeMaps.CENTRIFUGE.factory().EUt(5).duration(1000)
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil))
|
||||
.output(new ItemStack(Blocks.sand, 1))
|
||||
.buildAndRegister();
|
||||
}
|
||||
} else if (entry.oreDictName.equals("sandOil")) {
|
||||
RecipeMaps.CENTRIFUGE.factory().EUt(5).duration(1000)
|
||||
.input(RecipeEntry.fromStacks(2, entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Oil))
|
||||
.output(new ItemStack(Blocks.sand, 1))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,8 +9,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.items.GT_MetaGenerated_Item_02;
|
||||
|
@ -20,7 +22,7 @@ import net.minecraft.item.ItemStack;
|
|||
import gregtechmod.common.recipe.RecipeEntry.Match;
|
||||
|
||||
public class ProcessingShaping implements IOreRecipeRegistrator {
|
||||
|
||||
|
||||
public final static List<Materials> PIPES_MED_LARGE = Arrays.asList(
|
||||
Materials.Bronze,
|
||||
Materials.Steel,
|
||||
|
@ -28,16 +30,14 @@ public class ProcessingShaping implements IOreRecipeRegistrator {
|
|||
Materials.TungstenSteel,
|
||||
Materials.Brass,
|
||||
Materials.Electrum,
|
||||
Materials.Platinum
|
||||
);
|
||||
|
||||
Materials.Platinum);
|
||||
|
||||
public final static List<Materials> PIPES_SMALL = Arrays.asList(
|
||||
Materials.Bronze,
|
||||
Materials.Steel,
|
||||
Materials.StainlessSteel,
|
||||
Materials.TungstenSteel
|
||||
);
|
||||
|
||||
Materials.TungstenSteel);
|
||||
|
||||
public ProcessingShaping() {
|
||||
OrePrefixes.ingot.add(this);
|
||||
}
|
||||
|
@ -45,126 +45,295 @@ public class ProcessingShaping implements IOreRecipeRegistrator {
|
|||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry e : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, e);
|
||||
if (this.isExecutable(aPrefix, aMaterial) && GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null && !aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
int tAmount = (int)(aPrefix.mMaterialAmount / GregTech_API.MATERIAL_UNIT);
|
||||
if(tAmount > 0 && tAmount <= 64 && aPrefix.mMaterialAmount % GregTech_API.MATERIAL_UNIT == 0L) {
|
||||
if (PIPES_MED_LARGE.contains(aMaterial)) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(24 * tAmount) .input(RecipeEntry.fromStacks(3, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Pipe_Medium .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.pipeMedium , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(48 * tAmount) .input(RecipeEntry.fromStacks(6, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Pipe_Large .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.pipeLarge , aMaterial, tAmount)).buildAndRegister();
|
||||
}
|
||||
|
||||
if (PIPES_SMALL.contains(aMaterial)) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(8 * tAmount) .input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Pipe_Small .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.pipeSmall , aMaterial, tAmount)).buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mTypes & 64) != 0 && GT_MetaGenerated_Item_02.sTempToolHeadMaterials.contains(aMaterial)) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Sword .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 3 * tAmount, tAmount)).input(RecipeEntry.fromStacks(3, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Pickaxe .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 1 * tAmount, tAmount)).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Shovel .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 3 * tAmount, tAmount)).input(RecipeEntry.fromStacks(3, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Axe .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Hoe .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 6 * tAmount, tAmount)).input(RecipeEntry.fromStacks(6, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Hammer .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_File .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadFile , aMaterial, tAmount)).buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Saw .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw , aMaterial, tAmount)).buildAndRegister();
|
||||
}
|
||||
|
||||
ItemStack gear = GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, tAmount);
|
||||
if ((aMaterial.mTypes & 128) != 0 && gear != null) {
|
||||
RecipeMaps.EXTRUDING.factory()
|
||||
.EUt(128)
|
||||
.setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 5 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(4, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Gear.get(1))
|
||||
.output(gear)
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory()
|
||||
.EUt(32)
|
||||
.duration(Math.max(aMaterial.getMass() * 10 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(8, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Gear.get(1))
|
||||
.output(gear)
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
// wtf is this
|
||||
// RecipeMaps.EXTRUDING.factory().EUt( 80).setShaped(true).duration(10) .input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Ingot .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, tAmount)).buildAndRegister();
|
||||
|
||||
if ((aMaterial.mTypes & 2) != 0) {
|
||||
ItemStack tItem = null;
|
||||
if ((tItem = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, tAmount)) != null) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 1 * tAmount, tAmount)).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Plate .get(1)).output(tItem).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(32).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Plate.get(1)).output(tItem).buildAndRegister();
|
||||
if (this.isExecutable(aPrefix, aMaterial)
|
||||
&& GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial, 1L) != null
|
||||
&& !aMaterial.contains(SubTag.NO_SMELTING)) {
|
||||
try {
|
||||
int tAmount = (int) (aPrefix.mMaterialAmount / GregTech_API.MATERIAL_UNIT);
|
||||
if (tAmount > 0 && tAmount <= 64 && aPrefix.mMaterialAmount % GregTech_API.MATERIAL_UNIT == 0L) {
|
||||
if (PIPES_MED_LARGE.contains(aMaterial)) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(24 * tAmount)
|
||||
.input(RecipeEntry.fromStacks(3, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Pipe_Medium.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.pipeMedium, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(48 * tAmount)
|
||||
.input(RecipeEntry.fromStacks(6, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Pipe_Large.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.pipeLarge, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if(tAmount * 2 <= 64 && (tItem = GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt( 96).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Rod .get(1)).output(tItem).buildAndRegister();
|
||||
if (tAmount * 8 <= 64 && (tItem = GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 8)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Bolt .get(1)).output(tItem).buildAndRegister();
|
||||
if (tAmount * 4 <= 64 && (tItem = GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 4)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt( 96).setShaped(true).duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount)).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Ring .get(1)).output(tItem).buildAndRegister();
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial) && (tItem = GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(10 * tAmount ).input(RecipeEntry.fromStacks(9, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Block.get(1)).output(tItem).buildAndRegister();
|
||||
|
||||
switch(aMaterial) {
|
||||
case Iron:
|
||||
if(tAmount * 6 <= 64)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 8).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Wire.get(1)).output(GT_ModHandler.getIC2Item("ironCableItem", (tAmount * 6))).buildAndRegister();
|
||||
if(tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingiron", (tAmount * 2))).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingiron", (tAmount * 3))).buildAndRegister();
|
||||
|
||||
if (PIPES_SMALL.contains(aMaterial)) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(8 * tAmount)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Pipe_Small.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.pipeSmall, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if ((aMaterial.mTypes & 64) != 0
|
||||
&& GT_MetaGenerated_Item_02.sTempToolHeadMaterials.contains(aMaterial)) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Sword.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadSword, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 3 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(3, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Pickaxe.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadPickaxe, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 1 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Shovel.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadShovel, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 3 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(3, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Axe.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadAxe, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Hoe.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadHoe, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 6 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(6, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Hammer.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadHammer, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_File.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadFile, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Saw.get(1))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.toolHeadSaw, aMaterial, tAmount))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
ItemStack gear = GT_OreDictUnificator.get(OrePrefixes.gearGt, aMaterial, tAmount);
|
||||
if ((aMaterial.mTypes & 128) != 0 && gear != null) {
|
||||
RecipeMaps.EXTRUDING.factory()
|
||||
.EUt(128)
|
||||
.setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 5 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(4, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Gear.get(1))
|
||||
.output(gear)
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory()
|
||||
.EUt(32)
|
||||
.duration(Math.max(aMaterial.getMass() * 10 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(8, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Gear.get(1))
|
||||
.output(gear)
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
// wtf is this
|
||||
// RecipeMaps.EXTRUDING.factory().EUt( 80).setShaped(true).duration(10)
|
||||
// .input(RecipeEntry.fromStacks(1, e.ores,
|
||||
// Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Ingot
|
||||
// .get(1)).output(GT_OreDictUnificator.get(OrePrefixes.ingot, aMaterial,
|
||||
// tAmount)).buildAndRegister();
|
||||
|
||||
if ((aMaterial.mTypes & 2) != 0) {
|
||||
ItemStack tItem = null;
|
||||
if ((tItem = GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, tAmount)) != null) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 1 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Plate.get(1)).output(tItem)
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(32)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Plate.get(1)).output(tItem)
|
||||
.buildAndRegister();
|
||||
}
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Cell.get(1)).output(GT_ModHandler.getIC2Item("fuelRod", tAmount)).buildAndRegister();
|
||||
break;
|
||||
case Tin:
|
||||
if(tAmount * 4 <= 64)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 3).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Wire.get(1)).output(GT_ModHandler.getIC2Item("tinCableItem", (tAmount * 4))).buildAndRegister();
|
||||
if(tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingtin", (tAmount * 2))).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingtin", (tAmount * 3))).buildAndRegister();
|
||||
}
|
||||
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Cell.get(1)).output(GT_Items.Cell_Empty.get(tAmount)).buildAndRegister();
|
||||
break;
|
||||
case SolderingAlloy:
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 8).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Wire.get(1)).output(GT_Items.Tool_SolderingMaterial_Tin.get(tAmount)).buildAndRegister();
|
||||
break;
|
||||
case Lead:
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 8).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Wire.get(1)).output(GT_Items.Tool_SolderingMaterial_Lead.get(tAmount)).buildAndRegister();
|
||||
|
||||
if(tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Casing.get(1)).output(GT_ModHandler.getIC2Item("casinglead", (tAmount * 2))).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Casing.get(1)).output(GT_ModHandler.getIC2Item("casinglead", (tAmount * 3))).buildAndRegister();
|
||||
|
||||
if (tAmount * 2 <= 64
|
||||
&& (tItem = GT_OreDictUnificator.get(OrePrefixes.stick, aMaterial, 2)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(96).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Rod.get(1)).output(tItem)
|
||||
.buildAndRegister();
|
||||
if (tAmount * 8 <= 64
|
||||
&& (tItem = GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 8)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Bolt.get(1)).output(tItem)
|
||||
.buildAndRegister();
|
||||
if (tAmount * 4 <= 64
|
||||
&& (tItem = GT_OreDictUnificator.get(OrePrefixes.ring, aMaterial, 4)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(96).setShaped(true)
|
||||
.duration(Math.max(aMaterial.getMass() * 2 * tAmount, tAmount))
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Ring.get(1)).output(tItem)
|
||||
.buildAndRegister();
|
||||
if (!OrePrefixes.block.isIgnored(aMaterial)
|
||||
&& (tItem = GT_OreDictUnificator.get(OrePrefixes.block, aMaterial, 1)) != null)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(128).setShaped(true).duration(10 * tAmount)
|
||||
.input(RecipeEntry.fromStacks(9, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Block.get(1)).output(tItem)
|
||||
.buildAndRegister();
|
||||
|
||||
switch (aMaterial) {
|
||||
case Iron:
|
||||
if (tAmount * 6 <= 64)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 8)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Wire.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("ironCableItem", (tAmount * 6)))
|
||||
.buildAndRegister();
|
||||
if (tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingiron", (tAmount * 2)))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingiron", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Cell.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("fuelRod", tAmount)).buildAndRegister();
|
||||
break;
|
||||
case Tin:
|
||||
if (tAmount * 4 <= 64)
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 3)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Wire.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("tinCableItem", (tAmount * 4)))
|
||||
.buildAndRegister();
|
||||
if (tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingtin", (tAmount * 2)))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingtin", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Cell.get(1))
|
||||
.output(GT_Items.Cell_Empty.get(tAmount)).buildAndRegister();
|
||||
break;
|
||||
case SolderingAlloy:
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 8)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Wire.get(1))
|
||||
.output(GT_Items.Tool_SolderingMaterial_Tin.get(tAmount))
|
||||
.buildAndRegister();
|
||||
break;
|
||||
case Lead:
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 8)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Wire.get(1))
|
||||
.output(GT_Items.Tool_SolderingMaterial_Lead.get(tAmount))
|
||||
.buildAndRegister();
|
||||
|
||||
if (tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casinglead", (tAmount * 2)))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casinglead", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
break;
|
||||
case Copper:
|
||||
if (tAmount * 3 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 4)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Wire.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("copperCableItem", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingcopper", (tAmount * 2)))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingcopper", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
break;
|
||||
case Bronze:
|
||||
if (tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingbronze", (tAmount * 2)))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casingbronze", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
break;
|
||||
case Gold:
|
||||
if (tAmount * 6 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 4)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Wire.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("goldCableItem", (tAmount * 6)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
if (tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32)
|
||||
.input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Extruder_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casinggold", (tAmount * 2)))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128)
|
||||
.input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT))
|
||||
.nonConsumable(GT_Items.Shape_Mold_Casing.get(1))
|
||||
.output(GT_ModHandler.getIC2Item("casinggold", (tAmount * 3)))
|
||||
.buildAndRegister();
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Copper:
|
||||
if(tAmount * 3 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 4).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Wire.get(1)).output(GT_ModHandler.getIC2Item("copperCableItem", (tAmount * 3))).buildAndRegister();
|
||||
}
|
||||
|
||||
if(tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingcopper", (tAmount * 2))).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingcopper", (tAmount * 3))).buildAndRegister();
|
||||
}
|
||||
break;
|
||||
case Bronze:
|
||||
if(tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingbronze", (tAmount * 2))).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Casing.get(1)).output(GT_ModHandler.getIC2Item("casingbronze", (tAmount * 3))).buildAndRegister();
|
||||
}
|
||||
break;
|
||||
case Gold:
|
||||
if(tAmount * 6 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(64).setShaped(true).duration(tAmount * 4).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Wire.get(1)).output(GT_ModHandler.getIC2Item("goldCableItem", (tAmount * 6))).buildAndRegister();
|
||||
}
|
||||
|
||||
if(tAmount * 2 <= 64) {
|
||||
RecipeMaps.EXTRUDING.factory().EUt(48).setShaped(true).duration(tAmount * 32).input(RecipeEntry.fromStacks(1, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Extruder_Casing.get(1)).output(GT_ModHandler.getIC2Item("casinggold", (tAmount * 2))).buildAndRegister();
|
||||
RecipeMaps.ALLOY_SMELTING.factory().EUt(12).duration(tAmount * 128).input(RecipeEntry.fromStacks(2, e.ores, Match.STRICT)).nonConsumable(GT_Items.Shape_Mold_Casing.get(1)).output(GT_ModHandler.getIC2Item("casinggold", (tAmount * 3))).buildAndRegister();
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException ex) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + e.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,8 +8,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -21,9 +23,9 @@ import net.minecraft.item.ItemBlock;
|
|||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ProcessingSlab implements IOreRecipeRegistrator {
|
||||
|
||||
|
||||
public static final boolean RAILCRAFT = Loader.isModLoaded("Railcraft");
|
||||
|
||||
|
||||
public ProcessingSlab() {
|
||||
OrePrefixes.slab.add(this);
|
||||
}
|
||||
|
@ -32,17 +34,30 @@ public class ProcessingSlab implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials mat = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, mat) && mat == Materials.Wood) {
|
||||
if (RAILCRAFT) {
|
||||
RecipeMaps.CANNING.factory().EUt(4).duration(200).input(GT_ModHandler.getRCItem("fluid.creosote.bucket", 1L)).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).outputs(GT_ModHandler.getRCItem("part.tie.wood", 1L), new ItemStack(Items.bucket, 1)).buildAndRegister();
|
||||
RecipeMaps.CANNING.factory().EUt(4).duration(200).input(OrePrefixes.cell, Materials.Creosote).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).outputs(GT_ModHandler.getRCItem("part.tie.wood", 1L), GT_Items.Cell_Empty.get(1)).buildAndRegister();
|
||||
}
|
||||
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1, GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2), null, 0);
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock && GT_Mod.sPlankStackSize < aStack.getItem().getItemStackLimit(aStack)) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sPlankStackSize);
|
||||
try {
|
||||
if (RAILCRAFT) {
|
||||
RecipeMaps.CANNING.factory().EUt(4).duration(200)
|
||||
.input(GT_ModHandler.getRCItem("fluid.creosote.bucket", 1L))
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.outputs(GT_ModHandler.getRCItem("part.tie.wood", 1L), new ItemStack(Items.bucket, 1))
|
||||
.buildAndRegister();
|
||||
RecipeMaps.CANNING.factory().EUt(4).duration(200).input(OrePrefixes.cell, Materials.Creosote)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.outputs(GT_ModHandler.getRCItem("part.tie.wood", 1L), GT_Items.Cell_Empty.get(1))
|
||||
.buildAndRegister();
|
||||
}
|
||||
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustSmall, Materials.Wood, 2), null, 0);
|
||||
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
if (aStack.getItem() instanceof ItemBlock
|
||||
&& GT_Mod.sPlankStackSize < aStack.getItem().getItemStackLimit(aStack)) {
|
||||
aStack.getItem().setMaxStackSize(GT_Mod.sPlankStackSize);
|
||||
}
|
||||
}
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ import java.util.List;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
import gregtechmod.common.recipe.RecipeMaps;
|
||||
|
@ -21,7 +23,13 @@ public class ProcessingStick implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial) && (aMaterial.mTypes & 2) != 0) {
|
||||
RecipeMaps.CUTTING.factory().EUt(4).duration(aMaterial.getMass() * 2).input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE)).output(GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 4L)).buildAndRegister();
|
||||
try {
|
||||
RecipeMaps.CUTTING.factory().EUt(4).duration(aMaterial.getMass() * 2)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.DAMAGE))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.bolt, aMaterial, 4L)).buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ 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_Log;
|
||||
import gregtechmod.api.util.GT_ModHandler;
|
||||
import gregtechmod.api.util.GT_OreDictUnificator;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -29,102 +31,122 @@ public class ProcessingStone implements IOreRecipeRegistrator {
|
|||
for (OreDictEntry entry : entries) {
|
||||
Materials aMaterial = this.getMaterial(aPrefix, entry);
|
||||
if (this.isExecutable(aPrefix, aMaterial)) {
|
||||
switch (aMaterial) {
|
||||
case Endstone:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 1L), 5);
|
||||
break;
|
||||
case Netherrack:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5);
|
||||
break;
|
||||
case NetherBrick:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(8 * 100).input(RecipeEntry.fromStacks(8, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(8, entry.ores))
|
||||
.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:
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400)
|
||||
.inputs(GT_Items.IC2_Compressed_Coal_Ball.get(8)).input(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_Items.IC2_Compressed_Coal_Chunk.get(1)).buildAndRegister();
|
||||
RecipeMaps.CUTTING.factory().EUt(32).duration(200).input(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)).buildAndRegister();
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_ModHandler.getRCItem("cube.crushed.obsidian", 1L,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10);
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
Block aBlock = Block.getBlockFromItem(aStack.getItem());
|
||||
if (aBlock != null) aBlock.setResistance(20.0F);
|
||||
try {
|
||||
switch (aMaterial) {
|
||||
case Endstone:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Endstone, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Tungsten, 1L), 5);
|
||||
break;
|
||||
case Netherrack:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, Materials.Netherrack, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.nugget, Materials.Gold, 1L), 5);
|
||||
break;
|
||||
case NetherBrick:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(8 * 100)
|
||||
.input(RecipeEntry.fromStacks(8, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(8, entry.ores))
|
||||
.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:
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(4).duration(400)
|
||||
.inputs(GT_Items.IC2_Compressed_Coal_Ball.get(8))
|
||||
.input(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_Items.IC2_Compressed_Coal_Chunk.get(1)).buildAndRegister();
|
||||
RecipeMaps.CUTTING.factory().EUt(32).duration(200)
|
||||
.input(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_ModHandler.getRCItem("cube.crushed.obsidian", 1L,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L)),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10);
|
||||
for (ItemStack aStack : entry.ores) {
|
||||
Block aBlock = Block.getBlockFromItem(aStack.getItem());
|
||||
if (aBlock != null)
|
||||
aBlock.setResistance(20.0F);
|
||||
}
|
||||
break;
|
||||
case GraniteBlack:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thorium, 1L), 1);
|
||||
break;
|
||||
case GraniteRed:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100)
|
||||
.input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L))
|
||||
.buildAndRegister();
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), 1);
|
||||
break;
|
||||
case Sand:
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1, new ItemStack(Blocks.sand, 1, 0), null, 10);
|
||||
break;
|
||||
case Redrock:
|
||||
case Marble:
|
||||
case Basalt:
|
||||
case Quartzite:
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10);
|
||||
break;
|
||||
case Flint:
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L),
|
||||
new ItemStack(Items.flint, 1), 50);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case GraniteBlack:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)).buildAndRegister();
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Thorium, 1L), 1);
|
||||
break;
|
||||
case GraniteRed:
|
||||
RecipeMaps.GRINDER.factory().EUt(120).duration(16 * 100).input(RecipeEntry.fromStacks(16, entry.ores))
|
||||
.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(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.output(GT_OreDictUnificator.get(OrePrefixes.plate, aMaterial, 1L)).buildAndRegister();
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Uranium, 1L), 1);
|
||||
break;
|
||||
case Sand:
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1, new ItemStack(Blocks.sand, 1, 0), null, 10);
|
||||
break;
|
||||
case Redrock:
|
||||
case Marble:
|
||||
case Basalt:
|
||||
case Quartzite:
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 1L),
|
||||
GT_OreDictUnificator.get(OrePrefixes.dust, aMaterial, 1L), 10);
|
||||
break;
|
||||
case Flint:
|
||||
GT_ModHandler.addPulverisationRecipe(entry, 1,
|
||||
GT_OreDictUnificator.get(OrePrefixes.dustImpure, aMaterial, 2L), new ItemStack(Items.flint, 1), 50);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import java.util.List;
|
|||
import gregtechmod.api.enums.Materials;
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
|
@ -22,9 +24,15 @@ public class ProcessingStoneCobble implements IOreRecipeRegistrator {
|
|||
|
||||
@Override
|
||||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
if (this.isExecutable(aPrefix, this.getMaterial(aPrefix, entry)))
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(400).input(OrePrefixes.stick, Materials.Wood).input(RecipeEntry.fromStacks(entry.ores, Match.STRICT)).output(new ItemStack(Blocks.lever, 1)).buildAndRegister();
|
||||
try {
|
||||
RecipeMaps.ASSEMBLING.factory().EUt(1).duration(400).input(OrePrefixes.stick, Materials.Wood)
|
||||
.input(RecipeEntry.fromStacks(entry.ores, Match.STRICT))
|
||||
.output(new ItemStack(Blocks.lever, 1)).buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import java.util.List;
|
|||
|
||||
import gregtechmod.api.enums.OrePrefixes;
|
||||
import gregtechmod.api.interfaces.IOreRecipeRegistrator;
|
||||
import gregtechmod.api.util.GT_Log;
|
||||
import gregtechmod.api.util.GT_RecipeException;
|
||||
import gregtechmod.api.util.OreDictEntry;
|
||||
import gregtechmod.common.recipe.RecipeEntry;
|
||||
import gregtechmod.common.recipe.RecipeMaps;
|
||||
|
@ -17,8 +19,14 @@ public class ProcessingWax implements IOreRecipeRegistrator {
|
|||
@Override
|
||||
public void registerOre(OrePrefixes aPrefix, List<OreDictEntry> entries) {
|
||||
for (OreDictEntry entry : entries) {
|
||||
if (this.isExecutable(aPrefix, this.getMaterial(aPrefix, entry)) && entry.oreDictName.equals("waxMagical")) {
|
||||
RecipeMaps.MAGIC_FUELS.factory().EUt(6).duration(1).input(RecipeEntry.fromStacks(1, entry.ores)).buildAndRegister();
|
||||
if (this.isExecutable(aPrefix, this.getMaterial(aPrefix, entry))
|
||||
&& entry.oreDictName.equals("waxMagical")) {
|
||||
try {
|
||||
RecipeMaps.MAGIC_FUELS.factory().EUt(6).duration(1).input(RecipeEntry.fromStacks(1, entry.ores))
|
||||
.buildAndRegister();
|
||||
} catch (GT_RecipeException e) {
|
||||
GT_Log.log.warn("Failed to register a recipe for Oredict entry " + entry.oreDictName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue