Add Disable Creative Mode Mining Delay

This commit is contained in:
TheBrokenRail 2022-09-23 17:08:26 -04:00
parent 5aae95fd37
commit 29bc6faf3d
4 changed files with 13 additions and 6 deletions

View File

@ -6,7 +6,7 @@ TRUE Disable Autojump By Default
TRUE Display Nametags By Default TRUE Display Nametags By Default
TRUE Fix Sign Placement TRUE Fix Sign Placement
TRUE Show Block Outlines TRUE Show Block Outlines
FALSE Expand Creative Inventory FALSE Expand Creative Mode Inventory
FALSE Remove Creative Mode Restrictions FALSE Remove Creative Mode Restrictions
TRUE Animated Water TRUE Animated Water
TRUE Remove Invalid Item Background TRUE Remove Invalid Item Background
@ -16,7 +16,7 @@ TRUE Implement Chat
FALSE Hide Chat Messages FALSE Hide Chat Messages
TRUE Implement Death Messages TRUE Implement Death Messages
TRUE Implement Game-Mode Switching TRUE Implement Game-Mode Switching
TRUE Allow Joining Survival Servers TRUE Allow Joining Survival Mode Servers
TRUE Miscellaneous Input Fixes TRUE Miscellaneous Input Fixes
TRUE Bind "Q" Key To Item Dropping TRUE Bind "Q" Key To Item Dropping
TRUE Bind Common Toggleable Options To Function Keys TRUE Bind Common Toggleable Options To Function Keys
@ -43,3 +43,4 @@ TRUE Translucent Toolbar
FALSE Force EGL FALSE Force EGL
TRUE Improved Classic Title Screen TRUE Improved Classic Title Screen
FALSE Disable Speed Bridging FALSE Disable Speed Bridging
FALSE Disable Creative Mode Mining Delay

View File

@ -104,7 +104,7 @@ int creative_is_restricted() {
// Init // Init
void init_creative() { void init_creative() {
// Add Extra Items To Creative Inventory (Only Replace Specific Function Call) // Add Extra Items To Creative Inventory (Only Replace Specific Function Call)
if (feature_has("Expand Creative Inventory", server_enabled)) { if (feature_has("Expand Creative Mode Inventory", server_enabled)) {
#ifndef MCPI_SERVER_MODE #ifndef MCPI_SERVER_MODE
misc_run_on_creative_inventory_setup(Inventory_setupDefault_FillingContainer_addItem_call_injection); misc_run_on_creative_inventory_setup(Inventory_setupDefault_FillingContainer_addItem_call_injection);
#endif #endif
@ -120,7 +120,7 @@ void init_creative() {
} }
} }
// Remove Creative Restrictions (Opening Chests, Crafting, Etc) // Remove Creative Mode Restrictions (Opening Chests, Crafting, Etc)
if (feature_has("Remove Creative Mode Restrictions", server_enabled)) { if (feature_has("Remove Creative Mode Restrictions", server_enabled)) {
unsigned char nop_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop" unsigned char nop_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop"
// Remove Restrictions // Remove Restrictions

View File

@ -70,8 +70,8 @@ void init_game_mode() {
_init_game_mode_ui(); _init_game_mode_ui();
} }
// Allow Joining Survival Servers // Allow Joining Survival Mode Servers
if (feature_has("Allow Joining Survival Servers", server_enabled)) { if (feature_has("Allow Joining Survival Mode Servers", server_enabled)) {
unsigned char server_patch[4] = {0x0f, 0x00, 0x00, 0xea}; // "b 0x6dcb4" unsigned char server_patch[4] = {0x0f, 0x00, 0x00, 0xea}; // "b 0x6dcb4"
patch((void *) 0x6dc70, server_patch); patch((void *) 0x6dc70, server_patch);
} }

View File

@ -424,6 +424,12 @@ void init_misc() {
patch((void *) 0x494b4, disable_speed_bridging_patch); patch((void *) 0x494b4, disable_speed_bridging_patch);
} }
// Disable Creative Mode Mining Delay
if (feature_has("Disable Creative Mode Mining Delay", server_disabled)) {
unsigned char nop_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; // "nop"
patch((void *) 0x19fa0, nop_patch);
}
// Init C++ And Logging // Init C++ And Logging
_init_misc_cpp(); _init_misc_cpp();
_init_misc_logging(); _init_misc_logging();