Fix dropped items not saving due to missing CompoundTag name, close #223

The NBT library is really badly designed.
This commit is contained in:
Dylan K. Taylor 2017-01-01 21:34:07 +00:00
parent 25b9581254
commit 7e15c6638a

View File

@ -160,7 +160,7 @@ class Item extends Entity{
public function saveNBT(){
parent::saveNBT();
$this->namedtag->Item = $this->item->nbtSerialize();
$this->namedtag->Item = $this->item->nbtSerialize(-1, "Item");
$this->namedtag->Health = new ShortTag("Health", $this->getHealth());
$this->namedtag->Age = new ShortTag("Age", $this->age);
$this->namedtag->PickupDelay = new ShortTag("PickupDelay", $this->pickupDelay);