mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Working item frames
This commit is contained in:
@ -43,13 +43,6 @@ class ItemFrame extends Spawnable{
|
||||
parent::__construct($chunk, $nbt);
|
||||
}
|
||||
|
||||
public function dropItem(){
|
||||
if(lcg_value() < $this->getDropChance() and $this->hasItem()){
|
||||
$this->level->dropItem($this, $this->getItem());
|
||||
}
|
||||
$this->setItem(null);
|
||||
}
|
||||
|
||||
public function hasItem() : bool{
|
||||
return $this->getItem()->getId() !== Item::AIR;
|
||||
}
|
||||
@ -103,4 +96,5 @@ class ItemFrame extends Spawnable{
|
||||
}
|
||||
return $tag;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user