diff --git a/debian/usr/bin/minecraft-pi b/debian/usr/bin/minecraft-pi index f8c975f..700b365 100755 --- a/debian/usr/bin/minecraft-pi +++ b/debian/usr/bin/minecraft-pi @@ -4,7 +4,7 @@ set -e # Ensure Features Are Selected if [ -z "${MCPI_SUBSHELL}" ]; then - MCPI_FEATURES="$(zenity --class minecraft-pi --list --checklist --column 'Enabled' --column 'Feature' FALSE 'Touch GUI' FALSE 'Survival Mode' FALSE 'Fix Bow & Arrow' FALSE 'Fix Attacking' FALSE 'Mob Spawning' FALSE 'Show Clouds')" + MCPI_FEATURES="$(zenity --class minecraft-pi --list --checklist --column 'Enabled' --column 'Feature' FALSE 'Touch GUI' FALSE 'Survival Mode' FALSE 'Fix Bow & Arrow' FALSE 'Fix Attacking' FALSE 'Mob Spawning' FALSE 'Show Clouds' FALSE 'Disable Autojump By Default')" MCPI_USERNAME="$(zenity --class minecraft-pi --entry --text 'Minecraft Username:' --entry-text 'StevePi')" fi export MCPI_FEATURES diff --git a/mods/src/extra.c b/mods/src/extra.c index a40221b..0b4955a 100644 --- a/mods/src/extra.c +++ b/mods/src/extra.c @@ -185,4 +185,10 @@ __attribute__((constructor)) static void init() { // Change Username const char *username = get_username(); patch_address((void *) 0x18fd4, (void *) username); + + if (has_feature("Disable Autojump By Default")) { + // Disable Autojump By Default + unsigned char autojump_patch[4] = {0x00, 0x30, 0xa0, 0xe3}; + patch((void *) 0x44b90, autojump_patch); + } }