mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-12 12:55:21 +00:00
SplashPotion: Don't apply effects to entities which are not alive
fixes #2372
This commit is contained in:
parent
565373cee6
commit
b2ca364de0
@ -82,7 +82,7 @@ class SplashPotion extends Throwable{
|
|||||||
if($hasEffects){
|
if($hasEffects){
|
||||||
if(!$this->willLinger()){
|
if(!$this->willLinger()){
|
||||||
foreach($this->level->getNearbyEntities($this->boundingBox->expandedCopy(4.125, 2.125, 4.125), $this) as $entity){
|
foreach($this->level->getNearbyEntities($this->boundingBox->expandedCopy(4.125, 2.125, 4.125), $this) as $entity){
|
||||||
if($entity instanceof Living){
|
if($entity instanceof Living and $entity->isAlive()){
|
||||||
$distanceSquared = $entity->distanceSquared($this);
|
$distanceSquared = $entity->distanceSquared($this);
|
||||||
if($distanceSquared > 16){ //4 blocks
|
if($distanceSquared > 16){ //4 blocks
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user