mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fix for crashes via item (MCPE-1198)
This commit is contained in:
parent
3578b90a39
commit
f1c593d809
4 changed files with 6 additions and 18 deletions
|
|
@ -32,7 +32,7 @@ class Item{
|
|||
|
||||
|
||||
);
|
||||
protected $block = false;
|
||||
protected $block;
|
||||
protected $id;
|
||||
protected $meta;
|
||||
protected $count;
|
||||
|
|
@ -45,7 +45,7 @@ class Item{
|
|||
$this->meta = (int) $meta;
|
||||
$this->count = (int) $count;
|
||||
$this->name = $name;
|
||||
if(isset(Block::$class[$this->id])){
|
||||
if(!isset($this->block) and isset(Block::$class[$this->id])){
|
||||
$this->block = BlockAPI::get($this->id, $this->meta);
|
||||
$this->name = $this->block->getName();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue