From 30eae88ebb255952c2f88aaca84b6def6afbb46c Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Thu, 26 Jun 2025 11:11:35 +0300 Subject: [PATCH] block update queue and entity data queue will be sent every tick if it contains any packets --- src/Player.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Player.php b/src/Player.php index 9b60e5c9..33107ae6 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1425,7 +1425,6 @@ class Player{ } if($this->sendingInventoryRequired){ - //console("inv resent"); if(($this->gamemode & 0x01) !== CREATIVE){ $hotbar = []; foreach($this->hotbar as $slot){ @@ -1481,6 +1480,14 @@ class Player{ if($this->bufferLen > 0){ $this->sendBuffer(); } + + if($this->blockUpdateQueueLength > 0){ + $this->sendBlockUpdateQueue(); + } + + if($this->entityDataQueueLength > 0){ + $this->sendEntityMovementUpdateQueue(); + } $limit = $time - 5; //max lag foreach($this->recoveryQueue as $count => $data){