diff --git a/CMakeLists.txt b/CMakeLists.txt index 37638828..6659aeee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.24) -project(MinecraftConsoles LANGUAGES C CXX RC ASM_MASM) +project(LCE-Revelations LANGUAGES C CXX RC ASM_MASM) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/Minecraft.Client/Common/UI/UIScene_Credits.cpp b/Minecraft.Client/Common/UI/UIScene_Credits.cpp index a475acc3..5f93e67e 100644 --- a/Minecraft.Client/Common/UI/UIScene_Credits.cpp +++ b/Minecraft.Client/Common/UI/UIScene_Credits.cpp @@ -490,7 +490,7 @@ SCreditTextItemDef UIScene_Credits::gs_aCreditDefs[MAX_CREDIT_STRINGS] = #endif {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, - {L"MinecraftConsoles", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText}, + {L"LCE-Revelations", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eExtraLargeText}, {L"Project Maintainers", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eLargeText}, {L"smartcmd", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, {L"codeHusky", NO_TRANSLATED_STRING, NO_TRANSLATED_STRING, eSmallText}, diff --git a/Minecraft.Client/Settings.cpp b/Minecraft.Client/Settings.cpp index c9cfcb94..e959f84d 100644 --- a/Minecraft.Client/Settings.cpp +++ b/Minecraft.Client/Settings.cpp @@ -78,7 +78,7 @@ void Settings::saveProperties() if (!stream.is_open()) return; - stream << "# MinecraftConsoles dedicated server properties\r\n"; + stream << "# LCE-Revelations dedicated server properties\r\n"; for (unordered_map::const_iterator it = properties.begin(); it != properties.end(); ++it) { string key = string(wstringtochararray(it->first)); diff --git a/README.md b/README.md index 737dd902..38a30962 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,13 @@ [![Discord](https://img.shields.io/badge/Discord-Join%20Server-5865F2?logo=discord&logoColor=white)](https://discord.gg/vhEHre5sCB) +If you have any questions regarding this fork, this is my Fluxer server (similar to a Discord server): +

+ + Join my Fluxer server + +

+ This project is based on Legacy Console Edition v1.6.0560.0 (TU19) with fixes and improvements applied. Among these, LCE-Revelations features: - Fully stable from game-start to endgame @@ -256,7 +263,7 @@ proxy-protocol=true - Dedicated server is fully compatible with `smartcmd/MinecraftConsoles` clients, even with hardcore mode - Client (`LCE-Revelations-Client-Win64.zip`): download from the Nightly release on GitHub - Dedicated Server (`LCE-Revelations-Server-Win64.zip`): download from the Nightly-Dedicated-Server release on GitHub -- Docker: pull `ghcr.io/lce-hub/lce-revelations-dedicated-server:nightly` for server container +- Docker: pull `ghcr.io/itsrevela/lce-revelations-dedicated-server:nightly` for server container ### Screenshot Functionality @@ -272,15 +279,15 @@ Proper implementation of Hardcore Mode in LCE Revelations! - multiplayer fixes: added fix to prevent host from using exit-without-saving loophole for nonhost players that died - to-do: hardcore hearts texture -The current goal of MinecraftConsoles is to be a multi-platform base for further development, such as modding, backports, and anything else LCE. On top of that, we're working to make this a quality experience on Desktop with or without a controller while (long-term) retaining console support. +The current goal of LCE-Revelations is to be a multi-platform base for further development, such as modding, backports, and anything else LCE. On top of that, we're working to make this a quality experience on Desktop with or without a controller while (long-term) retaining console support. See our our [Contributor's Guide](./CONTRIBUTING.md) for more information on the goals of this project. ## Download ### Client -Windows users can download our [Nightly Build](https://github.com/itsRevela/MinecraftConsoles/releases/tag/Nightly)! Simply download the `.zip` file and extract it to a folder where you'd like to keep the game. You can set your username in `username.txt` (you'll have to make this file) +Windows users can download our [Nightly Build](https://github.com/itsRevela/LCE-Revelations/releases/tag/Nightly)! Simply download the `.zip` file and extract it to a folder where you'd like to keep the game. You can set your username in `username.txt` (you'll have to make this file) ### Server -If you're looking for Dedicated Server software (with hardcore-mode functionality), download its [Nightly Build here](https://github.com/itsRevela/MinecraftConsoles/releases/tag/Nightly-Dedicated-Server). Similar instructions to the client more or less, though see further down in this README for more info on that. +If you're looking for Dedicated Server software (with hardcore-mode functionality), download its [Nightly Build here](https://github.com/itsRevela/LCE-Revelations/releases/tag/Nightly-Dedicated-Server). Similar instructions to the client more or less, though see further down in this README for more info on that. ## Platform Support diff --git a/Update-NightlyRelease.ps1 b/Update-NightlyRelease.ps1 index 00e45879..4da653a5 100644 --- a/Update-NightlyRelease.ps1 +++ b/Update-NightlyRelease.ps1 @@ -16,7 +16,7 @@ $ErrorActionPreference = "Stop" # --- Configuration --- $RepoOwner = "itsRevela" -$RepoName = "MinecraftConsoles" +$RepoName = "LCE-Revelations" $ReleaseTag = "Nightly" $ReleaseDir = Join-Path $PSScriptRoot "build\Minecraft.Client\Release" $ZipName = "LCREWindows64.zip" diff --git a/docker-compose.dedicated-server.ghcr.yml b/docker-compose.dedicated-server.ghcr.yml index e03d6bf9..58749e3f 100644 --- a/docker-compose.dedicated-server.ghcr.yml +++ b/docker-compose.dedicated-server.ghcr.yml @@ -1,6 +1,6 @@ services: lce-revelations-dedicated-server: - image: ghcr.io/lce-hub/lce-revelations-dedicated-server:nightly + image: ghcr.io/itsrevela/lce-revelations-dedicated-server:nightly container_name: lce-revelations-dedicated-server restart: unless-stopped tty: true diff --git a/docs/FOURKIT_PORT_RECON.md b/docs/FOURKIT_PORT_RECON.md deleted file mode 100644 index ed84d918..00000000 --- a/docs/FOURKIT_PORT_RECON.md +++ /dev/null @@ -1,180 +0,0 @@ -# FourKit Port Reconnaissance - -Phase 1 deliverable for porting the FourKit plugin system into LCE-Revelations. This document is the source of truth for what needs to change, where, and how risky each change is. Phases 2-3 of the port consume this document directly. - -## Source repos referenced - -| Role | Path | -|---|---| -| Vanilla baseline | `C:\Users\revela\Documents\Minecraft\itsRevela` | -| Donor (has FourKit) | `C:\Users\revela\Documents\Minecraft\FourKit\MinecraftConsoles` | -| Target (this repo) | `C:\Users\revela\Documents\Minecraft\LCE-Hub\LCE-Revelations` | - -Vanilla and donor were forked from upstream at similar points; the donor adds FourKit on top. The target is a more recent independent fork that has its own divergence (Security subsystem, OpManager, revoke-token command, additional ServerProperties fields). - -## Executive summary - -- **27 files** in the donor are FourKit-bearing across `Minecraft.Server/`, `Minecraft.World/`, and `Minecraft.Client/`. Of those, **23 are clean patches** (target identical to vanilla in those files), and **only 4 require manual merge work** (all in `Minecraft.Server/`). -- **7 pure-add native files** drop in unmodified. -- **1 entire managed project** (`Minecraft.Server.FourKit/`) drops in unmodified. -- **No blockers identified.** Every Fire* hook site exists in target at vanilla content; the conflicts are concentrated in build files and a small set of `Minecraft.Server/` source files where target diverged. -- **Native callback ABI is intact.** Spot-checks of player/world/inventory subsystem APIs that FourKitNatives.cpp depends on all match between donor and target. - -## A. File diff matrix - -### A.1 Pure adds (drop in verbatim) - -| File | Notes | -|---|---| -| `Minecraft.Server/FourKitBridge.cpp` | Event firing + callback registry | -| `Minecraft.Server/FourKitBridge.h` | Public Fire* and Handle* surface | -| `Minecraft.Server/FourKitNatives.cpp` | C# → C++ callback implementations (~80 functions) | -| `Minecraft.Server/FourKitNatives.h` | Native function declarations | -| `Minecraft.Server/FourKitRuntime.cpp` | hostfxr load + .NET 10 bootstrap | -| `Minecraft.Server/FourKitRuntime.h` | Runtime init API | -| `Minecraft.Server/FourKitMappers.cpp` | Type/enum mapping helpers | -| `Minecraft.Server.FourKit/` (entire project) | Managed plugin host, Bukkit-style API, ~54 events | - -### A.2 Modified files in `Minecraft.Server/` (the merge work) - -| File | Donor delta | Target diverges from vanilla? | Merge class | -|---|---|---|---| -| `CMakeLists.txt` | +24 lines (FourKit dep + post-build copy) | No | CLEAN_PATCH | -| `cmake/sources/Common.cmake` | +7 FourKit sources, donor also strips OpManager/Security (donor lacks those) | No | **SELECTIVE_MERGE**: add donor's FourKit sources only; preserve target's OpManager/Security entries | -| `Windows64/ServerMain.cpp` | FourKit init/shutdown + 1 inline FireWorldSave | No | CLEAN_PATCH | -| `Console/ServerCliEngine.cpp` | HandleConsoleCommand hook + GetPluginCommandHelp integration | No | CLEAN_PATCH | -| `Console/commands/help/CliCommandHelp.cpp` | Plugin command help integration | Unknown: check before merge | LIKELY_CLEAN | -| `Console/commands/whitelist/CliCommandWhitelist.cpp` | Unknown delta | Unknown | LIKELY_CLEAN | -| `Access/Access.cpp` | Donor delta unrelated to FourKit hooks per grep | No | CLEAN_PATCH (verify) | -| `Access/Access.h` | Same | No | CLEAN_PATCH (verify) | -| `ServerLogManager.cpp` | Logger plumbing for FourKit log routing | No | CLEAN_PATCH | -| `ServerLogManager.h` | Same | No | CLEAN_PATCH | -| `ServerLogger.cpp` | Same | No | CLEAN_PATCH | -| `ServerProperties.cpp` | Donor REMOVES fields target relies on | **Yes** | **CONFLICT: KEEP TARGET** | -| `ServerProperties.h` | Same | **Yes** | **CONFLICT: KEEP TARGET** | - -### A.3 Modified files in `Minecraft.World/` and `Minecraft.Client/` - -The donor changed 53 files in `Minecraft.World/` and 95 files in `Minecraft.Client/` overall, but most of those are upstream churn unrelated to FourKit. The FourKit-specific subset is identified by `grep "FourKit"` and yields **23 files**, all of which are identical between vanilla and target: i.e., every single one is CLEAN_PATCH. - -#### `Minecraft.World/` FourKit hook files (17, all CLEAN_PATCH) - -`AbstractContainerMenu.cpp`, `CactusTile.cpp`, `CocoaTile.cpp`, `CropTile.cpp`, `EggTile.cpp`, `FireTile.cpp`, `GrassTile.cpp`, `ItemEntity.cpp`, `LiquidTileDynamic.cpp`, `LivingEntity.cpp`, `Mushroom.cpp`, `NetherWartTile.cpp`, `PistonBaseTile.cpp`, `ReedTile.cpp`, `Sapling.cpp`, `StemTile.cpp`, `ThrownEnderpearl.cpp` - -#### `Minecraft.Client/` FourKit hook files (6, all CLEAN_PATCH) - -`PendingConnection.cpp`, `PlayerConnection.cpp`, `ServerLevel.cpp`, `ServerPlayer.cpp`, `ServerPlayerGameMode.cpp`, `TeleportCommand.cpp` - -> **Note on naming:** Despite the `Minecraft.Client/` folder name, several of these files (`PlayerConnection`, `ServerPlayer`, `ServerLevel`, etc.) are shared engine code that the dedicated server also compiles. They are valid hook sites for a server-side plugin system. - -#### Build files in `Minecraft.World/` and `Minecraft.Client/` - -The donor also modifies `Minecraft.World/cmake/sources/Common.cmake`, `Minecraft.Client/cmake/sources/Common.cmake`, `Minecraft.Client/cmake/sources/Windows.cmake`, and `Minecraft.Client/CMakeLists.txt`, but none of these contain FourKit references: they are upstream churn and should NOT be touched as part of the FourKit port. - -## B. Fire* hook site inventory - -Donor exposes Fire*/Handle* via `FourKitBridge::` (see `Minecraft.Server/FourKitBridge.h`). Hook calls appear in 26 source files across the three subprojects. - -### B.1 Hook sites by subsystem - -| Subsystem | Files (in donor) | -|---|---| -| Server lifecycle | `Minecraft.Server/Windows64/ServerMain.cpp` (init, shutdown, FireWorldSave) | -| Console / commands | `Minecraft.Server/Console/ServerCliEngine.cpp` (HandleConsoleCommand, GetPluginCommandHelp), `Minecraft.Server/Console/commands/help/CliCommandHelp.cpp` | -| Player connection / login | `Minecraft.Client/PlayerConnection.cpp`, `Minecraft.Client/PendingConnection.cpp` | -| Player gameplay | `Minecraft.Client/ServerPlayer.cpp`, `Minecraft.Client/ServerPlayerGameMode.cpp`, `Minecraft.Client/TeleportCommand.cpp` | -| World / level | `Minecraft.Client/ServerLevel.cpp` | -| Living entities & damage | `Minecraft.World/LivingEntity.cpp`, `Minecraft.World/ItemEntity.cpp`, `Minecraft.World/ThrownEnderpearl.cpp` | -| Block / tile (growth, burn, spread, ignite, piston) | `Minecraft.World/CactusTile.cpp`, `CocoaTile.cpp`, `CropTile.cpp`, `EggTile.cpp`, `FireTile.cpp`, `GrassTile.cpp`, `LiquidTileDynamic.cpp`, `Mushroom.cpp`, `NetherWartTile.cpp`, `PistonBaseTile.cpp`, `ReedTile.cpp`, `Sapling.cpp`, `StemTile.cpp` | -| Inventory / containers | `Minecraft.World/AbstractContainerMenu.cpp` | - -### B.2 Hook insertion-site safety - -Per A.3, **every file in B.1 outside of `Minecraft.Server/` is byte-identical between vanilla and target**. That means donor's hook insertions can be applied as a straight patch without adapting around target-side refactors. - -In `Minecraft.Server/`, the hook-bearing files (`ServerMain.cpp`, `ServerCliEngine.cpp`, `CliCommandHelp.cpp`) are also identical or near-identical to vanilla per A.2. Net result: **the locked Phase 3 hook adaptation policy ("adapt to LCE-Revelations refactors") will not need to fire** for any hook site in the current state of the target. If the user pulls upstream changes between now and Phase 3, this assumption must be re-validated. - -### B.3 Three concrete hook sites verified end-to-end (others follow same pattern) - -1. **`Minecraft.Server/Windows64/ServerMain.cpp:681`**: `FourKitBridge::FireWorldSave()` inside the autosave trigger block. Target file is byte-identical to vanilla → clean insertion. -2. **`Minecraft.Server/Console/ServerCliEngine.cpp:165`**: `if (FourKitBridge::HandleConsoleCommand(normalizedLine)) return true;` early return for plugin command preprocessing. Target file byte-identical → clean insertion. -3. **`Minecraft.Server/Console/ServerCliEngine.cpp:215-246`**: `FourKitBridge::GetPluginCommandHelp(...)` integration into the help printer. Same file, clean insertion. - -## C. Native callback surface (FourKitNatives.cpp ↔ engine APIs) - -`FourKitNatives.cpp` implements ~80 functions that wrap engine APIs and expose them to managed code. Spot-check of the highest-risk subsystems: - -| Native function | Engine API called | Target has it? | Signature drift? | -|---|---|---|---| -| `NativeSetPlayerHealth(int, float)` | `ServerPlayer::setHealth(float)` | Yes | None | -| `NativeTeleportPlayer(int, double, double, double)` | `PlayerConnection::teleport(...)` | Yes | None | -| `NativeSetTile(int, int, int, int, int, int)` | `ServerLevel::setBlock(...)` | Yes | None | -| `NativeGetPlayerAddress(int, char*, int, int*)` | `PlayerConnection` accessors | Yes | None | -| `NativeGetPlayerLatency(int)` | `PlayerConnection::latency` | Yes (field) | None | -| `NativeBanPlayer(int, char*, int)` | `Access::AddPlayerBan(...)` | Yes | None | -| `NativeSetItemMeta(int, int, char*, int)` | `ItemInstance` serialization | Yes | None | -| `NativeGetContainerContents(int, int*, int)` | `AbstractContainerMenu` traversal | Yes | None | - -**Verdict:** No drift detected in critical subsystems. Phase 2's native bridge build is expected to compile against target's headers without shimming. Any drift discovered at compile time will be a Phase 2.3 finding, not a known risk. - -## D. Critical hot files - -| File | Vanilla LOC | Donor LOC | Target LOC | Status | -|---|---|---|---|---| -| `Minecraft.Server/Windows64/ServerMain.cpp` | 1,257 | 1,257 | 1,257 | Identical across all three. Donor's FourKit additions sit on the vanilla baseline; target has not touched it. | -| `Minecraft.Server/CMakeLists.txt` | 86 | 110 (+24) | 86 | Target is vanilla. Donor adds FourKit deps and a post-build copy step. Clean apply. | -| `Minecraft.Server/cmake/sources/Common.cmake` | 628 | 640 (+12 net; donor also strips ~16 lines of OpManager/Security) | 628 | Target is vanilla. **Selective merge:** apply donor's `FourKit*.cpp` additions, do NOT apply donor's removals. | -| `Minecraft.Server/ServerProperties.cpp` | 965 | 930 (-35) | 965 | Donor is older / leaner; target carries hardcore + security fields donor never had. **Keep target version unchanged**, do not merge donor's deletions. | -| `Minecraft.Server/ServerProperties.h` | n/a | n/a | n/a | Same logic: keep target. | -| `Minecraft.Server/Console/commands/` | 20 subdirs | 18 subdirs (no `revoketoken`) | 20 subdirs (has `revoketoken`) | Donor predates `revoketoken`; target has it. Keep target's command set. | - -## E. Top-level structure of the target - -| Item | Status | -|---|---| -| `samples/` at repo root | NOT FOUND: Phase 7 will create it | -| `docs/` at repo root | NOT FOUND: created by this document | -| `docker/` | EXISTS: contains `dedicated-server/{Dockerfile,entrypoint.sh}`. Phase 5 must inspect to decide whether the image builds the server from source or consumes the release zip | -| `Minecraft.Server.FourKit/` | NOT FOUND (as expected) | - -## Merge strategy summary (input to Phase 2 and Phase 3) - -1. **Phase 2 source drop:** Copy the 7 PURE_ADD files into `Minecraft.Server/` verbatim. Copy the entire `Minecraft.Server.FourKit/` project to repo root verbatim. -2. **Phase 2 build files:** - - `Minecraft.Server/CMakeLists.txt`: apply donor's diff verbatim (target is vanilla). - - `Minecraft.Server/cmake/sources/Common.cmake`: apply ONLY the donor's additions of `FourKit*.cpp`. Do not delete OpManager or Security entries. -3. **Phase 3 hooks (the entire surface, all CLEAN_PATCH):** - - 3 sites in `Minecraft.Server/` (`ServerMain.cpp`, `ServerCliEngine.cpp`, `CliCommandHelp.cpp`) - - 17 sites in `Minecraft.World/` (block/entity/container) - - 6 sites in `Minecraft.Client/` (player/level/connection) - - 1 lifecycle hook pair in `ServerMain.cpp` for `FourKitRuntime::Initialize` / shutdown - - Logger plumbing in `ServerLogManager.{cpp,h}` and `ServerLogger.cpp` -4. **Phase 3 conflicts to leave alone:** - - `ServerProperties.{cpp,h}`: keep target version, do not merge donor. - - `Console/commands/revoketoken/`: keep target version, donor lacks it. - - `Access/OpManager.{cpp,h}`: keep target version, donor lacks it. - - `Security/`: keep target version, donor lacks it. -5. **Spot-checks needed before merge:** - - `Console/commands/help/CliCommandHelp.cpp`: verify donor's delta is purely the plugin help integration and not entangled with anything target changed. - - `Console/commands/whitelist/CliCommandWhitelist.cpp`: confirm scope of donor's edit. - - `Access/Access.{cpp,h}`: confirm donor's delta is not security-related. - -## Risks updated post-recon - -| Risk | Original severity | Post-recon severity | Reason | -|---|---|---|---| -| LCE-Revelations divergence at hook sites | HIGH | **LOW** | All 26 hook-bearing source files are byte-identical between vanilla and target. | -| CMake structural divergence | HIGH | **LOW** | Target's `CMakeLists.txt` and `Common.cmake` are byte-identical to vanilla. | -| ServerMain.cpp init-order conflicts | MEDIUM | **LOW** | File is identical to vanilla. | -| ServerProperties conflict | NEW | **MEDIUM** | Donor strips fields target relies on. Mitigation: do not merge donor's version. | -| Native ABI drift in subsystem APIs | MEDIUM | **LOW** | Spot-checks all clean. Compile-time will catch any miss. | -| Donor predates target features (revoketoken, OpManager, Security) | NEW | **LOW** | Easy to preserve target's additions; donor doesn't depend on their absence. | -| Self-contained .NET 10 publish size | MEDIUM | **MEDIUM** | Unchanged. ~70-100 MB release zip growth. | -| Hot-reload absent | LOW | **LOW** | Inherited limitation, documented. | - -## Open follow-ups for Phase 2 - -1. Confirm `Console/commands/help/CliCommandHelp.cpp` and `Console/commands/whitelist/CliCommandWhitelist.cpp` deltas are FourKit-related (currently marked LIKELY_CLEAN, not verified). -2. Confirm `Access/Access.{cpp,h}` delta scope. -3. Decide whether the donor's changes to `ServerLogManager` and `ServerLogger` are strictly additive (capture for FourKit log routing) or entangled with other refactoring. -4. Confirm during Phase 2.3 that `FourKitRuntime.cpp`'s hostfxr loader handles the case where `hostfxr.dll` is absent gracefully (server should warn and continue, not crash): this matters because the self-contained publish puts hostfxr next to the server exe, so the failure mode only fires if a user deletes it. diff --git a/flake.nix b/flake.nix index eef59c57..5b03e145 100644 --- a/flake.nix +++ b/flake.nix @@ -1,5 +1,5 @@ { - description = "MinecraftConsoles - Minecraft Legacy Console Edition recreation"; + description = "LCE-Revelations - Minecraft Legacy Console Edition recreation"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -500,7 +500,7 @@ XWIN_CACHE = "$HOME/.cache/xwin"; shellHook = '' - echo "MinecraftConsoles development shell" + echo "LCE-Revelations development shell" echo "" echo "Quick build (uses cached SDK):" echo " nix build .#client # Build client package"