diff options
| author | qwasdrizzel <145519042+qwasdrizzel@users.noreply.github.com> | 2026-03-16 21:44:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-16 21:44:26 -0500 |
| commit | ce739f6045ec72127491286ea3f3f21e537c1b55 (patch) | |
| tree | f33bd42a47c1b4a7b2153a7fb77127ee3b407db9 /Minecraft.Client/PlayerConnection.h | |
| parent | 255a18fe8e9b57377975f82e2b227afe2a12eda0 (diff) | |
| parent | 5a59f5d146b43811dde6a5a0245ee9875d7b5cd1 (diff) | |
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/PlayerConnection.h')
| -rw-r--r-- | Minecraft.Client/PlayerConnection.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Minecraft.Client/PlayerConnection.h b/Minecraft.Client/PlayerConnection.h index c691e6f5..0284bc6a 100644 --- a/Minecraft.Client/PlayerConnection.h +++ b/Minecraft.Client/PlayerConnection.h @@ -30,13 +30,14 @@ private: bool didTick; int lastKeepAliveId; - __int64 lastKeepAliveTime; + int64_t lastKeepAliveTime; static Random random; - __int64 lastKeepAliveTick; + int64_t lastKeepAliveTick; int chatSpamTickCount; int dropSpamTickCount; bool m_bHasClientTickedOnce; + unsigned char m_logSmallId; public: PlayerConnection(MinecraftServer *server, Connection *connection, shared_ptr<ServerPlayer> player); @@ -45,6 +46,10 @@ public: void disconnect(DisconnectPacket::eDisconnectReason reason); private: + /** + * Returns the stable network smallId used by dedicated-server logging and refreshes it from the live socket when possible + */ + unsigned char getLogSmallId(); double xLastOk, yLastOk, zLastOk; bool synched; @@ -81,7 +86,7 @@ private: public: // 4J Stu - Handlers only valid in debug mode -#ifndef _CONTENT_PACKAGE +#ifndef _CONTENT_PACKAGE virtual void handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet); #endif virtual void handleContainerClick(shared_ptr<ContainerClickPacket> packet); @@ -89,14 +94,14 @@ public: virtual void handleSetCreativeModeSlot(shared_ptr<SetCreativeModeSlotPacket> packet); virtual void handleContainerAck(shared_ptr<ContainerAckPacket> packet); virtual void handleSignUpdate(shared_ptr<SignUpdatePacket> packet); - virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet); + virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet); virtual void handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet); // 4J Added virtual bool isServerPacketListener(); virtual void handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket); virtual void handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket); virtual bool isDisconnected(); - // 4J Added + // 4J Added virtual void handleCraftItem(shared_ptr<CraftItemPacket> packet); virtual void handleTradeItem(shared_ptr<TradeItemPacket> packet); virtual void handleDebugOptions(shared_ptr<DebugOptionsPacket> packet); |
