mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-30 18:08:24 +01:00
Fixed AssertionError when logging hopper transactions
This commit is contained in:
parent
718d7d7a80
commit
3f0291e0d5
@ -94,16 +94,15 @@ public final class HopperPushListener {
|
||||
break;
|
||||
}
|
||||
|
||||
ItemStack itemStack = originalDestination[i];
|
||||
ItemStack itemStack = (originalDestination[i] != null ? originalDestination[i].clone() : null);
|
||||
if (itemStack != null && itemStack.isSimilar(movedItem)) {
|
||||
itemStack = itemStack.clone();
|
||||
if (itemStack.getAmount() >= removeAmount) {
|
||||
itemStack.setAmount(itemStack.getAmount() - removeAmount);
|
||||
removeAmount = 0;
|
||||
}
|
||||
else {
|
||||
removeAmount = removeAmount - itemStack.getAmount();
|
||||
itemStack.setAmount(0);
|
||||
itemStack = null;
|
||||
}
|
||||
|
||||
originalDestination[i] = itemStack;
|
||||
|
Loading…
Reference in New Issue
Block a user