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

@ -90,7 +90,8 @@ class FallingSand extends Entity{
if(!$this->dead){
if($this->ticksLived === 1){
$block = $this->level->getBlock($pos = Vector3::cloneVector($this)->floor());
$pos = Vector3::cloneVector($this);
$block = $this->level->getBlock($pos->floor());
if($block->getID() != $this->blockId){
$this->kill();
return true;
@ -109,7 +110,8 @@ class FallingSand extends Entity{
$this->motionY *= 1 - $this->drag;
$this->motionZ *= $friction;
$pos = Vector3::cloneVector($this)->floor();
$pos = Vector3::cloneVector($this);
$pos = $pos->floor();
if($this->onGround){
$this->kill();