Merge branch 'minor-next' into major-next

This commit is contained in:
Dylan K. Taylor
2023-05-06 17:20:37 +01:00
19 changed files with 259 additions and 170 deletions

View File

@ -207,11 +207,13 @@ class InventoryManager{
if($entry === null){
return null;
}
$inventory = $entry->getInventory();
$coreSlotId = $entry->mapNetToCore($netSlotId);
return $coreSlotId !== null ? [$entry->getInventory(), $coreSlotId] : null;
return $coreSlotId !== null && $inventory->slotExists($coreSlotId) ? [$inventory, $coreSlotId] : null;
}
if(isset($this->networkIdToInventoryMap[$windowId])){
return [$this->networkIdToInventoryMap[$windowId], $netSlotId];
$inventory = $this->networkIdToInventoryMap[$windowId] ?? null;
if($inventory !== null && $inventory->slotExists($netSlotId)){
return [$inventory, $netSlotId];
}
return null;
}