mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Updated the BlockAPI::drop method
This commit is contained in:
parent
326864f889
commit
287fa7e551
6 changed files with 27 additions and 28 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue