The Great Refactor of 2017 - Extractor Recipes
This commit is contained in:
parent
bd4103b7df
commit
1215c47fc2
3 changed files with 57 additions and 11 deletions
|
@ -41,7 +41,7 @@ public abstract class BaseRecipe implements IBaseRecipeType, Cloneable {
|
|||
|
||||
public void addOutput(ItemStack stack) {
|
||||
if (stack == null || stack.isEmpty()) {
|
||||
throw new InvalidParameterException("output is invalid!");
|
||||
throw new InvalidParameterException("Output stack is null or empty");
|
||||
}
|
||||
outputs.add(stack);
|
||||
}
|
||||
|
|
|
@ -60,6 +60,7 @@ public class ModRecipes {
|
|||
CompatManager.isQuantumStorageLoaded = Loader.isModLoaded("quantumstorage");
|
||||
|
||||
CraftingTableRecipes.init();
|
||||
ExtractorRecipes.init();
|
||||
IndustrialGrinderRecipes.init();
|
||||
IndustrialCentrifugeRecipes.init();
|
||||
IndustrialElectrolyzerRecipes.init();
|
||||
|
@ -81,7 +82,6 @@ public class ModRecipes {
|
|||
addReactorRecipes();
|
||||
addIc2Recipes();
|
||||
addGrinderRecipes();
|
||||
addExtractorRecipes();
|
||||
addCompressorRecipes();
|
||||
if (!IC2Duplicates.deduplicate()) {
|
||||
addWireRecipes();
|
||||
|
@ -379,15 +379,6 @@ public class ModRecipes {
|
|||
4));
|
||||
}
|
||||
|
||||
static void addExtractorRecipes() {
|
||||
RecipeHandler.addRecipe(
|
||||
new ExtractorRecipe(ItemParts.getPartByName("rubberSap"),
|
||||
ItemParts.getPartByName("rubber", 3), 400, 2));
|
||||
RecipeHandler.addRecipe(
|
||||
new ExtractorRecipe(new ItemStack(ModBlocks.RUBBER_LOG),
|
||||
ItemParts.getPartByName("rubber"), 400, 2, false));
|
||||
}
|
||||
|
||||
static void addGrinderRecipes() {
|
||||
|
||||
// Vanilla
|
||||
|
|
55
src/main/java/techreborn/init/recipes/ExtractorRecipes.java
Normal file
55
src/main/java/techreborn/init/recipes/ExtractorRecipes.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package techreborn.init.recipes;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
import reborncore.api.recipe.RecipeHandler;
|
||||
import techreborn.api.recipe.machines.ExtractorRecipe;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.items.DynamicCell;
|
||||
|
||||
/**
|
||||
* Created by Prospector
|
||||
*/
|
||||
public class ExtractorRecipes extends RecipeMethods {
|
||||
public static void init() {
|
||||
register(new ItemStack(ModBlocks.RUBBER_SAPLING), false, getMaterial("rubber", Type.PART));
|
||||
register(new ItemStack(ModBlocks.RUBBER_LOG), false, getMaterial("rubber", Type.PART));
|
||||
register(new ItemStack(Items.SLIME_BALL), getMaterial("rubber", 2, Type.PART));
|
||||
register(getMaterial("sap", Type.PART), getMaterial("rubber", 3, Type.PART));
|
||||
register(new ItemStack(Blocks.RED_FLOWER), new ItemStack(Items.DYE, 2, 1));
|
||||
register(new ItemStack(Blocks.YELLOW_FLOWER), new ItemStack(Items.DYE, 2, 11));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 1), new ItemStack(Items.DYE, 2, 12));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 2), new ItemStack(Items.DYE, 2, 13));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 3), new ItemStack(Items.DYE, 2, 7));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 4), new ItemStack(Items.DYE, 2, 1));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 5), new ItemStack(Items.DYE, 2, 14));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 6), new ItemStack(Items.DYE, 2, 7));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 7), new ItemStack(Items.DYE, 2, 9));
|
||||
register(new ItemStack(Blocks.RED_FLOWER, 1, 8), new ItemStack(Items.DYE, 2, 7));
|
||||
register(new ItemStack(Blocks.DOUBLE_PLANT), new ItemStack(Items.DYE, 4, 11));
|
||||
register(new ItemStack(Blocks.DOUBLE_PLANT, 1, 1), new ItemStack(Items.DYE, 4, 13));
|
||||
register(new ItemStack(Blocks.DOUBLE_PLANT, 1, 4), new ItemStack(Items.DYE, 4, 1));
|
||||
register(new ItemStack(Blocks.DOUBLE_PLANT, 1, 5), new ItemStack(Items.DYE, 4, 9));
|
||||
register(new ItemStack(Blocks.TALLGRASS, 1, 1), new ItemStack(Items.WHEAT_SEEDS));
|
||||
register(new ItemStack(Blocks.TALLGRASS, 1, 2), new ItemStack(Items.WHEAT_SEEDS));
|
||||
register(new ItemStack(Blocks.DOUBLE_PLANT, 1, 2), new ItemStack(Items.WHEAT_SEEDS, 2));
|
||||
register(new ItemStack(Blocks.DOUBLE_PLANT, 1, 3), new ItemStack(Items.WHEAT_SEEDS, 2));
|
||||
register(new ItemStack(Blocks.DEADBUSH, 1, 0), new ItemStack(Items.STICK));
|
||||
for (int i = 1; i < 15; i++)
|
||||
register(new ItemStack(Blocks.WOOL, 1, i), new ItemStack(Blocks.WOOL, 1, 0));
|
||||
for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
|
||||
register(DynamicCell.getCellWithFluid(fluid), DynamicCell.getEmptyCell(1));
|
||||
}
|
||||
}
|
||||
|
||||
static void register(ItemStack input, ItemStack output) {
|
||||
register(input, true, output);
|
||||
}
|
||||
|
||||
static void register(ItemStack input, boolean oreDict, ItemStack output) {
|
||||
RecipeHandler.addRecipe(new ExtractorRecipe(input, output, 400, 2, oreDict));
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue