From c3e6554762e6105a87d43cfd523200d89ed46592 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Sat, 13 Jan 2024 11:00:22 +0300 Subject: [PATCH] fixed tickerfunction and queue after rollback --- src/PocketMinecraftServer.php | 2 +- src/world/Level.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/PocketMinecraftServer.php b/src/PocketMinecraftServer.php index 78bdb022..20279b23 100644 --- a/src/PocketMinecraftServer.php +++ b/src/PocketMinecraftServer.php @@ -620,7 +620,7 @@ class PocketMinecraftServer{ ++$actionCount; try{ $return = @call_user_func($this->schedule[$cid][0] ?? function(){}, $this->schedule[$cid][1], $this->schedule[$cid][2]); //somehow args can be null - }catch(ValueError $e){ + }catch(Throwable $e){ $return = false; } }else{ diff --git a/src/world/Level.php b/src/world/Level.php index 50466363..39c86ebd 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -385,6 +385,8 @@ class Level{ } $player->sendBlockUpdateQueue(); } + + $this->queuedBlockUpdates = []; } public function addBlockToSendQueue($x, $y, $z, $id, $meta){