From 54cab8890fae9b3f7803b368fb97208d570447b1 Mon Sep 17 00:00:00 2001 From: Juuxel <6596629+Juuxel@users.noreply.github.com> Date: Thu, 9 Apr 2020 18:20:31 +0300 Subject: Fix #43, fix null inventories not being converted to EmptyInventory There's no Nullable on InventoryProvider.getInventory, but some mods return null there. --- .../cotton/gui/CottonCraftingController.java | 32 +++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/main/java/io/github/cottonmc/cotton/gui/CottonCraftingController.java b/src/main/java/io/github/cottonmc/cotton/gui/CottonCraftingController.java index ec0cdc9..000d63d 100644 --- a/src/main/java/io/github/cottonmc/cotton/gui/CottonCraftingController.java +++ b/src/main/java/io/github/cottonmc/cotton/gui/CottonCraftingController.java @@ -110,15 +110,15 @@ public class CottonCraftingController extends AbstractRecipeScreenHandler inventorySlots = new ArrayList<>(); for(Slot slot : slots) { @@ -186,13 +186,13 @@ public class CottonCraftingController extends AbstractRecipeScreenHandler=0; i--) { Slot curSlot = inventorySlots.get(i); - if (insertIntoExisting(toInsert, curSlot)) inserted = true; + if (insertIntoExisting(toInsert, curSlot, player)) inserted = true; if (toInsert.isEmpty()) break; } } else { for(int i=0; i storageSlots = new ArrayList<>(); ArrayList hotbarSlots = new ArrayList<>(); @@ -243,7 +243,7 @@ public class CottonCraftingController extends AbstractRecipeScreenHandler