Merge branch 'Creeperface01-patch-11'

This commit is contained in:
Intyre 2015-12-20 00:30:15 +01:00
commit 55ce453e17
No known key found for this signature in database
GPG Key ID: B06D41D26935005A

View File

@ -96,13 +96,15 @@ class Cake extends Transparent{
$ev = new EntityRegainHealthEvent($player, 3, EntityRegainHealthEvent::CAUSE_EATING);
$player->heal($ev->getAmount(), $ev);
if($this->meta >= 0x06){
$this->getLevel()->setBlock($this, new Air(), true);
}else{
$this->getLevel()->setBlock($this, $this, true);
}
if(!$ev->isCancelled()){
if($this->meta >= 0x06){
$this->getLevel()->setBlock($this, new Air(), true);
}else{
$this->getLevel()->setBlock($this, $this, true);
}
return true;
return true;
}
}
return false;