mirror of
https://github.com/PlayPro/CoreProtect.git
synced 2024-12-28 17:47:41 +01:00
Fixed hopper pulls performing container validation on source block
This commit is contained in:
parent
3e3496ad12
commit
6023c21ba9
@ -28,7 +28,7 @@ public final class HopperPullListener {
|
||||
}
|
||||
}
|
||||
|
||||
ItemStack[] sourceContainer = Util.getContainerState(sourceHolder.getInventory().getContents());
|
||||
ItemStack[] destinationContainer = Util.getContainerState(destinationHolder.getInventory().getContents());
|
||||
ItemStack movedItem = item.clone();
|
||||
|
||||
final long taskStarted = InventoryChangeListener.tasksStarted.incrementAndGet();
|
||||
@ -39,7 +39,7 @@ public final class HopperPullListener {
|
||||
}
|
||||
|
||||
boolean abort = false;
|
||||
boolean addedInventory = Util.canAddContainer(sourceContainer, movedItem, sourceHolder.getInventory().getMaxStackSize());
|
||||
boolean addedInventory = Util.canAddContainer(destinationContainer, movedItem, destinationHolder.getInventory().getMaxStackSize());
|
||||
if (!addedInventory) {
|
||||
abort = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user