Working item frames

This commit is contained in:
Dylan K. Taylor
2016-12-14 18:30:40 +00:00
parent c4d4277a6c
commit 8c772fe671
6 changed files with 211 additions and 13 deletions

View File

@ -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;
}
}