mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fix IllegalArgumentException when ChestTerminal is requesting items
Resolves #3091
This commit is contained in:
parent
cf362f7c7a
commit
cda2228a7d
@ -185,8 +185,11 @@ final class CargoUtils {
|
||||
for (int slot = minSlot; slot < maxSlot; slot++) {
|
||||
// Changes to these ItemStacks are synchronized with the Item in the Inventory
|
||||
ItemStack itemInSlot = contents[slot];
|
||||
ItemStackWrapper wrapperInSlot = ItemStackWrapper.wrap(itemInSlot);
|
||||
if (itemInSlot == null || itemInSlot.getType() == Material.AIR) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ItemStackWrapper wrapperInSlot = ItemStackWrapper.wrap(itemInSlot);
|
||||
if (SlimefunUtils.isItemSimilar(wrapperInSlot, wrapper, true, false) && matchesFilter(network, node, wrapperInSlot)) {
|
||||
if (itemInSlot.getAmount() > template.getAmount()) {
|
||||
itemInSlot.setAmount(itemInSlot.getAmount() - template.getAmount());
|
||||
|
Loading…
Reference in New Issue
Block a user