Lock player position for delayed teleport, and add related assertions

This commit is contained in:
Dylan K. Taylor
2017-01-26 11:13:35 +00:00
parent ccef0455ab
commit 740a8ad436
2 changed files with 3 additions and 1 deletions

View File

@ -1297,6 +1297,8 @@ abstract class Entity extends Location implements Metadatable{
//TODO: big messy loop
}*/
assert(abs($dx) <= 20 and abs($dy) <= 20 and abs($dz) <= 20, "Movement distance is excessive: dx=$dx, dy=$dy, dz=$dz");
$list = $this->level->getCollisionCubes($this, $this->level->getTickRate() > 1 ? $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz) : $this->boundingBox->addCoord($dx, $dy, $dz), false);
foreach($list as $bb){