Skip to content

Commit

Permalink
Fixed liquids not updated after the rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
matcracker committed Jun 10, 2020
1 parent a32a6c7 commit fde165d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/matcracker/BedcoreProtect/tasks/async/RollbackTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
use matcracker\BedcoreProtect\storage\QueryManager;
use matcracker\BedcoreProtect\utils\Utils;
use pocketmine\block\Block;
use pocketmine\block\Liquid;
use pocketmine\level\format\Chunk;
use pocketmine\level\Level;
use pocketmine\math\AxisAlignedBB;
Expand Down Expand Up @@ -116,6 +117,9 @@ private function updateBlock(Level $world, Block $block): void
foreach ($world->getNearbyEntities(new AxisAlignedBB($block->x - 1, $block->y - 1, $block->z - 1, $block->x + 2, $block->y + 2, $block->z + 2)) as $entity) {
$entity->onNearbyBlockChange();
}
if ($block instanceof Liquid) {
$block->onNearbyBlockChange();
}
$world->scheduleNeighbourBlockUpdates($block->asVector3());
}
}

0 comments on commit fde165d

Please sign in to comment.