mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-14 01:14:21 +00:00
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:
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() {
|
||||
|
||||
Reference in new issue
Block a user