World: remove dead code leftover from 34f01a3ce3c02f41cfebfc81d34b755cfed62811

fixes #4486
This commit is contained in:
Dylan K. Taylor 2021-10-02 12:33:46 +01:00
parent c6b2c63a9b
commit f5266ec816
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -2289,10 +2289,6 @@ class World implements ChunkManager{
}
}
$pos = $entity->getPosition()->asVector3();
$chunk = $this->getOrLoadChunkAtPosition($pos);
if($chunk === null){
throw new \InvalidArgumentException("Cannot add an Entity in an ungenerated chunk");
}
$this->entitiesByChunk[World::chunkHash($pos->getFloorX() >> Chunk::COORD_BIT_SIZE, $pos->getFloorZ() >> Chunk::COORD_BIT_SIZE)][$entity->getId()] = $entity;
$this->entityLastKnownPositions[$entity->getId()] = $pos;