The Great Refactor of 2017 - Industrial Centrifuge Recipes

This commit is contained in:
Prospector 2017-01-03 00:33:25 -08:00
parent 3cdc1b73df
commit bd4103b7df
3 changed files with 158 additions and 249 deletions

View file

@ -32,13 +32,9 @@ import techreborn.blocks.BlockOre;
import techreborn.blocks.BlockOre2; import techreborn.blocks.BlockOre2;
import techreborn.compat.CompatManager; import techreborn.compat.CompatManager;
import techreborn.config.ConfigTechReborn; import techreborn.config.ConfigTechReborn;
import techreborn.init.recipes.CraftingTableRecipes; import techreborn.init.recipes.*;
import techreborn.init.recipes.ImplosionCompressorRecipes;
import techreborn.init.recipes.IndustrialElectrolyzerRecipes;
import techreborn.init.recipes.IndustrialGrinderRecipes;
import techreborn.items.*; import techreborn.items.*;
import techreborn.parts.powerCables.ItemStandaloneCables; import techreborn.parts.powerCables.ItemStandaloneCables;
import techreborn.utils.RecipeUtils;
import techreborn.utils.StackWIPHandler; import techreborn.utils.StackWIPHandler;
import java.util.ArrayList; import java.util.ArrayList;
@ -65,6 +61,7 @@ public class ModRecipes {
CraftingTableRecipes.init(); CraftingTableRecipes.init();
IndustrialGrinderRecipes.init(); IndustrialGrinderRecipes.init();
IndustrialCentrifugeRecipes.init();
IndustrialElectrolyzerRecipes.init(); IndustrialElectrolyzerRecipes.init();
ImplosionCompressorRecipes.init(); ImplosionCompressorRecipes.init();
@ -76,7 +73,6 @@ public class ModRecipes {
addAlloySmelterRecipes(); addAlloySmelterRecipes();
addPlateCuttingMachineRecipes(); addPlateCuttingMachineRecipes();
addIndustrialCentrifugeRecipes();
addChemicalReactorRecipes(); addChemicalReactorRecipes();
addBlastFurnaceRecipes(); addBlastFurnaceRecipes();
@ -85,8 +81,6 @@ public class ModRecipes {
addReactorRecipes(); addReactorRecipes();
addIc2Recipes(); addIc2Recipes();
addGrinderRecipes(); addGrinderRecipes();
// addHammerRecipes();
addIc2ReplacementReicpes();
addExtractorRecipes(); addExtractorRecipes();
addCompressorRecipes(); addCompressorRecipes();
if (!IC2Duplicates.deduplicate()) { if (!IC2Duplicates.deduplicate()) {
@ -394,20 +388,6 @@ public class ModRecipes {
ItemParts.getPartByName("rubber"), 400, 2, false)); ItemParts.getPartByName("rubber"), 400, 2, false));
} }
static void addIc2ReplacementReicpes() {
// TODO: Replace item pump with block
/*CraftingHelper.addShapedOreRecipe(ItemParts.getPartByName("pump"), "CEC", "CMC", "PTP", 'C',
ItemCells.getCellByName("empty"), 'T', new ItemStack(ModItems.treeTap), 'M', "machineBlockBasic", 'P',
new ItemStack(Blocks.iron_bars), 'E', "circuitBasic");
// TODO: Replace item teleporter with block
CraftingHelper
.addShapedOreRecipe(ItemParts.getPartByName("teleporter"), "CTC", "WMW", "CDC", 'C', "circuitAdvanced",
'T', new ItemStack(ModItems.frequencyTransmitter), 'M', "machineBlockAdvanced", 'W',
ItemStandaloneCables.getCableByName("glassfiber"), 'D', "gemDiamond", 'E', "circuitBasic");
*/
}
static void addGrinderRecipes() { static void addGrinderRecipes() {
// Vanilla // Vanilla
@ -1262,82 +1242,6 @@ public class ModRecipes {
if (ConfigTechReborn.UUrecipesAluminumDust) if (ConfigTechReborn.UUrecipesAluminumDust)
CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.DUSTS, 16, 2), " U ", " U ", "UUU", 'U', CraftingHelper.addShapedOreRecipe(new ItemStack(ModItems.DUSTS, 16, 2), " U ", " U ", "UUU", 'U',
ModItems.UU_MATTER); ModItems.UU_MATTER);
if (ConfigTechReborn.HideUuRecipes)
hideUUrecipes();
}
static void hideUUrecipes() {
// TODO
}
static void addIndustrialCentrifugeRecipes() {
// Mycelium Byproducts
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Blocks.MYCELIUM, 8), null, new ItemStack(Blocks.BROWN_MUSHROOM, 2),
new ItemStack(Blocks.RED_MUSHROOM, 2), new ItemStack(Items.CLAY_BALL, 1),
new ItemStack(Blocks.SAND, 4), 1640, 5));
// Blaze Powder Byproducts
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.BLAZE_POWDER), null, ItemDusts.getDustByName("dark_ashes", 1),
ItemDusts.getDustByName("sulfur", 1), null, null, 1240, 5));
// Magma Cream Products
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.MAGMA_CREAM, 1), null, new ItemStack(Items.BLAZE_POWDER, 1),
new ItemStack(Items.SLIME_BALL, 1), null, null, 2500, 5));
// Type Byproducts
// RecipeHandler.addRecipe(new
// CentrifugeRecipe(ItemDusts.getDustByName("platinum", 1), null,
// ItemDustsTiny.getTinyDustByName("Iridium", 1),
// ItemDustsSmall.getSmallDustByName("Nickel", 1), null, null, 3000,
// 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("electrum", 2), null, ItemDusts.getDustByName("silver", 1),
ItemDusts.getDustByName("gold", 1), null, null, 2400, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("invar", 3), null, ItemDusts.getDustByName("iron", 2),
ItemDusts.getDustByName("nickel", 1), null, null, 1340, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("marble", 8), null,
ItemDusts.getDustByName("magnesium", 1), ItemDusts.getDustByName("calcite", 7), null, null, 1280, 5));
// Deprecated
// RecipeHandler.addRecipe(
// new CentrifugeRecipe(ItemDusts.getDustByName("redrock", 4), null, ItemDusts.getDustByName("calcite", 2),
// ItemDusts.getDustByName("flint", 1), ItemDusts.getDustByName("clay", 1), null, 640, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("basalt", 16), null, ItemDusts.getDustByName("peridot", 1),
ItemDusts.getDustByName("calcite", 3), ItemDusts.getDustByName("magnesium", 8),
ItemDusts.getDustByName("dark_ashes", 4), 2680, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("yellow_garnet", 16), null,
ItemDusts.getDustByName("andradite", 5), ItemDusts.getDustByName("grossular", 8),
ItemDusts.getDustByName("uvarovite", 3), null, 2940, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("red_garnet", 16), null,
ItemDusts.getDustByName("pyrope", 3), ItemDusts.getDustByName("almandine", 5),
ItemDusts.getDustByName("spessartine", 8), null, 2940, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("dark_ashes", 2), null, ItemDusts.getDustByName("ashes", 2),
null, null, null, 240, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("brass", 4), null, ItemDusts.getDustByName("zinc", 1),
ItemDusts.getDustByName("copper", 3), null, null, 2000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("bronze", 4), null, ItemDusts.getDustByName("tin", 1),
ItemDusts.getDustByName("copper", 3), null, null, 2420, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("netherrack", 16), null, new ItemStack(Items.REDSTONE, 1),
ItemDusts.getDustByName("sulfur", 4), ItemDusts.getDustByName("basalt", 1),
new ItemStack(Items.GOLD_NUGGET, 1), 2400, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemDusts.getDustByName("ender_eye", 1), null,
ItemDusts.getDustByName("ender_pearl", 1), new ItemStack(Items.BLAZE_POWDER, 1), null, null, 1280, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.GLOWSTONE_DUST, 16), RecipeUtils.getEmptyCell(1),
ItemCells.getCellByName("helium", 1), ItemDusts.getDustByName("gold", 8),
new ItemStack(Items.REDSTONE), null, 25000, 20));
} }
static void addChemicalReactorRecipes() { static void addChemicalReactorRecipes() {
@ -1580,156 +1484,6 @@ public class ModRecipes {
.addShapedOreRecipe((OreDictionary.getOres("oreIridium").get(0)), "UUU", " U ", "UUU", 'U', .addShapedOreRecipe((OreDictionary.getOres("oreIridium").get(0)), "UUU", " U ", "UUU", 'U',
ModItems.UU_MATTER); ModItems.UU_MATTER);
// CentrifugeRecipes
// Plantball/Bio Chaff
// FIX with ic2
// RecipeHandler.addRecipe(new CentrifugeRecipe(new
// ItemStack(Blocks.grass, 16), null, new
// ItemStack(TechRebornAPI.recipeCompact.getItem("biochaff").getItem(),
// 8), new
// ItemStack(TechRebornAPI.recipeCompact.getItem("plantBall").getItem(),
// 8), new ItemStack(Items.clay_ball), new ItemStack(Blocks.sand, 8),
// 2500, 5));
// RecipeHandler.addRecipe(new CentrifugeRecipe(new
// ItemStack(Blocks.dirt, 16), null, new
// ItemStack(TechRebornAPI.recipeCompact.getItem("biochaff").getItem(),
// 4), new
// ItemStack(TechRebornAPI.recipeCompact.getItem("plantBall").getItem(),
// 4), new ItemStack(Items.clay_ball), new ItemStack(Blocks.sand, 8),
// 2500, 5));
// Methane
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.MUSHROOM_STEW, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.APPLE, 32), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.PORKCHOP, 12), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.COOKED_PORKCHOP, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.BREAD, 64), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.FISH, 12), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.COOKED_FISH, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.BEEF, 12), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.COOKED_BEEF, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Blocks.PUMPKIN, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.SPECKLED_MELON, 1), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), new ItemStack(Items.GOLD_NUGGET, 6), null, null, 5000,
5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.SPIDER_EYE, 32), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.CHICKEN, 12), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.COOKED_CHICKEN, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.ROTTEN_FLESH, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.MELON, 64), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.COOKIE, 64), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.CAKE, 8), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.GOLDEN_CARROT, 1), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), new ItemStack(Items.GOLD_NUGGET, 6), null, null, 5000,
5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.CARROT, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.BAKED_POTATO, 24), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(new ItemStack(Items.POTATO, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.POISONOUS_POTATO, 12), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.NETHER_WART, 1), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
// Fix with ic2
// RecipeHandler.addRecipe(new CentrifugeRecipe(new
// ItemStack(TechRebornAPI.recipeCompact.getItem("terraWart").getItem(),
// 16), ItemCells.getCellByName("empty"),
// ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Blocks.BROWN_MUSHROOM, 1), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Blocks.RED_MUSHROOM, 1), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("methane", 1), null, null, null, 5000, 5));
// Rubber Wood Yields
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(getOre("rubberWood").getItem(), 16),
ItemCells.getCellByName("empty", 5), ItemParts.getPartByName("rubber", 8),
new ItemStack(Blocks.SAPLING, 6), ItemCells.getCellByName("methane", 1),
ItemCells.getCellByName("carbon", 4), 5000, 5, true));
// Soul Sand Byproducts
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Blocks.SOUL_SAND, 16), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("oil", 1), ItemDusts.getDustByName("saltpeter", 4),
ItemDusts.getDustByName("coal", 1), new ItemStack(Blocks.SAND, 10), 2500, 5));
// Type Byproducts
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.GLOWSTONE_DUST, 16), ItemCells.getCellByName("empty"),
new ItemStack(Items.REDSTONE, 8), ItemDusts.getDustByName("gold", 8),
ItemCells.getCellByName("helium", 1), null, 25000, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("phosphorous", 5), ItemCells.getCellByName("empty", 3),
ItemCells.getCellByName("calcium", 3), null, null, null, 1280, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("ashes", 1), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("carbon"), null, null, null, 80, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(new ItemStack(Items.REDSTONE, 10), ItemCells.getCellByName("empty", 4),
ItemCells.getCellByName("silicon", 1), ItemDusts.getDustByName("pyrite", 3),
ItemDusts.getDustByName("ruby", 1), ItemCells.getCellByName("mercury", 3), 6800, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("endstone", 16), ItemCells.getCellByName("empty", 2),
ItemCells.getCellByName("helium3", 1), ItemCells.getCellByName("helium"),
ItemDustsSmall.getSmallDustByName("Tungsten", 1), new ItemStack(Blocks.SAND, 12), 4800, 5));
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemDusts.getDustByName("cinnabar", 2), ItemCells.getCellByName("empty"),
ItemCells.getCellByName("mercury", 1), ItemDusts.getDustByName("sulfur", 1), null, null, 80,
5));
// Deuterium/Tritium
RecipeHandler.addRecipe(
new CentrifugeRecipe(ItemCells.getCellByName("helium", 16), null, ItemCells.getCellByName("helium3", 1),
ItemCells.getCellByName("empty", 15), null, null, 10000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemCells.getCellByName("deuterium", 4), null,
ItemCells.getCellByName("tritium", 1), ItemCells.getCellByName("empty", 3), null, null, 3000, 5));
RecipeHandler.addRecipe(new CentrifugeRecipe(ItemCells.getCellByName("hydrogen", 4), null,
ItemCells.getCellByName("deuterium", 1), ItemCells.getCellByName("empty", 3), null, null, 3000, 5));
// Lava Cell Byproducts
ItemStack lavaCells = ItemCells.getCellByName("lava");
lavaCells.setCount(8);
RecipeHandler.addRecipe(new CentrifugeRecipe(lavaCells, null, ItemNuggets.getNuggetByName("electrum", 4),
ItemIngots.getIngotByName("copper", 2), ItemDustsSmall.getSmallDustByName("Tungsten", 1),
ItemIngots.getIngotByName("tin", 2), 6000, 5));
// Chemical Reactor // Chemical Reactor
RecipeHandler.addRecipe(new ChemicalReactorRecipe(ItemDusts.getDustByName("calcite", 1), null, RecipeHandler.addRecipe(new ChemicalReactorRecipe(ItemDusts.getDustByName("calcite", 1), null,
new ItemStack(OreDictionary.getOres("fertilizer").get(0).getItem(), 1), 100, 30)); new ItemStack(OreDictionary.getOres("fertilizer").get(0).getItem(), 1), 100, 30));

View file

@ -0,0 +1,153 @@
package techreborn.init.recipes;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import reborncore.api.recipe.RecipeHandler;
import techreborn.api.recipe.machines.CentrifugeRecipe;
import techreborn.init.ModBlocks;
import techreborn.items.DynamicCell;
import java.security.InvalidParameterException;
/**
* Created by Prospector
*/
public class IndustrialCentrifugeRecipes extends RecipeMethods {
public static void init() {
register(new ItemStack(Items.MAGMA_CREAM), 500, new ItemStack(Items.BLAZE_POWDER), new ItemStack(Items.SLIME_BALL));
register(new ItemStack(Blocks.DIRT, 16), 2500, new ItemStack(Blocks.SAND, 8), new ItemStack(Items.CLAY_BALL), new ItemStack(Blocks.GRAVEL, 2));
register(new ItemStack(Blocks.DIRT, 16), 2500, new ItemStack(Blocks.SAND, 8), new ItemStack(Items.CLAY_BALL), new ItemStack(Blocks.GRAVEL, 2), new ItemStack(Items.WHEAT_SEEDS, 4));
register(new ItemStack(Blocks.MYCELIUM, 8), 1640, new ItemStack(Blocks.SAND, 4), new ItemStack(Items.CLAY_BALL), new ItemStack(Blocks.BROWN_MUSHROOM, 2), new ItemStack(Blocks.RED_MUSHROOM, 2));
register(new ItemStack(Items.GOLDEN_APPLE), 10000, new ItemStack(Items.GOLD_INGOT, 6), getMaterial("methane", Type.CELL));
register(new ItemStack(Items.GOLDEN_APPLE, 1, 1), 10000, new ItemStack(Items.GOLD_INGOT, 64), getMaterial("methane", Type.CELL));
register(new ItemStack(Items.GOLDEN_CARROT), 10000, new ItemStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(new ItemStack(Items.SPECKLED_MELON, 8), 10000, new ItemStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(new ItemStack(Items.APPLE, 32), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.MUSHROOM_STEW, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.BREAD, 64), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.PORKCHOP, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKED_PORKCHOP, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.BEEF, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKED_BEEF, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.CHICKEN, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKED_CHICKEN, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.MUTTON, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKED_MUTTON, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.RABBIT, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKED_RABBIT, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.FISH, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKED_FISH, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.MELON, 64), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Blocks.PUMPKIN, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.ROTTEN_FLESH, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.SPIDER_EYE, 32), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.CARROT, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.POTATO, 16), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.POISONOUS_POTATO, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.BAKED_POTATO, 24), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.BEETROOT, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.COOKIE, 64), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Blocks.BROWN_MUSHROOM_BLOCK, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Blocks.RED_MUSHROOM_BLOCK, 12), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Blocks.BROWN_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Blocks.RED_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(new ItemStack(Items.NETHER_WART, 32), 5000, getMaterial("methane", Type.CELL));
register(getMaterial("sap", 4, Type.PART), 1300, getMaterial("rubber", 14, Type.PART));
register(new ItemStack(Blocks.SOUL_SAND, 16), 2500, new ItemStack(Blocks.SAND, 10), getMaterial("saltpeter", 4, Type.DUST), getMaterial("coal", Type.DUST), getMaterial("oil", Type.CELL));
register(getMaterial("lava", 16, Type.CELL), 15000, getMaterial("tin", 18, Type.INGOT), getMaterial("copper", 4, Type.INGOT), getMaterial("electrum", Type.INGOT), getMaterial("tungsten", Type.SMALL_DUST));
register(getMaterial("bronze", Type.DUST), 1500, getMaterial("copper", 6, Type.SMALL_DUST), getMaterial("tin", 2, Type.SMALL_DUST));
register(getMaterial("iron", 2, Type.DUST), 1500, getMaterial("tin", Type.SMALL_DUST), getMaterial("nickel", Type.SMALL_DUST));
register(getMaterial("silver", 2, Type.DUST), 2400, getMaterial("lead", Type.SMALL_DUST));
register(getMaterial("lead", 2, Type.DUST), 2400, getMaterial("silver", Type.SMALL_DUST));
register(getMaterial("tin", 2, Type.DUST), 210, getMaterial("zinc", Type.SMALL_DUST), getMaterial("iron", Type.SMALL_DUST));
register(getMaterial("electrum", Type.DUST), 960, getMaterial("gold", 2, Type.SMALL_DUST), getMaterial("silver", 2, Type.SMALL_DUST));
register(getMaterial("zinc", Type.DUST), 1040, getMaterial("tin", Type.SMALL_DUST));
register(getMaterial("brass", Type.DUST), 1500, getMaterial("copper", 3, Type.SMALL_DUST), getMaterial("zinc", Type.SMALL_DUST));
register(getMaterial("platinum", 2, Type.DUST), 3000, getMaterial("iridium", 2, Type.NUGGET), getMaterial("nickel", Type.SMALL_DUST));
register(getMaterial("nickel", 3, Type.DUST), 3440, getMaterial("iron", Type.SMALL_DUST), getMaterial("gold", Type.SMALL_DUST), getMaterial("copper", Type.SMALL_DUST));
register(getMaterial("gold", 3, Type.DUST), 2400, getMaterial("copper", Type.SMALL_DUST), getMaterial("nickel", Type.SMALL_DUST));
register(getMaterial("copper", 3, Type.DUST), 2400, getMaterial("gold", Type.SMALL_DUST), getMaterial("nickel", Type.SMALL_DUST));
register(new ItemStack(ModBlocks.RUBBER_LOG, 16), 5000, false, getMaterial("sap", 8, Type.PART), getMaterial("methane", Type.CELL), getMaterial("carbon", 4, Type.CELL));
register(new ItemStack(Items.REDSTONE, 32), 22000, getMaterial("silicon", 3, Type.CELL), getMaterial("pyrite", 16, Type.DUST), getMaterial("ruby", 3, Type.DUST), getMaterial("mercury", 10, Type.CELL));
register(new ItemStack(Items.GLOWSTONE_DUST, 16), 25000, new ItemStack(Items.REDSTONE, 8), getMaterial("sulfur", 8, Type.DUST), getMaterial("helium", Type.CELL));
register(new ItemStack(Items.DYE, 4, 4), 1500, false, getMaterial("lazurite", 3, Type.DUST), getMaterial("pyrite", Type.SMALL_DUST), getMaterial("calcite", Type.SMALL_DUST), getMaterial("sodalite", 2, Type.SMALL_DUST));
register(getMaterial("ender_eye", 2, Type.DUST), 1840, getMaterial("ender_pearl", Type.DUST), new ItemStack(Items.BLAZE_POWDER));
register(getMaterial("netherrack", 16, Type.DUST), 2400, new ItemStack(Items.REDSTONE), getMaterial("sulfur", 4, Type.DUST), getMaterial("coal", Type.DUST), new ItemStack(Items.GOLD_NUGGET));
register(getMaterial("endstone", 16, Type.DUST), 4800, getMaterial("helium3", Type.CELL), getMaterial("helium", Type.CELL), getMaterial("tungsten", Type.SMALL_DUST), new ItemStack(Blocks.SAND, 12));
register(getMaterial("red_garnet", 16, Type.DUST), 3000, getMaterial("pyrope", 3, Type.DUST), getMaterial("almandine", 5, Type.DUST), getMaterial("spessartine", 8, Type.DUST));
register(getMaterial("yellow_garnet", 16, Type.DUST), 3500, getMaterial("andradite", 5, Type.DUST), getMaterial("grossular", 8, Type.DUST), getMaterial("uvarovite", 3, Type.DUST));
register(getMaterial("dark_ashes", 2, Type.DUST), 240, getMaterial("ashes", 2, Type.DUST));
register(getMaterial("marble", 8, Type.DUST), 1040, getMaterial("magnesium", Type.DUST), getMaterial("calcite", 7, Type.DUST));
register(getMaterial("basalt", 16, Type.DUST), 2040, getMaterial("peridot", Type.DUST), getMaterial("calcite", 3, Type.DUST), getMaterial("flint", 8, Type.DUST), getMaterial("dark_ashes", 4, Type.DUST));
register(getMaterial("hydrogen", 4, Type.CELL), 3000, getMaterial("deuterium", Type.CELL));
register(getMaterial("deuterium", 4, Type.CELL), 3000, getMaterial("tritium", Type.CELL));
register(getMaterial("helium", 16, Type.CELL), 10000, getMaterial("helium3", Type.CELL));
register(getMaterial("calciumcarbonate", Type.CELL), 40, getMaterial("calcite", Type.DUST));
register(getMaterial("sulfur", Type.CELL), 40, getMaterial("sulfur", Type.DUST));
}
static void register(ItemStack input, int ticks, boolean oreDict, ItemStack... outputs) {
ItemStack output1;
ItemStack output2 = null;
ItemStack output3 = null;
ItemStack output4 = null;
if (outputs.length == 3) {
output1 = outputs[0];
output2 = outputs[1];
output3 = outputs[2];
} else if (outputs.length == 2) {
output1 = outputs[0];
output2 = outputs[1];
} else if (outputs.length == 1) {
output1 = outputs[0];
} else if (outputs.length == 4) {
output1 = outputs[0];
output2 = outputs[1];
output3 = outputs[2];
output4 = outputs[3];
} else {
throw new InvalidParameterException("Invalid industrial centrifuge outputs: " + outputs);
}
int cellCount = 0;
for (ItemStack stack : outputs) {
if (stack.getItem() instanceof DynamicCell) {
cellCount += stack.getCount();
}
}
if (input.getItem() instanceof DynamicCell) {
int inputCount = input.getCount();
if (cellCount < inputCount) {
if (output2 == null) {
output2 = DynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output3 == null) {
output3 = DynamicCell.getEmptyCell(inputCount - cellCount);
} else if (output4 == null) {
output4 = DynamicCell.getEmptyCell(inputCount - cellCount);
}
}
cellCount -= inputCount;
}
if (cellCount < 0) {
cellCount = 0;
}
ItemStack cells = null;
if (cellCount > 0) {
if (cellCount > 64) {
throw new InvalidParameterException("Invalid industrial centrifuge outputs: " + outputs + "(Recipe requires > 64 cells)");
}
cells = DynamicCell.getEmptyCell(cellCount);
}
RecipeHandler.addRecipe(new CentrifugeRecipe(input, cells, output1, output2, output3, output4, ticks, 5, oreDict));
}
static void register(ItemStack input, int ticks, ItemStack... outputs) {
register(input, ticks, true, outputs);
}
}

View file

@ -24,6 +24,8 @@ public abstract class RecipeMethods {
return ItemNuggets.getNuggetByName(name, count); return ItemNuggets.getNuggetByName(name, count);
} else if (type == Type.CELL) { } else if (type == Type.CELL) {
return ItemCells.getCellByName(name, count); return ItemCells.getCellByName(name, count);
} else if (type == Type.PART) {
return ItemParts.getPartByName(name, count);
} else { } else {
} }
@ -52,6 +54,6 @@ public abstract class RecipeMethods {
} }
enum Type { enum Type {
DUST, SMALL_DUST, INGOT, NUGGET, PLATE, GEM, CELL DUST, SMALL_DUST, INGOT, NUGGET, PLATE, GEM, CELL, PART
} }
} }