Added events

This commit is contained in:
PEMapModder
2016-02-11 22:07:04 +08:00
parent 8807617480
commit e79976bdac
18 changed files with 405 additions and 53 deletions

View File

@ -1042,6 +1042,17 @@ class Item{
return $this->block !== null and $this->block->canBePlaced();
}
public function canBeConsumed() : bool{
return false;
}
public function canBeConsumedBy(Entity $entity) : bool{
return $this->canBeConsumed();
}
public function onConsume(Entity $entity){
}
public function getBlock() : Block{
if($this->block instanceof Block){
return clone $this->block;