fixed division by zero when breaking tnt, (hopefully?) fixed empty chests

This commit is contained in:
GameHerobrine 2025-07-03 20:57:00 +03:00
parent 6c7bcf014b
commit a62986a8d6
3 changed files with 7 additions and 5 deletions

View file

@ -266,7 +266,9 @@ class Tile extends Position{
$pk->z = $ob->z;
$pk->case1 = 1;
$pk->case2 = 2;
$this->server->api->player->broadcastPacket($all, $pk);
foreach($this->level->players as $pl){
$pl->blockQueueDataPacket(clone $pk);
}
for($s = 0; $s < CHEST_SLOTS; ++$s){
$slot = $ob->getSlot($s);
if($slot->getID() > AIR and $slot->count > 0){
@ -283,8 +285,8 @@ class Tile extends Position{
$pk->z = $this->z;
$pk->case1 = 1;
$pk->case2 = 2;
foreach($this->level->players as $player){
$player->blockQueueDataPacket(clone $pk);
foreach($this->level->players as $pl){
$pl->blockQueueDataPacket(clone $pk);
}
for($s = 0; $s < CHEST_SLOTS; ++$s){