1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-19 19:25:48 +00:00

RecipeType.GetInputList() will now return an empty List if the Machine

is null
This commit is contained in:
mrCookieSlime 2016-04-17 08:28:05 +02:00
parent 467b5ac74c
commit c787a9a538

View File

@ -66,6 +66,7 @@ public class RecipeType {
}
public static List<ItemStack> getRecipeInputs(SlimefunItem machine) {
if (machine == null) return new ArrayList<ItemStack>();
List<ItemStack[]> recipes = (machine instanceof SlimefunMachine ? ((SlimefunMachine) machine).getRecipes(): ((SlimefunGadget) machine).getRecipes());
List<ItemStack> convertable = new ArrayList<ItemStack>();
for (int i = 0; i < recipes.size(); i++) {
@ -75,6 +76,7 @@ public class RecipeType {
}
public static List<ItemStack[]> getRecipeInputList(SlimefunItem machine) {
if (machine == null) return new ArrayList<ItemStack[]>();
List<ItemStack[]> recipes = (machine instanceof SlimefunMachine ? ((SlimefunMachine) machine).getRecipes(): ((SlimefunGadget) machine).getRecipes());
List<ItemStack[]> convertable = new ArrayList<ItemStack[]>();
for (int i = 0; i < recipes.size(); i++) {