Fix Joining Servers Without Forced UI Lag (Closes #118)
All checks were successful
CI / Build (AMD64) (push) Successful in 22m33s
CI / Build (ARM64) (push) Successful in 23m19s
CI / Build (ARMHF) (push) Successful in 12m30s
CI / Test (AMD64, Server) (push) Successful in 3m21s
CI / Build Example Mods (push) Successful in 1m44s
CI / Test (AMD64, Client) (push) Successful in 7m12s
CI / Test (ARM64, Client) (push) Successful in 7m29s
CI / Test (ARM64, Server) (push) Successful in 4m25s
CI / Test (ARMHF, Client) (push) Successful in 7m50s
CI / Test (ARMHF, Server) (push) Successful in 4m44s
CI / Release (push) Has been skipped

This commit is contained in:
TheBrokenRail 2025-03-06 00:39:34 -05:00
parent 7a237a9ee6
commit 0dad883459
5 changed files with 18 additions and 5 deletions

View File

@ -104,7 +104,7 @@
* `Force Touch GUI Inventory` To `Force Touch UI Inventory`
* `Full Touch GUI` To `Full Touch UI`
* `Force Touch GUI Button Behavior` To `Force Touch UI Button Behavior`
* `Remove Forced GUI Lag (Can Break Joining Servers)` To `Remove Forced UI Lag (Can Break Joining Servers)`
* `Remove Forced GUI Lag (Can Break Joining Servers)` To `Remove Forced UI Lag`
* `Hide Block Outline When GUI Is Hidden` To `Hide Block Outline When UI Is Hidden`
* `Fix Camera Functionality` To `Add Camera Functionality`
* `Fix Camera Rendering` To `Enable Camera Rendering`

View File

@ -39,7 +39,7 @@ CATEGORY User Interface
FALSE Full Touch UI
TRUE Force Touch UI Button Behavior
TRUE Improved Cursor Rendering
FALSE Remove Forced UI Lag (Can Break Joining Servers)
TRUE Remove Forced UI Lag
TRUE Improved Button Hover Behavior
TRUE Classic Item Count UI
TRUE Click Buttons On Mouse Down

View File

@ -205,6 +205,17 @@ static void PauseScreen_init_injection(PauseScreen_init_t original, PauseScreen
}
}
// Fix Joining Servers Without Forced UI Lag
static bool GameRenderer_render_Minecraft_isLevelGenerated_injection(Minecraft *self) {
if (self->level_renderer->level != self->level) {
// Not Setup Yet
return false;
} else {
// Call Original Method
return self->isLevelGenerated();
}
}
// Click Buttons On Mouse Down
static void Screen_mouseClicked_injection(__attribute__((unused)) Screen_mouseClicked_t original, Screen *self, int x, int y, const int param_1) {
if (param_1 == 1) {
@ -375,8 +386,9 @@ void _init_misc_ui() {
}
// Remove Forced GUI Lag
if (feature_has("Remove Forced UI Lag (Can Break Joining Servers)", server_enabled)) {
if (feature_has("Remove Forced UI Lag", server_enabled)) {
overwrite_calls(Common_sleepMs, nop<Common_sleepMs_t, int>);
overwrite_call((void *) 0x4a51c, Minecraft_isLevelGenerated, GameRenderer_render_Minecraft_isLevelGenerated_injection);
}
// Custom GUI Scale

View File

@ -7,7 +7,7 @@ method void setScreen(Screen *screen) = 0x15d6c;
method void tick(int tick, int max_ticks) = 0x16934;
method void hostMultiplayer(int port) = 0x16664;
method char *getProgressMessage() = 0x16e58;
method uint isLevelGenerated() = 0x16e6c;
method bool isLevelGenerated() = 0x16e6c;
method bool isCreativeMode() = 0x17270;
method void releaseMouse() = 0x15d30;
method void grabMouse() = 0x15d10;

View File

@ -18,4 +18,5 @@ property Minecraft *minecraft = 0xb4;
property RenderList render_list = 0x34;
property Chunk **chunks = 0x98;
property bool occlusion_check = 0xb8;
property int num_buffers = 0xd0;
property int num_buffers = 0xd0;
property Level *level = 0x84;