Updated to receive new optimizations

This commit is contained in:
Shoghi Cervantes
2014-10-30 16:02:48 +01:00
parent 6e8e2a79dd
commit 57d1847c50
7 changed files with 65 additions and 57 deletions

View File

@ -776,7 +776,8 @@ abstract class Entity extends Location implements Metadatable{
}
public function isInsideOfWater(){
$block = $this->level->getBlock(Vector3::createVector($this->x, $y = ($this->y + $this->getEyeHeight()), $this->z)->floor());
$pos = Vector3::createVector($this->x, $y = ($this->y + $this->getEyeHeight()), $this->z);
$block = $this->level->getBlock($pos->floor());
if($block instanceof Water){
$f = ($block->y + 1) - ($block->getFluidHeightPercent() - 0.1111111);
@ -787,7 +788,8 @@ abstract class Entity extends Location implements Metadatable{
}
public function isInsideOfSolid(){
$block = $this->level->getBlock(Vector3::createVector($this->x, $y = ($this->y + $this->getEyeHeight()), $this->z)->floor());
$pos = Vector3::createVector($this->x, $y = ($this->y + $this->getEyeHeight()), $this->z);
$block = $this->level->getBlock($pos->floor());
$bb = $block->getBoundingBox();