Add Remove Invalid Item Background Patch

This commit is contained in:
TheBrokenRail 2020-11-20 14:54:07 -05:00
parent 9bdb12c6ef
commit cdbb6bac21
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 edition' --list --checklist --column 'Enabled' --column 'Feature' TRUE 'Touch GUI' FALSE 'Survival Mode' TRUE 'Fix Bow & Arrow' TRUE 'Fix Attacking' TRUE 'Mob Spawning' TRUE 'Fancy Graphics' TRUE 'Disable Autojump By Default' TRUE 'Fix Sign Placement' TRUE 'Show Block Outlines' FALSE 'Expand Creative Inventory' FALSE 'Peaceful Mode' TRUE 'Animated Water')"
MCPI_FEATURES="$(zenity --class 'Minecraft - Pi edition' --list --checklist --column 'Enabled' --column 'Feature' TRUE 'Touch GUI' FALSE 'Survival Mode' TRUE 'Fix Bow & Arrow' TRUE 'Fix Attacking' TRUE 'Mob Spawning' TRUE 'Fancy Graphics' TRUE 'Disable Autojump By Default' TRUE 'Fix Sign Placement' TRUE 'Show Block Outlines' FALSE 'Expand Creative Inventory' FALSE 'Peaceful Mode' TRUE 'Animated Water' TRUE 'Remove Invalid Item Background')"
MCPI_USERNAME="$(zenity --class 'Minecraft - Pi edition' --entry --text 'Minecraft Username:' --entry-text 'StevePi')"
fi
export MCPI_FEATURES

View File

@ -280,4 +280,10 @@ __attribute__((constructor)) static void init() {
int block_outlines = extra_has_feature("Show Block Outlines");
unsigned char outline_patch[4] = {block_outlines ? !touch_gui : touch_gui, 0x00, 0x50, 0xe3};
patch((void *) 0x4a210, outline_patch);
if (extra_has_feature("Remove Invalid Item Background")) {
// Remove Invalid Item Background (A Red Background That Appears For Items That Are Not Obtainable Without Modding/Inventory Editing)
unsigned char invalid_item_background_patch[4] = {0x00, 0xf0, 0x20, 0xe3};
patch((void *) 0x63c98, invalid_item_background_patch);
}
}