mirror of
https://github.com/JamesPeters98/ChestsPlusPlus.git
synced 2024-11-25 20:16:24 +01:00
commit
f109d4cee0
@ -53,13 +53,15 @@ public class HopperListener implements Listener {
|
|||||||
|
|
||||||
// Loop over the inventory until next item is found, if no item found return.
|
// Loop over the inventory until next item is found, if no item found return.
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (index >= event.getSource().getSize()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ItemStack item = event.getSource().getItem(index++);
|
ItemStack item = event.getSource().getItem(index++);
|
||||||
|
|
||||||
if (item == null)
|
if (item == null) {
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
if (index >= event.getSource().getSize())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (isFilteredItem.apply(item)) {
|
if (isFilteredItem.apply(item)) {
|
||||||
Utils.hopperMove(event.getSource(), item, hopperAmount, event.getDestination());
|
Utils.hopperMove(event.getSource(), item, hopperAmount, event.getDestination());
|
||||||
@ -67,7 +69,6 @@ public class HopperListener implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user