diff --git a/src/entity/Entity.php b/src/entity/Entity.php index a84c74245..b50844d65 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -1306,8 +1306,7 @@ abstract class Entity{ } $oldWorld = $this->getWorld(); - //TODO: staying in the same world when the target is invalid is probably not expected behaviour... this should bail instead - $newWorld = $pos instanceof Position && $pos->isValid() ? $pos->getWorld() : $oldWorld; + $newWorld = $pos instanceof Position ? $pos->getWorld() : $oldWorld; if($oldWorld !== $newWorld){ $this->despawnFromAll(); $oldWorld->removeEntity($this);