mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fix dropped items not saving due to missing CompoundTag name, close #223
The NBT library is really badly designed.
This commit is contained in:
parent
25b9581254
commit
7e15c6638a
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user