diff --git a/src/entity/Entity.php b/src/entity/Entity.php index b2deda3b..7a51a008 100644 --- a/src/entity/Entity.php +++ b/src/entity/Entity.php @@ -850,13 +850,13 @@ class Entity extends Position if($this->isPlayer()){ $x = floor($this->x); - $y = floor($this->y - 0.2); + $y = floor($this->y - 1); //TODO not 1 $z = floor($this->z); $bid = $this->level->level->getBlockID($x, $y, $z); - + console($this->y.":".$y); if($bid > 0){ $clz = StaticBlock::getBlock($bid); - $clz::fallOn($this->level, $x, $y, $z, $this, floor($this->fallStart - $this->y)); + $clz::fallOn($this->level, $x, $y, $z, $this, ceil($this->fallStart - $this->y)); } $dmg = ceil($this->fallStart - $this->y - 3); diff --git a/src/material/block/nonfull/FarmlandBlock.php b/src/material/block/nonfull/FarmlandBlock.php index fc18b8d9..59be4fac 100644 --- a/src/material/block/nonfull/FarmlandBlock.php +++ b/src/material/block/nonfull/FarmlandBlock.php @@ -22,7 +22,6 @@ class FarmlandBlock extends TransparentBlock{ public static function fallOn(Level $level, $x, $y, $z, Entity $entity, $fallDistance){ $rv = lcg_value(); - console("rv: $rv, fd: ".($fallDistance - 0.5)); if($rv < ($fallDistance - 0.5)){ $level->fastSetBlockUpdate($x, $y, $z, DIRT, 0); }