mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +00:00
Merge branch 'master' into mcpe-1.2
This commit is contained in:
commit
770616d4ab
@ -65,6 +65,7 @@ class BlockFactory{
|
|||||||
self::$hardness = new \SplFixedArray(256);
|
self::$hardness = new \SplFixedArray(256);
|
||||||
self::$transparent = new \SplFixedArray(256);
|
self::$transparent = new \SplFixedArray(256);
|
||||||
self::$diffusesSkyLight = new \SplFixedArray(256);
|
self::$diffusesSkyLight = new \SplFixedArray(256);
|
||||||
|
self::$blastResistance = new \SplFixedArray(256);
|
||||||
|
|
||||||
self::registerBlock(new Air());
|
self::registerBlock(new Air());
|
||||||
self::registerBlock(new Stone());
|
self::registerBlock(new Stone());
|
||||||
|
@ -1238,7 +1238,6 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
protected function tryChangeMovement(){
|
protected function tryChangeMovement(){
|
||||||
$friction = 1 - $this->drag;
|
$friction = 1 - $this->drag;
|
||||||
|
|
||||||
if(!$this->onGround){
|
|
||||||
if($this->applyDragBeforeGravity()){
|
if($this->applyDragBeforeGravity()){
|
||||||
$this->motionY *= $friction;
|
$this->motionY *= $friction;
|
||||||
}
|
}
|
||||||
@ -1248,8 +1247,9 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
if(!$this->applyDragBeforeGravity()){
|
if(!$this->applyDragBeforeGravity()){
|
||||||
$this->motionY *= $friction;
|
$this->motionY *= $friction;
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
$friction = $this->level->getBlock($this->floor()->subtract(0, 1, 0))->getFrictionFactor();
|
if($this->onGround){
|
||||||
|
$friction *= $this->level->getBlock($this->floor()->subtract(0, 1, 0))->getFrictionFactor();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->motionX *= $friction;
|
$this->motionX *= $friction;
|
||||||
@ -1341,7 +1341,6 @@ abstract class Entity extends Location implements Metadatable{
|
|||||||
*/
|
*/
|
||||||
final public function setForceMovementUpdate(bool $value = true){
|
final public function setForceMovementUpdate(bool $value = true){
|
||||||
$this->forceMovementUpdate = $value;
|
$this->forceMovementUpdate = $value;
|
||||||
$this->onGround = false;
|
|
||||||
|
|
||||||
$this->blocksAround = null;
|
$this->blocksAround = null;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 05419714c36c10db86edaa0c7049a9f054e4a3b4
|
Subproject commit 3b1ca9c1bedf1a18ef40757665bf8c9e7e769c9c
|
Loading…
x
Reference in New Issue
Block a user