66 if(!$this->inventory->slotExists($this->inventorySlot)){
69 if(!$this->inventory->getItem($this->inventorySlot)->equalsExact($this->sourceItem)){
72 if($this->targetItem->getCount() > $this->targetItem->getMaxStackSize()){
75 if($this->targetItem->getCount() > $this->inventory->getMaxStackSize()){
78 if($this->inventory instanceof SlotValidatedInventory && !$this->targetItem->isNull()){
79 foreach($this->inventory->getSlotValidators() as $validator){
80 $ret = $validator->validate($this->inventory, $this->targetItem, $this->inventorySlot);
82 throw new TransactionValidationException(
"Target item is not accepted by the inventory at slot #" . $this->inventorySlot .
": " . $ret->getMessage(), 0, $ret);