mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 11:16:57 +00:00
BaseInventory: fixed internalAddItem() doing useless canStackWith() checks on null items
if the item is null, it's never going to stack with anything given to this function, because addItem() already discards null items.
This commit is contained in:
@ -219,6 +219,7 @@ abstract class BaseInventory implements Inventory{
|
||||
$item = $this->getItem($i);
|
||||
if($item->isNull()){
|
||||
$emptySlots[] = $i;
|
||||
continue;
|
||||
}
|
||||
|
||||
if($slot->canStackWith($item) && $item->getCount() < $item->getMaxStackSize()){
|
||||
|
Reference in New Issue
Block a user