40 private array $caches = [];
43 $id = spl_object_id($inventory);
44 if(!isset($this->caches[$id])){
45 $inventory->getDestructorCallbacks()->
add(
function() use ($id) :
void{
46 unset($this->caches[$id]);
49 unset($this->caches[$id]);
51 $this->caches[$id] = $this->buildCreativeInventoryCache($inventory);
53 return $this->caches[$id];
61 $typeConverter = TypeConverter::getInstance();
63 foreach($inventory->
getAll() as $k => $item){
static create(array $entries)