Extract a CreativeInventory unit from Item

this will probably undergo further changes, but I'm primarily interested in just encapsulating the existing functionality for now.
This commit is contained in:
Dylan K. Taylor
2019-06-07 14:24:03 +01:00
parent 41039cecc1
commit 7eb9b33fd6
5 changed files with 104 additions and 67 deletions

View File

@@ -165,7 +165,7 @@ class PlayerInventory extends BaseInventory{
$items = [];
if(!$holder->isSpectator()){ //fill it for all gamemodes except spectator
foreach(Item::getCreativeItems() as $i => $item){
foreach(CreativeInventory::getAll() as $i => $item){
$items[$i] = clone $item;
}
}