Eradicate remaining usages of public Position->world field

and as an added bonus, ditch a bunch of extra phpstan errors
This commit is contained in:
Dylan K. Taylor
2020-05-19 19:14:56 +01:00
parent 8a8b1b0b97
commit 337addf1de
4 changed files with 4 additions and 84 deletions

View File

@@ -1337,7 +1337,7 @@ abstract class Entity{
return false;
}
if($pos instanceof Position and $pos->world !== null and $pos->world !== $this->getWorld()){
if($pos instanceof Position and $pos->isValid() and $pos->getWorldNonNull() !== $this->getWorld()){
if(!$this->switchWorld($pos->getWorldNonNull())){
return false;
}