From 5723f88cba3d18c4a36b09833b2d082f4d47b401 Mon Sep 17 00:00:00 2001 From: GameHerobrine Date: Wed, 12 Jul 2023 20:16:42 +0300 Subject: [PATCH] mob cap should be fixed --- src/Player.php | 6 +++--- src/world/Level.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Player.php b/src/Player.php index 763a6cdc..98dcd292 100755 --- a/src/Player.php +++ b/src/Player.php @@ -1561,16 +1561,16 @@ class Player{ $data["eid"] = $packet->eid; $data["player"] = $this; - /*if($packet->slot === 0x28 or $packet->slot === 0){ //0 for 0.8.0 compatibility + if($packet->slot === 0){ $data["slot"] = -1; $data["item"] = BlockAPI::getItem(AIR, 0, 0); if($this->server->handle("player.equipment.change", $data) !== false){ $this->slot = -1; } break; - }else{*/ + }else{ $packet->slot -= 9; - //} + } if(($this->gamemode & 0x01) === SURVIVAL){ diff --git a/src/world/Level.php b/src/world/Level.php index b42b564a..1c7e2254 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -341,7 +341,7 @@ class Level{ continue; } - if($e->type === ENTITY_MOB && !$e->isPlayer()){ + if($e->class === ENTITY_MOB && !$e->isPlayer()){ ++$this->totalMobsAmount; }