1
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:
Martin Brom 2021-05-30 13:20:09 +02:00
parent cf362f7c7a
commit cda2228a7d

View File

@ -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());