Improved move offset check

This commit is contained in:
Shoghi Cervantes
2015-01-02 19:14:18 +01:00
parent e8ad828498
commit 04bdb13103
4 changed files with 5 additions and 5 deletions

View File

@@ -877,7 +877,7 @@ abstract class Entity extends Location implements Metadatable{
//TODO: big messy loop
}*/
$list = $this->level->getCollisionCubes($this, $this->boundingBox->addCoord($dx, $dy, $dz));
$list = $this->level->getCollisionCubes($this, $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz));
foreach($list as $bb){
@@ -931,7 +931,7 @@ abstract class Entity extends Location implements Metadatable{
$this->boundingBox->setBB($axisalignedbb);
$list = $this->level->getCollisionCubes($this, $this->boundingBox->addCoord($dx, $dy, $dz), false);
$list = $this->level->getCollisionCubes($this, $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz), false);
foreach($list as $bb){
$dy = $bb->calculateYOffset($this->boundingBox, $dy);