public function spawnTo(Player $p) { $pk = new AddItemEntityPacket(); $pk->x = $this->x + 0.5; $pk->y = $this->y + 1; $pk->z = $this->z + 0.5; $pk->entityRuntimeId = $this->eid; $pk->item = $this->item; $p->dataPacket ( $pk ); } I test on PocketMine-MP API 3.0.0-ALPHA7. I make itemcase, and after time passes always disappear itemcase. How to fix?
actually we can there's nothing hard to read, it's just sometimes we want excuses to not be helpful i think you need to resend it every so often to prevent it disappearing
most likely it despawns because how the client handles DroppedItems so you probably have to resend every 5 mins but that might cause lag.