Add Disable Autojump By Default
minecraft-pi-docker/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-10-02 20:34:39 -04:00
parent 7b37b46e9b
commit 890bc5a9c1
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -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);
}
}