Commit graph

159 commits

Author SHA1 Message Date
Huckle d55a38eb84
feat: Make -ip and -port args join server on game launch (#96)
Some checks failed
Sync branches with main / sync (push) Has been cancelled
feat: Add -quitondisconnect arg

Co-authored-by: TheHuckle <crazyh.dev@gmail.com>
2026-05-20 17:45:57 +03:00
PUFF_MON 9b1e25ac01
feat: Change cursor icon (#69) 2026-05-14 21:58:05 +03:00
rockefort 7fb07ec8d4
feat(TU31): LoadCreateJoin improvements (#65)
Feat: JoinMenu have description (for now isn't working because i'm waiting for the fourkit code rewriting)
2026-05-12 14:23:36 +03:00
/home/neo 985c213b27
feat: change title to Minecraft: neoLegacy (#56) 2026-05-02 22:02:56 +03:00
SevenToaster509 73668a841f refactor: update 4JLibs 2026-05-02 14:12:25 +01:00
George V. 2293dcbb9f
Merge remote-tracking branch 'Revelations/main' into upstream-merge
# Conflicts:
#	.github/workflows/nightly.yml
#	CMakeLists.txt
#	Minecraft.Client/CMakeLists.txt
#	Minecraft.Client/StringTable.cpp
#	Minecraft.Server/FourKitNatives.cpp
#	Minecraft.Server/Windows64/ServerMain.cpp
#	Minecraft.World/BiomeDecorator.cpp
#	Minecraft.World/BiomeSource.cpp
#	Minecraft.World/cmake/sources/Common.cmake
#	README.md
#	cmake/ServerTarget.cmake
2026-04-28 03:01:30 +03:00
ModMaker101 cbdb92d045 Replace MSVC __debugbreak with cross-compiler DEBUG_BREAK macro. (#1540) 2026-04-26 15:38:13 -05:00
Loki Rautio 3cef7f17dc fix: Control mappings wrong (update 4JLibs)
fixes #1531 and #1528
2026-04-26 15:38:13 -05:00
gsds 54ecbed263 Include 4JLibs as a submodule (#1535)
* feat: 4JLibs as a submodule

* fix: forgot submodule

* fix: actions didn't recurse submodules on checkout

* fix: oops, using old commit
2026-04-26 15:38:13 -05:00
SevenToaster509 34504b7b93 feat: achievements
fully functional but some achievements dont work yet

EXPERIMENTAL!!!!
2026-04-26 15:27:19 +01:00
Fireblade c6a137ec6f fix. building neoLegacy on linux
not sure if bundling an exe file is the best way to do this but oh well
2026-04-23 23:04:47 -04:00
neoapps-dev a3f388afa4 bump: 4JLibs 2026-04-22 20:31:33 +03:00
piebot 2653c1d1ba
chore: make 4JLibs a submodule
feat: 4JLibs as a submodule
2026-04-22 16:53:29 +03:00
Fireblade 3c731f9cea fix. leaderboard filtration 2026-04-21 14:20:25 -04:00
Fireblade ddcb092552 fix. multiple players on leaderboard 2026-04-21 14:12:38 -04:00
Fireblade 1d78fdb33a feat. leaderboard + fix for building on linux 2026-04-21 13:26:09 -04:00
Patoke 0fc1fd4370 fix: oops, using old commit 2026-04-21 17:54:08 +03:00
Patoke 894dd108a5 fix: forgot submodule 2026-04-21 17:40:24 +03:00
Frcoxd 6d170fa3da Feat: LoadCreateJoin (alfin kliado) 2026-04-20 23:28:09 -03:00
George V. 82c6c5db8f
Merge remote-tracking branch 'itsRevela/main' into upstream-merge
# Conflicts:
#	.github/ISSUE_TEMPLATE/config.yml
#	.github/workflows/nightly.yml
#	Minecraft.Client/Windows64/4JLibs/libs/4J_Profile.lib
#	README.md
2026-04-17 21:22:20 +03:00
itsRevela fde5fbe6f4 fix: force VSync on main menu to prevent GPU coil whine 2026-04-17 11:55:04 -05:00
itsRevela bc6e445f0c fix: capture save thumbnails directly from D3D11 backbuffer
The new 4JLibs CaptureThumbnail produces all-black 64x64 PNGs because
its internal m_backBufferTexture copy fails silently. Bypass it entirely
and capture from the swap chain backbuffer using the same proven approach
as our F2 screenshot, with center-crop and downsample to 64x64 PNG.
2026-04-17 07:06:02 -05:00
Loki Rautio 0e0f8f696d feat: Upgrade to 4JLibs libraries
Includes fixes and some modernizations compared to the original 4J
library binaries. Also introduces functionality to support stuff like
F2 screenshots, etc. This is basically the beginning of modernizing the
codebase.
2026-04-17 05:40:38 -05:00
George V. bd6586e45b fix: prevent crash when copying version when no ingame 2026-04-16 20:33:50 +03:00
George V. 56705f0576 feat: add version display and copy-to-clipboard functionality
Add version string (branch/version) to the debug overlay when F3 is active.
Also add a new keyboard shortcut (B key while F3 is held) to copy the
version string to the clipboard and show a confirmation message. This
improves debugging and support by making version information easily
accessible.
2026-04-16 20:33:50 +03:00
George V. 734f186cd3
Merge remote-tracking branch 'itsRevela/main' into upstream-merge
# Conflicts:
#	Minecraft.Client/Common/Audio/SoundNames.cpp
#	Minecraft.Client/SheepRenderer.cpp
#	Minecraft.World/SoundTypes.h
#	README.md
#	cmake/CopyAssets.cmake
2026-04-13 17:54:36 +03:00
itsRevela 0544add4e2 chore: remove redundant/unused 4JLibs files 2026-04-13 03:15:58 -05:00
Toru the Red Fox 825e96da54 Request dedicated GPU (#850) 2026-04-13 00:47:00 -05:00
itsRevela f189234614 feat: uncap fps in fullscreen for lower input latency
Before this change, turning VSync off did not actually uncap your frame rate. The game ran in borderless fullscreen, where Windows' desktop compositor owns the display pipeline and applies its own VSync regardless of what the game asks for. So on a 240Hz monitor with a GPU that could draw 800fps, you still only saw 240 frames per second and the other 560 were thrown away. Worse, the frames you did see were up to a refresh cycle stale by the time they hit your eyes, which is input latency you can feel when moving the camera or aiming.

Fullscreen now uses true DXGI exclusive mode, where the compositor is out of the way and the swap chain writes directly to the display. Every frame the GPU produces lands on screen as soon as it is ready, so "VSync off" actually does something. Expect FPS to climb well past your monitor's refresh rate and the mouse to feel noticeably more responsive.

Exclusive fullscreen also displays at your monitor's native resolution with no driver-side scaling or filtering. The backbuffer is grown to match the monitor exactly before the transition, and the display mode is pinned to the backbuffer size so nothing in the output pipeline resamples your pixels on the way to the screen. The result is a crisp 1:1 image with none of the softening or greyish filter that stretched output can introduce.

Yes, this is the mode where screen tearing can happen. Tearing gets a bad reputation but it is a visual tradeoff, not a bug, and many players prefer it over the latency VSync causes. If you want to avoid tearing, just turn VSync on in the settings and the game will cap cleanly to your refresh rate. You now have a real choice between the two instead of "off" quietly being broken.

Under the hood, F11 and the saved fullscreen preference both route through a new ApplyExclusiveFullscreen path that does Microsoft's recommended transition: grow the window to cover the monitor, ResizeTarget with no scaling so the display mode is pinned to the backbuffer size, SetFullscreenState(TRUE), SetColorSpace1(sRGB), then a second ResizeTarget so picky drivers actually apply the mode. Exit forces a real decorated windowed state so F11 cycles cleanly between windowed and exclusive fullscreen. ResizeD3D skips its swap-chain-recreate path while in exclusive mode so it does not fight DXGI for ownership.

The swap chain's RefreshRate changes from a hardcoded 60Hz to 0/0 so DXGI matches the current display mode. Fixes an "input signal out of range" error that could happen on high-refresh monitors after entering fullscreen, where the monitor was being asked to renegotiate timing off of 240Hz down to 60Hz on every launch.
2026-04-11 06:19:22 -05:00
itsRevela 6c8f463707 fix: restore in-world rendering and aspect ratio via bitblt swap chain
The previous FLIP_DISCARD swap chain configuration was producing broken rendering and a stretched aspect ratio on startup and after window resize, because the closed-source 4J Renderer library holds hidden backbuffer references that prevent ResizeBuffers from succeeding in flip mode. Switches the swap chain to the legacy bitblt DISCARD model with BufferCount=1, which lets the "destroy old, create new" resize path in ResizeD3D work cleanly. In-world rendering and aspect ratio are now correct at launch and across window resizes.

Known regression from this change: screen tearing no longer works when VSync is off. On Windows 10 and 11, bitblt swap chains always go through the DWM compositor, which locks presentation to the monitor refresh rate regardless of the SyncInterval parameter we pass to Present. Every frame the renderer produces above the refresh rate is silently dropped by DWM, which hurts input latency compared to a true uncapped-fps presentation path. The next iteration will reverse-engineer the 4J Renderer struct layout to find where those hidden backbuffer references are stored, release them before ResizeBuffers, and switch back to FLIP_DISCARD with ALLOW_TEARING so real tearing is possible again.

Also removes the dead SwapChainVSyncProxy COM wrapper. The proxy was originally intended to intercept Present calls from the Renderer library for VSync control, but the library hardcodes SyncInterval=1 and does not dispatch Present through the proxy vtable, so it was never actually doing anything useful.
2026-04-11 02:49:53 -05:00
Fireblade 37ee04356b feat. set intro scene background to white (#1474) 2026-04-11 01:52:01 -05:00
George V. 0ad7e383fa
Merge branch 'main-re' into upstream-merge 2026-04-10 22:00:17 +03:00
George V. 506ebd2176 Merge remote-tracking branch 'itsRevela/main'
# Conflicts:
#	.github/workflows/nightly.yml
#	.gitignore
#	Minecraft.Client/ChatScreen.cpp
#	Minecraft.Client/ClientConnection.cpp
#	Minecraft.Client/Common/Audio/SoundEngine.cpp
#	Minecraft.Client/Common/Audio/SoundEngine.h
#	Minecraft.Client/Common/Media/MediaWindows64.arc
#	Minecraft.Client/Common/UI/IUIScene_HUD.cpp
#	Minecraft.Client/Common/UI/UIControl_Base.cpp
#	Minecraft.Client/Common/UI/UIScene_DeathMenu.cpp
#	Minecraft.Client/Common/UI/UIScene_JoinMenu.cpp
#	Minecraft.Client/Common/XUI/XUI_Chat.cpp
#	Minecraft.Client/Common/XUI/XUI_Death.cpp
#	Minecraft.Client/Font.cpp
#	Minecraft.Client/Gui.cpp
#	Minecraft.Client/PendingConnection.cpp
#	Minecraft.Client/PlayerConnection.cpp
#	Minecraft.Client/PlayerConnection.h
#	Minecraft.Client/PlayerList.cpp
#	Minecraft.Client/Windows64/Network/WinsockNetLayer.cpp
#	Minecraft.Client/Windows64/Network/WinsockNetLayer.h
#	Minecraft.Client/Windows64Media/strings.h
#	Minecraft.Client/cmake/sources/Common.cmake
#	Minecraft.Server/Console/ServerCliEngine.cpp
#	Minecraft.Server/Console/commands/whitelist/CliCommandWhitelist.cpp
#	Minecraft.Server/Windows64/ServerMain.cpp
#	Minecraft.World/WitherBoss.h
#	Minecraft.World/cmake/sources/Common.cmake
#	README.md
2026-04-09 15:21:43 +03:00
neoapps-dev 0ddac15fad fix: linux cross-compiling 2026-04-08 13:07:04 +03:00
ryleu 5eab358dde add support for linux clang cross compiles 2026-04-08 12:03:15 +03:00
itsRevela 6728ecb141 fix: increase max packet size to 4MB for cross-fork compatibility
Matches the packet size limit used by the plugin-api fork. Our 512KB
limit caused "Connection lost" when their server sent large packets
(e.g. chunk data) that exceeded our cap.
2026-04-05 18:35:28 -05:00
SevenToaster509 546a279cc9 Book & Quill - Initial Commit
Implement Book & Quill:
- IUIScene_WritingBookMenu and UIScene_BookAndQuillMenu for UI
- Edited UIControl_Label to add direct editing (quite hardcoded to my needs right now)
- Reimplement scrapped custom payload packets for books and signing
- Other misc changes

TODO:
- Coloured and scambled text
- Book copying
- Clean up code
2026-04-05 15:05:03 +01:00
neoapps-dev 3fb20049b9 feat: Ctrl+Q to drop all stack 2026-04-02 15:25:12 +03:00
itsRevela 383c710833 feat: uncapped FPS when VSync off, fix graphics settings bitmask collision
Bypass the 4J RenderManager's hardcoded SyncInterval=1 by calling
the DXGI swap chain directly with Present(0, ALLOW_TEARING) when
VSync is disabled. Falls back to the library's Present on failure.

Relocate VSync/Fullscreen setting flags from bits 18-19 to bits 24-25
to eliminate overlap with the render distance byte (bits 16-23).

Sync the Fullscreen game setting when F11 is pressed so the graphics
menu checkbox stays accurate.

Remove tracked DumpSwf.class (already covered by tools/*.class gitignore).
2026-03-30 15:36:08 -05:00
piebot a38abd4e8d Merge changes from upstream. 2026-03-30 14:28:57 +03:00
itsRevela 967adf1e54 feat: make F2 screenshot work in any context
Move screenshot capture from Minecraft::tick() (which requires an
active player) to the Windows64 main loop alongside other global
key handlers (F1/F3/F11). F2 now works from the main menu, pause
menu, settings, inventory, crafting, and all other screens. Chat
message still shown when in-game.
2026-03-29 19:30:00 -05:00
neoapps-dev 48a5e882e3 omg i forgot to track the stb image write file lol 2026-03-29 18:52:59 +03:00
neoapps-dev d717f18628 feat: F2 for screenshotting
some code used from MLRE
2026-03-29 18:22:45 +03:00
itsRevela 245da783b3 feat: upgrade stream cipher from XOR to AES-128-CTR
Replace the XOR obfuscation cipher with AES-128-CTR using the Windows
BCrypt API. Key material grows from 16 to 32 bytes (16 AES key + 16 IV).
All callers auto-adjust via StreamCipher::KEY_SIZE. No handshake or
protocol changes needed beyond the larger MC|CKey payload.
2026-03-28 21:03:45 -05:00
itsRevela ba3ebe666c feat: dedicated server security hardening
Comprehensive security system to protect against packet-sniffing attacks,
XUID harvesting, privilege escalation, bot flooding, and XUID impersonation.

- Stream cipher: per-session XOR cipher with 4-message handshake via
  CustomPayloadPacket (MC|CKey, MC|CAck, MC|COn). Negotiated per-connection,
  backwards compatible (old clients/servers fall back to plaintext).
- Security gate: buffers all game data until cipher handshake completes,
  preventing unsecured clients from receiving any XUIDs or game state.
- Cipher handshake enforcer: kicks clients that don't complete the handshake
  within 5 seconds (configurable via require-secure-client).
- Identity tokens: persistent per-XUID tokens in identity-tokens.json,
  issued over the encrypted channel, verified on reconnect. Prevents XUID
  replay attacks. Client stores server-specific tokens.
- PROXY protocol v1: parses real client IPs from playit.gg tunnel headers
  so rate limiting, IP bans, and XUID spoof detection work per-player.
- Rate limiting: per-IP sliding window (default 5 connections/30s) with
  pending connection cap (default 10).
- Privilege hardening: OP requires ops.json, live checks on every command
  and privilege packet. Host-only server settings changes.
- XUID stripping: PreLoginPacket response sends INVALID_XUID placeholders.
- Packet validation: readUtf global string cap, reduced max packet size,
  stream desync protection on oversized strings.
- OpManager: persistent ops.json with XUID-based OP list.
- Whitelist improvements: whitelist add accepts player names with ambiguity
  detection, XUID cache from login attempts.
- revoketoken command: revoke identity tokens for players who lost theirs.
- server.log: persistent log file written alongside console output with
  flush-per-write to survive crashes.
- CLI security logging: consolidated per-join security summary with cipher
  status, token status, XUID, and real IP. Security warnings for kicks,
  spoofing, and unauthorized commands.
2026-03-28 19:18:06 -05:00
piebot b3ac4411fe Merge branch 'pr-1403' 2026-03-27 13:11:58 +03:00
itsRevela fbe14e7755 Add SRV record support for server connections
Resolve _minecraft._tcp.<hostname> SRV records before connecting,
matching Java Edition behavior. Players can connect using just a domain
name and the client will look up the actual server address and port
from DNS. Falls back to the original hostname/port if no SRV record
exists or the address is a numeric IP.
2026-03-26 15:45:24 -05:00
itsRevela f1310abe08 Refactor async server joining with eJoinState enum and dedicated progress UI
Replace the boolean-flag-based async join system with a clean state machine
(eJoinState enum) and move connection progress handling from UIScene_JoinMenu
into UIScene_ConnectingProgress as a dedicated UI class.

Combines the best of two approaches: non-blocking sockets with select()
timeout and SO_RCVTIMEO clearing (prevents random disconnects) with the
upstream's state enum, FinalizeJoin separation, and ConnectingProgress UI.

JoinGame() now returns JOINGAME_PENDING on Win64, and
PlatformNetworkManagerStub::DoWork() polls the join state to finalize
the connection when the background thread succeeds.
2026-03-26 11:51:17 -05:00
piebot 87348a7e16 Fix Github Actions compile error 2026-03-26 19:09:04 +03:00
Sylvessa 1a50770647
Add asynchronous server joining (#1408) 2026-03-26 10:15:11 -04:00