aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/plugin/VanillaPlugin.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-01-05 22:14:37 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-01-05 22:14:37 +0800
commit63fdcc76da7e2d7cbd79d327c6dd72404708f64f (patch)
tree7d95f69850beb2935856253db1d8515493717d1a /src/main/java/me/shedaniel/plugin/VanillaPlugin.java
parent418ee1e13fb66ef30c9473e0069695d89967124f (diff)
downloadRoughlyEnoughItems-63fdcc76da7e2d7cbd79d327c6dd72404708f64f.tar.gz
RoughlyEnoughItems-63fdcc76da7e2d7cbd79d327c6dd72404708f64f.tar.bz2
RoughlyEnoughItems-63fdcc76da7e2d7cbd79d327c6dd72404708f64f.zip
Buggy Autocrafting
Diffstat (limited to 'src/main/java/me/shedaniel/plugin/VanillaPlugin.java')
-rwxr-xr-xsrc/main/java/me/shedaniel/plugin/VanillaPlugin.java40
1 files changed, 19 insertions, 21 deletions
diff --git a/src/main/java/me/shedaniel/plugin/VanillaPlugin.java b/src/main/java/me/shedaniel/plugin/VanillaPlugin.java
index 5b0bb9e82..a9cebf134 100755
--- a/src/main/java/me/shedaniel/plugin/VanillaPlugin.java
+++ b/src/main/java/me/shedaniel/plugin/VanillaPlugin.java
@@ -30,8 +30,6 @@ import net.minecraft.recipe.smelting.SmeltingRecipe;
import net.minecraft.recipe.smelting.SmokingRecipe;
import net.minecraft.util.registry.Registry;
-import java.lang.reflect.Array;
-import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
@@ -39,13 +37,13 @@ import java.util.stream.Collectors;
public class VanillaPlugin implements IREIPlugin, PotionCraftingAdder {
private List<VanillaPotionRecipe> potionRecipes = new LinkedList<>();
+ private List<VanillaCraftingRecipe> recipes = new LinkedList<>();
+ private List<VanillaFurnaceRecipe> furnaceRecipes = new LinkedList<>();
+ private List<VanillaSmokerRecipe> smokerRecipes = new LinkedList<>();
+ private List<VanillaBlastFurnaceRecipe> blastFurnaceRecipes = new LinkedList<>();
@Override
- public void register() {
- List<VanillaCraftingRecipe> recipes = new LinkedList<>();
- List<VanillaFurnaceRecipe> furnaceRecipes = new LinkedList<>();
- List<VanillaSmokerRecipe> smokerRecipes = new LinkedList<>();
- List<VanillaBlastFurnaceRecipe> blastFurnaceRecipes = new LinkedList<>();
+ public void registerCategories() {
REIRecipeManager.instance().addDisplayAdapter(new VanillaCraftingCategory());
REIRecipeManager.instance().addDisplayAdapter(new VanillaFurnaceCategory());
REIRecipeManager.instance().addDisplayAdapter(new VanillaSmokerCategory());
@@ -56,25 +54,21 @@ public class VanillaPlugin implements IREIPlugin, PotionCraftingAdder {
// REIRecipeManager.instance().addDisplayAdapter(new TestRandomCategory("c", new ItemStack(Items.ITEM_FRAME)));
// REIRecipeManager.instance().addDisplayAdapter(new TestRandomCategory("d", new ItemStack(Items.ITEM_FRAME)));
// REIRecipeManager.instance().addDisplayAdapter(new TestRandomCategory("e", new ItemStack(Items.ITEM_FRAME)));
-
-
- for(Recipe recipe : REIRecipeManager.instance().recipeManager.values()) {
- if (recipe instanceof ShapelessRecipe) {
+ }
+
+ @Override
+ public void registerRecipes() {
+ for(Recipe recipe : REIRecipeManager.instance().recipeManager.values())
+ if (recipe instanceof ShapelessRecipe)
recipes.add(new VanillaShapelessCraftingRecipe((ShapelessRecipe) recipe));
- }
- if (recipe instanceof ShapedRecipe) {
+ else if (recipe instanceof ShapedRecipe)
recipes.add(new VanillaShapedCraftingRecipe((ShapedRecipe) recipe));
- }
- if (recipe instanceof SmeltingRecipe) {
+ else if (recipe instanceof SmeltingRecipe)
furnaceRecipes.add(new VanillaFurnaceRecipe((SmeltingRecipe) recipe));
- }
- if (recipe instanceof SmokingRecipe) {
+ else if (recipe instanceof SmokingRecipe)
smokerRecipes.add(new VanillaSmokerRecipe((SmokingRecipe) recipe));
- }
- if (recipe instanceof BlastingRecipe) {
+ else if (recipe instanceof BlastingRecipe)
blastFurnaceRecipes.add(new VanillaBlastFurnaceRecipe((BlastingRecipe) recipe));
- }
- }
Registry.POTION.stream().filter(potion -> !potion.equals(Potions.EMPTY)).forEach(potion -> {
ItemStack basePotion = PotionUtil.setPotion(new ItemStack(Items.POTION), potion),
splashPotion = PotionUtil.setPotion(new ItemStack(Items.SPLASH_POTION), potion),
@@ -97,6 +91,10 @@ public class VanillaPlugin implements IREIPlugin, PotionCraftingAdder {
// REIRecipeManager.instance().addRecipe("e", Arrays.asList(new RandomRecipe("e")));
}
+ @Override
+ public void registerSpecialGuiExclusion() {
+
+ }
@Override
public void addPotionRecipe(Potion inputType, Item reagent, Potion outputType) {