diff options
| author | daoge <3523206925@qq.com> | 2026-03-03 03:04:10 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 03:04:10 +0800 |
| commit | b3feddfef372618c8a9d7a0abcaf18cfad866c18 (patch) | |
| tree | 267761c3bb39241ba5c347bfbe2254d06686e287 /Minecraft.Client/PlayerList.h | |
| parent | 84c31a2331f7a0ec85b9d438992e244f60e5020f (diff) | |
feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict
* feat: TU19 (Dec 2014) Features & Content (#32)
* December 2014 files
* Working release build
* Fix compilation issues
* Add sound to Windows64Media
* Add DLC content and force Tutorial DLC
* Revert "Add DLC content and force Tutorial DLC"
This reverts commit 97a43994725008e35fceb984d5549df9c8cea470.
* Disable broken light packing
* Disable breakpoint during DLC texture map load
Allows DLC loading but the DLC textures are still broken
* Fix post build not working
* ...
* fix vs2022 build
* fix cmake build
---------
Co-authored-by: Loki <lokirautio@gmail.com>
Diffstat (limited to 'Minecraft.Client/PlayerList.h')
| -rw-r--r-- | Minecraft.Client/PlayerList.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Minecraft.Client/PlayerList.h b/Minecraft.Client/PlayerList.h index 14bd6b2d..6a6ee94c 100644 --- a/Minecraft.Client/PlayerList.h +++ b/Minecraft.Client/PlayerList.h @@ -13,6 +13,7 @@ class TileEntity; class ProgressListener; class GameType; class LoginPacket; +class ServerScoreboard; using namespace std; @@ -64,10 +65,15 @@ public: PlayerList(MinecraftServer *server); ~PlayerList(); void placeNewPlayer(Connection *connection, shared_ptr<ServerPlayer> player, shared_ptr<LoginPacket> packet); + +protected: + void updateEntireScoreboard(ServerScoreboard *scoreboard, shared_ptr<ServerPlayer> player); + +public: void setLevel(ServerLevelArray levels); void changeDimension(shared_ptr<ServerPlayer> player, ServerLevel *from); int getMaxRange(); - bool load(shared_ptr<ServerPlayer> player); // 4J Changed return val to bool to check if new player or loaded player + CompoundTag *load(shared_ptr<ServerPlayer> player); protected: void save(shared_ptr<ServerPlayer> player); public: @@ -78,6 +84,7 @@ public: shared_ptr<ServerPlayer> getPlayerForLogin(PendingConnection *pendingConnection, const wstring& userName, PlayerUID xuid, PlayerUID OnlineXuid); shared_ptr<ServerPlayer> respawn(shared_ptr<ServerPlayer> serverPlayer, int targetDimension, bool keepAllPlayerData); void toggleDimension(shared_ptr<ServerPlayer> player, int targetDimension); + void repositionAcrossDimension(shared_ptr<Entity> entity, int lastDimension, ServerLevel *oldLevel, ServerLevel *newLevel); void tick(); bool isTrackingTile(int x, int y, int z, int dimension); // 4J added void prioritiseTileChanges(int x, int y, int z, int dimension); // 4J added @@ -92,11 +99,16 @@ public: bool isOp(shared_ptr<ServerPlayer> player); // 4J Added shared_ptr<ServerPlayer> getPlayer(const wstring& name); shared_ptr<ServerPlayer> getPlayer(PlayerUID uid); + shared_ptr<ServerPlayer> getNearestPlayer(Pos *position, int range); + vector<ServerPlayer> *getPlayers(Pos *position, int rangeMin, int rangeMax, int count, int mode, int levelMin, int levelMax, unordered_map<wstring, int> *scoreRequirements, const wstring &playerName, const wstring &teamName, Level *level); + +private: + bool meetsScoreRequirements(shared_ptr<Player> player, unordered_map<wstring, int> scoreRequirements); + +public: void sendMessage(const wstring& name, const wstring& message); void broadcast(double x, double y, double z, double range, int dimension, shared_ptr<Packet> packet); void broadcast(shared_ptr<Player> except, double x, double y, double z, double range, int dimension, shared_ptr<Packet> packet); - void broadcastToAllOps(const wstring& message); - bool sendTo(const wstring& name, shared_ptr<Packet> packet); // 4J Added ProgressListener *progressListener param and bDeleteGuestMaps param void saveAll(ProgressListener *progressListener, bool bDeleteGuestMaps = false); void whiteList(const wstring& playerName); |
