Fixed behavior of Filter Cubes not filtering same types of material.
This commit is contained in:
parent
bdd45d404c
commit
8752760670
Binary file not shown.
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class ItemCubeUtils {
|
||||
HashMap<Integer,ItemStack> reject_items = new HashMap<Integer,ItemStack>();
|
||||
for (ItemStack it : remaining) {
|
||||
if (it!=null) {
|
||||
if (inv.containsAtLeast(it, 1)) {
|
||||
if (InventoryUtils.InventoryContainSameMaterial(inv, it)) {
|
||||
HashMap<Integer,ItemStack> extras = cube_inv.addItem(it);
|
||||
if (extras.size()==0) {
|
||||
List<ItemStack> itemslist = new ArrayList<ItemStack>();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user