Add --print-features
minecraft-pi-docker/pipeline/head This commit looks good Details

This commit is contained in:
TheBrokenRail 2020-12-08 16:32:12 -05:00
parent 3533830669
commit f81bf3c67f
3 changed files with 15 additions and 7 deletions

View File

@ -2,8 +2,8 @@
set -e
# Ensure Features Are Selected
MCPI_FEATURES="$(zenity --class 'Minecraft - Pi edition' --list --checklist --column 'Enabled' --column 'Feature' \
# All Feature Flags
export AVAILABLE_FEATURES=" \
TRUE 'Touch GUI' \
TRUE 'Fix Bow & Arrow' \
TRUE 'Fix Attacking' \
@ -18,7 +18,16 @@ MCPI_FEATURES="$(zenity --class 'Minecraft - Pi edition' --list --checklist --co
TRUE 'Remove Invalid Item Background' \
TRUE 'Disable gui_blocks Atlas' \
TRUE 'Smooth Lighting' \
FALSE '3D Anaglyph')"
FALSE '3D Anaglyph'"
# Print Feature Flags Option
if [ "$1" = "--print-features" ]; then
echo "${AVAILABLE_FEATURES}"
exit 0
fi
# Ensure Features Are Selected
MCPI_FEATURES="$(sh -c "zenity --class 'Minecraft - Pi edition' --list --checklist --column 'Enabled' --column 'Feature' ${AVAILABLE_FEATURES}")"
MCPI_USERNAME="$(zenity --class 'Minecraft - Pi edition' --entry --text 'Minecraft Username:' --entry-text 'StevePi')"
export MCPI_FEATURES
export MCPI_USERNAME

View File

@ -20,8 +20,8 @@ static void set_is_survival(int new_is_survival) {
unsigned char size_patch[4] = {new_is_survival ? 0x24 : 0x18, 0x00, 0xa0, 0xe3};
patch((void *) 0x16ee4, size_patch);
// Replace Creator Constructor With CreativeMode Or SurvivalMode Constructor
overwrite(Creator, new_is_survival ? SurvivalMode : CreativeMode);
// Replace Default CreatorMode Constructor With CreatorMode Or SurvivalMode Constructor
overwrite_call((void *) 0x16ef4, new_is_survival ? SurvivalMode : CreatorMode);
is_survival = new_is_survival;
}

View File

@ -135,9 +135,8 @@ static Gui_renderOnSelectItemNameText_t Gui_renderOnSelectItemNameText = (Gui_re
// GameMode Constructors
static void *Creator = (void *) 0x1a044;
static void *CreatorMode = (void *) 0x1a044;
static void *SurvivalMode = (void *) 0x1b7d8;
static void *CreativeMode = (void *) 0x1b258;
// LevelData