diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 1bfde2e..5566518 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/InventoryUtils.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/InventoryUtils.java index 7babe0b..ca49e88 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/InventoryUtils.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/InventoryUtils.java @@ -84,4 +84,12 @@ public class InventoryUtils { } return remaining; } + public static boolean InventoryContainSameMaterial(Inventory inv, ItemStack item) { + for (ItemStack i : inv.getContents()) { + if (i!=null && item!=null && i.getType()==item.getType()) { + return true; + } + } + return false; + } } diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/ItemCubeUtils.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/ItemCubeUtils.java index f2f25b7..34ab325 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/ItemCubeUtils.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Utils/ItemCubeUtils.java @@ -46,7 +46,7 @@ public class ItemCubeUtils { HashMap reject_items = new HashMap(); for (ItemStack it : remaining) { if (it!=null) { - if (inv.containsAtLeast(it, 1)) { + if (InventoryUtils.InventoryContainSameMaterial(inv, it)) { HashMap extras = cube_inv.addItem(it); if (extras.size()==0) { List itemslist = new ArrayList();