Move worldgen desync patch to misc, for LAN games

This commit is contained in:
Bigjango13 2024-01-21 19:00:01 -05:00
parent 2995d1c9ad
commit 5c5538df2f
2 changed files with 6 additions and 5 deletions

View File

@ -725,6 +725,12 @@ void init_misc() {
// Fix Furnace Visual Bug
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);
// Init C++ And Logging
_init_misc_cpp();
_init_misc_logging();

View File

@ -572,11 +572,6 @@ static void server_init() {
patch((void *) 0x1685c, player_patch);
// Start World On Launch
misc_run_on_update(Minecraft_update_injection);
// Send the full level, not only changed chunks
unsigned char nop[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop"
patch((void *) 0x717c4, nop);
unsigned char mov_r3_ff[4] = {0xff, 0x30, 0xa0, 0xe3}; // "mov r3, #0xff"
patch((void *) 0x7178c, mov_r3_ff)
// Set Max Players
unsigned char max_players_patch[4] = {get_max_players(), 0x30, 0xa0, 0xe3}; // "mov r3, #MAX_PLAYERS"
patch((void *) 0x166d0, max_players_patch);