mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Updated the BlockAPI::drop method
This commit is contained in:
@@ -114,8 +114,13 @@ class Entity extends stdClass{
|
||||
$this->server->schedule(5, array($this, "update"), array(), true);
|
||||
break;
|
||||
case ENTITY_ITEM:
|
||||
$this->meta = (int) $this->data["meta"];
|
||||
$this->stack = (int) $this->data["stack"];
|
||||
if($data["item"] instanceof Item){
|
||||
$this->meta = $this->data["item"]->getMetadata();
|
||||
$this->stack = $this->data["item"]->count;
|
||||
}else{
|
||||
$this->meta = (int) $this->data["meta"];
|
||||
$this->stack = (int) $this->data["stack"];
|
||||
}
|
||||
$this->setHealth(5, "generic");
|
||||
$this->server->schedule(5, array($this, "update"), array(), true);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user