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