Commit Graph

14 Commits

Author SHA1 Message Date
Loki Rautio
087b7e7abf Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
2026-03-07 21:12:22 -06:00
ModMaker101
a9be52c41a Project modernization (#630)
* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
2026-03-08 09:56:03 +07:00
VivyaCC
6dfdd90328 win cpp23 compat: Minecraft.World 2026-03-07 23:58:21 +07:00
kuwa
182d76f391 Introduce uid.dat (offline PlayerUIDs), fix multiplayer save data persistence (#536)
* fix: fix multiplayer player data mix between different players bug

Fixes a Win64 multiplayer issue where player data (`players/*.dat`) could be mismatched because identity was effectively tied to connection-order `smallId` XUIDs.
Introduces a deterministic username-derived persistent XUID and integrates it into the existing XUID-based save pipeline.

- Added `Windows64_NameXuid` for deterministic `name -> persistent xuid` resolution
- On Win64 login (`PlayerList`), set `ServerPlayer::xuid` from username-based resolver
- Aligned local player `xuid` assignment (`Minecraft`) for create/init/respawn paths to use the same resolver
- Added Win64 local-self guard in `ClientConnection::handleAddPlayer` using name match to avoid duplicate local remote-player creation
- Kept `IQNet::GetPlayerByXuid` compatibility fallback behavior, while extending lookup to also resolve username-based XUIDs
- Moved implementation to `Minecraft.Client/Windows64/Windows64_NameXuid.h`; kept legacy `Win64NameXuid.h` as compatibility include

Rename migration is intentionally out of scope (same-name identity only).

* fix: preserve legacy host xuid (base xuid + 0) for existing world compatibility

- Add legacy embedded host XUID helper (base + 0).
- When Minecraft.Client is hosting, force only the first host player to use legacy host XUID.
- Keep name-based XUID for non-host players.
- Prevent old singleplayer/hosted worlds from losing/mismatching host player data.

* update: migrate Win64 player uid to `uid.dat`-backed XUID and add XUID based duplicate login guards

- Replace Win64 username-derived XUID resolution with persistent `uid.dat`-backed identity (`Windows64_Xuid` / `Win64Xuid`).
- Persist a per-client XUID next to the executable, with first-run generation, read/write, and process-local caching.
- Keep legacy host compatibility by pinning host self to legacy embedded `base + 0` XUID for existing world/playerdata continuity.
- Propagate packet-authoritative XUIDs into QNet player slots via `m_resolvedXuid`, and use it for `GetXuid`/`GetPlayerByXuid` with legacy fallback.
- Update Win64 profile/network paths to use persistent XUID for non-host clients and clear resolved identity on disconnect.
- Add login-time duplicate checks: reject connections when the same XUID is already connected (in addition to existing duplicate-name checks on Win64).
- Add inline compatibility comments around legacy/new identity coexistence paths for easier future maintenance.

* update: ensure uid.dat exists at startup in client mode for multiplayer
2026-03-06 00:01:36 -06:00
dtentiion
aadb511504 Fix save list, delete save, exit without saving, and blank username on Windows64 (#539)
* Fix world save rename not applying new name

KeyboardCompleteWorldNameCallback had no _WINDOWS64 branch, so the
typed name was validated then silently discarded on every rename attempt.

Write the new name to a worldname.txt sidecar file next to the save
(Windows64\GameHDD\{folder}\worldname.txt) and update the in-memory
display name immediately. ReadLevelNameFromSaveFile now checks for this
sidecar first so renamed saves persist correctly across restarts.

* Fixed gamertag being blank upon renaming and re-joining a save

* Save deletion fix, exiting without saving fix

* Add native in-game keyboard UI for world naming and renaming
2026-03-05 14:57:37 -06:00
Slenderman
ac480f6745 Update username logic and implement latest LCEMP changes (#311)
* Update username logic and implement latest LCEMP changes

* Update old reference

* Fix tutorial world crash

* Restore deleted comment
2026-03-04 04:50:28 +07:00
Slenderman
515f91cad8 Fix player save data issue & multiple username implementations (#257)
* fix saving issue & multiple username implementations

* Update README.md

Updated the method for overriding in-game username from '-name' to 'username.txt'.

* remove unused include i forgot to get rid of while testing
2026-03-03 23:58:22 +07:00
Loki Rautio
354a0989eb Add back x64 stub XUID (temp savedata fix)
Fixes savedata loading for existing saves, needs permanent solution
2026-03-02 23:05:25 -06:00
void_17
b42a4a4e4d Revert "Revert "Win64: configurable username (username.txt) and persistent ga…" (#235)
This reverts commit 7f7d99501c.
2026-03-03 10:31:09 +07:00
void_17
7f7d99501c Revert "Win64: configurable username (username.txt) and persistent game setti…" (#234)
This reverts commit b8a7f816b5.
2026-03-03 10:23:28 +07:00
dtentiion
b8a7f816b5 Win64: configurable username (username.txt) and persistent game settings (settings.dat) (#195) 2026-03-03 07:50:45 +08:00
lspepinho
8b28c20d7a Fixes for PR #96 (#170)
* Implement basic multiplayer functionality

* Update README.md

---------

Co-authored-by: Slenderman <ssimulpong@outlook.com>
2026-03-03 06:30:22 +07:00
Sean Hoyt
b5111232aa feat: Windows64 local multiplayer support (#13)
- Skip QuadrantSignin (profile selector) on Windows64 in both LoadMenu
  and CreateWorldMenu, proceeding directly to local play since Xbox Live
  stubs always return true for IsSignedInLive()
- Fix IsLocalMultiplayerAvailable() to not require IsHiDef() on Windows64
- Allow pad-connected players to join without a profile sign-in check
- Fix ghost RemotePlayer creation by scanning all local player slots and
  matching on server-assigned player index rather than controller slot,
  fixing P3/P4 ghost entities when joining out of controller order
- Give each player a unique name (Player 1-4) based on controller index
  instead of a single shared stub name
- Use raw XInput (XInputGetState) for secondary controller join detection,
  bypassing the 4J toggle system which consumes all button presses before
  game logic runs; uses a 120-frame latch for a reliable detection window
- Add .gitignore for Visual Studio build artifacts and output directories
2026-03-02 00:50:48 +08:00
daoge_cmd
b691c43c44 Initial commit 2026-03-01 12:16:08 +08:00