From d175f692e0367cee941922f3d117c57293ea1fdc Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Wed, 31 Jan 2024 23:52:29 -0500 Subject: [PATCH] Put Sending Full Level Behind Flag --- launcher/src/client/available-feature-flags | 1 + mods/src/misc/misc.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/launcher/src/client/available-feature-flags b/launcher/src/client/available-feature-flags index 838422a5..de7b9cb4 100644 --- a/launcher/src/client/available-feature-flags +++ b/launcher/src/client/available-feature-flags @@ -52,3 +52,4 @@ TRUE Load Custom Skins TRUE 3D Chest Model TRUE Replace Block Highlight With Outline TRUE Use Java Beta 1.3 Light Ramp +TRUE Send Full Level When Hosting Game diff --git a/mods/src/misc/misc.c b/mods/src/misc/misc.c index 4b37ead2..78631c88 100644 --- a/mods/src/misc/misc.c +++ b/mods/src/misc/misc.c @@ -738,10 +738,12 @@ void init_misc() { overwrite_calls((void *) FurnaceTileEntity_getLitProgress, (void *) FurnaceTileEntity_getLitProgress_injection); // Send the full level, not only changed chunks - unsigned char nop_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop" - patch((void *) 0x717c4, nop_patch); - unsigned char mov_r3_ff[4] = {0xff, 0x30, 0xa0, 0xe3}; // "mov r3, #0xff" - patch((void *) 0x7178c, mov_r3_ff); + if (feature_has("Send Full Level When Hosting Game", server_enabled)) { + unsigned char nop_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop" + patch((void *) 0x717c4, nop_patch); + unsigned char mov_r3_ff[4] = {0xff, 0x30, 0xa0, 0xe3}; // "mov r3, #0xff" + patch((void *) 0x7178c, mov_r3_ff); + } // Java Light Ramp if (feature_has("Use Java Beta 1.3 Light Ramp", server_disabled)) {