mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Sweet Berry Bush now absorbs fall damage (#4876)
This commit is contained in:
parent
dfd8c4e4b8
commit
91f81d4c8e
@ -151,9 +151,11 @@ class SweetBerryBush extends Flowable{
|
||||
}
|
||||
|
||||
public function onEntityInside(Entity $entity) : bool{
|
||||
//TODO: in MCPE, this only triggers if moving while inside the bush block - we don't have the system to deal
|
||||
//with that reliably right now
|
||||
if($this->age >= self::STAGE_BUSH_NO_BERRIES && $entity instanceof Living){
|
||||
$entity->resetFallDistance();
|
||||
|
||||
//TODO: in MCPE, this only triggers if moving while inside the bush block - we don't have the system to deal
|
||||
//with that reliably right now
|
||||
$entity->attack(new EntityDamageByBlockEvent($this, $entity, EntityDamageByBlockEvent::CAUSE_CONTACT, 1));
|
||||
}
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user