mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-05-17 07:03:51 +00:00
sync recipes from server to client, only shapeless right now
This commit is contained in:
parent
12429e1981
commit
f2b304fad5
7 changed files with 256 additions and 29 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include "../Minecraft.World/net.minecraft.world.item.h"
|
||||
#include "../Minecraft.World/SharedConstants.h"
|
||||
#include "Settings.h"
|
||||
#include "../Minecraft.World/Recipes.h"
|
||||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
#include "../Minecraft.Server/ServerLogManager.h"
|
||||
#include "../Minecraft.Server/Access/Access.h"
|
||||
|
|
@ -336,6 +337,7 @@ void PendingConnection::handleAcceptedLogin(shared_ptr<LoginPacket> packet)
|
|||
#if defined(_WINDOWS64) && defined(MINECRAFT_SERVER_BUILD)
|
||||
ServerRuntime::ServerLogManager::OnAcceptedPlayerLogin(GetPendingConnectionSmallId(connection), name);
|
||||
#endif
|
||||
connection->send(std::make_shared<CustomPayloadPacket>(CustomPayloadPacket::UPDATE_CRAFTING_RECIPES_PACKET, Recipes::getInstance()->buildSyncedRecipeArray()));
|
||||
server->getPlayers()->placeNewPlayer(connection, playerEntity, packet);
|
||||
connection = nullptr; // We've moved responsibility for this over to the new PlayerConnection, nullptr so we don't delete our reference to it here in our dtor
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue