diff --git a/src/pocketmine/block/BlockFactory.php b/src/pocketmine/block/BlockFactory.php index f00d8e15f0..a6bf9472ce 100644 --- a/src/pocketmine/block/BlockFactory.php +++ b/src/pocketmine/block/BlockFactory.php @@ -65,6 +65,7 @@ class BlockFactory{ self::$hardness = new \SplFixedArray(256); self::$transparent = new \SplFixedArray(256); self::$diffusesSkyLight = new \SplFixedArray(256); + self::$blastResistance = new \SplFixedArray(256); self::registerBlock(new Air()); self::registerBlock(new Stone()); diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 4b39881ffd..685ab88420 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -1238,18 +1238,18 @@ abstract class Entity extends Location implements Metadatable{ protected function tryChangeMovement(){ $friction = 1 - $this->drag; - if(!$this->onGround){ - if($this->applyDragBeforeGravity()){ - $this->motionY *= $friction; - } + if($this->applyDragBeforeGravity()){ + $this->motionY *= $friction; + } - $this->applyGravity(); + $this->applyGravity(); - if(!$this->applyDragBeforeGravity()){ - $this->motionY *= $friction; - } - }else{ - $friction = $this->level->getBlock($this->floor()->subtract(0, 1, 0))->getFrictionFactor(); + if(!$this->applyDragBeforeGravity()){ + $this->motionY *= $friction; + } + + if($this->onGround){ + $friction *= $this->level->getBlock($this->floor()->subtract(0, 1, 0))->getFrictionFactor(); } $this->motionX *= $friction; @@ -1341,7 +1341,6 @@ abstract class Entity extends Location implements Metadatable{ */ final public function setForceMovementUpdate(bool $value = true){ $this->forceMovementUpdate = $value; - $this->onGround = false; $this->blocksAround = null; } diff --git a/src/raklib b/src/raklib index 05419714c3..3b1ca9c1be 160000 --- a/src/raklib +++ b/src/raklib @@ -1 +1 @@ -Subproject commit 05419714c36c10db86edaa0c7049a9f054e4a3b4 +Subproject commit 3b1ca9c1bedf1a18ef40757665bf8c9e7e769c9c