diff --git a/src/entity/object/FallingSand.php b/src/entity/object/FallingSand.php index 1857a9ad..81b6fa9b 100644 --- a/src/entity/object/FallingSand.php +++ b/src/entity/object/FallingSand.php @@ -27,7 +27,18 @@ class FallingSand extends Entity{ $this->close(); return; } - + //$level->fastSetBlockUpdate($x, $y, $z, 0, 0, true); + if($this->fallTime == 0){ + $x = floor($this->x); + $y = floor($this->y); + $z = floor($this->z); + if($this->level->level->getBlockID($x, $y, $z) != $this->data["Tile"]){ + $this->close(); + return; + } + $this->level->fastSetBlockUpdate($x, $y, $z, 0, 0, true); + } + $this->lastX = $this->x; $this->lastY = $this->y; $this->lastZ = $this->z; diff --git a/src/material/block/GenericBlock.php b/src/material/block/GenericBlock.php index cf1617d0..f7a128cb 100644 --- a/src/material/block/GenericBlock.php +++ b/src/material/block/GenericBlock.php @@ -62,12 +62,11 @@ class GenericBlock extends Block{ if($down == AIR || StaticBlock::getIsLiquid($down)){ $data = array( "x" => $x + 0.5, - "y" => $y - 0.5, + "y" => $y, "z" => $z + 0.5, "Tile" => $id, ); $server = ServerAPI::request(); - $level->fastSetBlockUpdate($x, $y, $z, 0, 0, true); $e = $server->api->entity->add($level, ENTITY_FALLING, FALLING_SAND, $data); $server->api->entity->spawnToAll($e); }