Fix empty inventories for server players (#46)

* Fix empty inventories for server players

* Revert "Fix empty inventories for server players"

This reverts commit 12174c0cfb1f8df5f6fca1a93f55e27286b464db.

* Fix empty inventories for server players
(The good one this time I hope)

---------

Co-authored-by: Marioiscool246 <marioiscool101@gmail.com>
This commit is contained in:
Marioiscool246
2023-08-11 04:54:33 -04:00
committed by GitHub
parent b45cfc1e16
commit 3d192ad10c

View File

@@ -131,6 +131,11 @@ void ServerSideNetworkHandler::handle(const RakNet::RakNetGUID& guid, LoginPacke
m_pLevel->addEntity(pPlayer);
if (m_pMinecraft->m_pGameMode->isCreativeType())
pPlayer->m_pInventory->prepareCreativeInventory();
else
pPlayer->m_pInventory->prepareSurvivalInventory();
m_pMinecraft->m_gui.addMessage(pPlayer->m_name + " joined the game");
AddPlayerPacket app(guid, RakNet::RakString(pPlayer->m_name.c_str()), pPlayer->m_EntityID, pPlayer->m_pos.x, pPlayer->m_pos.y - pPlayer->field_84, pPlayer->m_pos.z);