diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 510a207f..13370310 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -304,11 +304,11 @@ class ConsoleLoop extends Thread{ } while(!$this->stop){ - $this->synchronized(function($t){ - $t->line = $t->readLine(); - $t->wait(); - }, $this); - $this->line = false; + $this->line = $this->readLine(); + $this->synchronized(function($t) { + $this->wait(); + $this->line = false; + }, $this); } if(!extension_loaded("readline")){ diff --git a/src/entity/Entity.php b/src/entity/Entity.php index 128831d8..77f18bfd 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -624,12 +624,12 @@ class Entity extends Position } if($b != false && $b->boundingBox->intersectsWith($aABB) && $b->isSolid && $this->isMoving()){ $this->speedX = $b->boundingBox->calculateXOffset($this->boundingBox, $this->speedX); + $this->speedZ = $b->boundingBox->calculateZOffset($this->boundingBox, $this->speedZ); $lastY = $this->speedY; $this->speedY = $b->boundingBox->calculateYOffset($this->boundingBox, $this->speedY); if($this->speedY == 0 && $lastY > 0){ $support = true; } - $this->speedZ = $b->boundingBox->calculateZOffset($this->boundingBox, $this->speedZ); } } }