Fix NPE with Lumbermill (#35)

* Remove outdated script

* updateBuildScript

* Update dependencies

* Fix NPE with Lumbermill

---------

Co-authored-by: Martin Robertz <dream-master@gmx.net>
This commit is contained in:
miozuneandMartin Robertz authored and GitHub committed 2023-08-19 12:34:10 +02:00
1 parent 669aee5ba6
commit ef877e2f7d
8 files changed
+49 -116

No files matched your search

@@ -29,19 +29,18 @@ public class Lumbermill {
public static Map<ItemStack, ItemStack> recipes = new HashMap<>();
public static ItemStack getPlankProduct(ItemStack item) {
ItemStack stack = null;
if (Lumbermill.recipes.isEmpty()) {
calculateLumbermillProducts();
}
for (Map.Entry<ItemStack, ItemStack> entry : Lumbermill.recipes.entrySet()) {
if (entry.getKey().isItemEqual(item)) {
stack = entry.getValue().copy();
break;
ItemStack stack = entry.getValue().copy();
stack.stackSize = 6;
return stack;
}
}
stack.stackSize = 6;
return stack;
return null;
}
public static void calculateLumbermillProducts() {