Split Off "Allow Joining Survival Servers" From Game-Mode Mod

This commit is contained in:
TheBrokenRail 2021-08-23 18:33:18 -04:00
parent d372169c79
commit 4597e824bb
2 changed files with 8 additions and 5 deletions

View File

@ -18,6 +18,7 @@ TRUE Fix Camera Rendering
TRUE Implement Chat
TRUE Implement Death Messages
TRUE Implement Game-Mode Switching
TRUE Allow Joining Survival Servers
TRUE Miscellaneous Input Fixes
TRUE Bind "Q" Key To Item Dropping
TRUE Bind Common Toggleable Options To Function Keys

View File

@ -37,8 +37,8 @@ static void Minecraft_setIsCreativeMode_injection(unsigned char *this, int32_t n
// Init
void init_game_mode() {
if (feature_has("Implement Game-Mode Switching", 1)) {
// Dynamic Game Mode Switching
if (feature_has("Implement Game-Mode Switching", 1)) {
set_is_survival(1);
overwrite_calls((void *) Minecraft_setIsCreativeMode, (void *) Minecraft_setIsCreativeMode_injection);
@ -50,11 +50,13 @@ void init_game_mode() {
uint32_t level_size = SERVER_LEVEL_SIZE;
patch((void *) 0x17004, (unsigned char *) &level_size);
// Allow Connecting To Survival Servers
unsigned char server_patch[4] = {0x0f, 0x00, 0x00, 0xea}; // "b 0x6dcb4"
patch((void *) 0x6dc70, server_patch);
// Init C++
_init_game_mode_cpp();
}
// Allow Joining Survival Servers
if (feature_has("Allow Joining Survival Servers", 1)) {
unsigned char server_patch[4] = {0x0f, 0x00, 0x00, 0xea}; // "b 0x6dcb4"
patch((void *) 0x6dc70, server_patch);
}
}