Merge branch 'main' into TU43
This commit is contained in:
@@ -61,6 +61,8 @@
|
||||
#include "Windows64/Network/WinsockNetLayer.h"
|
||||
#endif
|
||||
|
||||
#include "../Minecraft.World/Recipes.h"
|
||||
|
||||
|
||||
#ifdef _DURANGO
|
||||
#include "../Minecraft.World/DurangoStats.h"
|
||||
@@ -137,6 +139,9 @@ ClientConnection::ClientConnection(Minecraft *minecraft, Socket *socket, int iUs
|
||||
maxPlayers = 20;
|
||||
m_isForkServer = false;
|
||||
|
||||
m_recivedRecipeRegistyUpdate = false;
|
||||
m_recivedCreativeRegistyUpdate = false;
|
||||
|
||||
this->minecraft = minecraft;
|
||||
|
||||
if( iUserIndex < 0 )
|
||||
@@ -246,6 +251,14 @@ void ClientConnection::handleLogin(shared_ptr<LoginPacket> packet)
|
||||
{
|
||||
if (done) return;
|
||||
|
||||
if (!m_recivedRecipeRegistyUpdate) {
|
||||
Recipes::getInstance()->loadFromLocal();
|
||||
}
|
||||
|
||||
if (!m_recivedCreativeRegistyUpdate) {
|
||||
IUIScene_CreativeMenu::loadFromLocal();
|
||||
}
|
||||
|
||||
PlayerUID OnlineXuid;
|
||||
ProfileManager.GetXUID(m_userIndex,&OnlineXuid,true); // online xuid
|
||||
MOJANG_DATA *pMojangData = nullptr;
|
||||
@@ -4043,6 +4056,16 @@ void ClientConnection::handleCustomPayload(shared_ptr<CustomPayloadPacket> custo
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (CustomPayloadPacket::UPDATE_RECIPE_REGISTRY.compare(customPayloadPacket->identifier) == 0) {
|
||||
this->m_recivedRecipeRegistyUpdate = true;
|
||||
|
||||
Recipes::getInstance()->loadFromPacket(customPayloadPacket->data);
|
||||
}
|
||||
else if (CustomPayloadPacket::UPDATE_CREATIVE_REGISTRY.compare(customPayloadPacket->identifier) == 0) {
|
||||
this->m_recivedCreativeRegistyUpdate = true;
|
||||
|
||||
IUIScene_CreativeMenu::loadFromPacket(customPayloadPacket->data);
|
||||
}
|
||||
}
|
||||
|
||||
Connection *ClientConnection::getConnection()
|
||||
|
||||
Reference in New Issue
Block a user