From a83cb6d211ecdc7ec5831265bc5980c30d00970e Mon Sep 17 00:00:00 2001 From: TheBrokenRail Date: Sun, 29 Nov 2020 18:59:01 -0500 Subject: [PATCH] Add Optional Patch To Disable gui_blocks Atlas --- debian/client/common/usr/bin/minecraft-pi | 1 + mods/src/extra.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/debian/client/common/usr/bin/minecraft-pi b/debian/client/common/usr/bin/minecraft-pi index 8a4c8fc..c15c08e 100755 --- a/debian/client/common/usr/bin/minecraft-pi +++ b/debian/client/common/usr/bin/minecraft-pi @@ -16,6 +16,7 @@ MCPI_FEATURES="$(zenity --class 'Minecraft - Pi edition' --list --checklist --co FALSE 'Peaceful Mode' \ TRUE 'Animated Water' \ TRUE 'Remove Invalid Item Background' \ + FALSE 'Disable gui_blocks Atlas' \ TRUE 'Smooth Lighting' \ FALSE '3D Anaglyph')" MCPI_USERNAME="$(zenity --class 'Minecraft - Pi edition' --entry --text 'Minecraft Username:' --entry-text 'StevePi')" diff --git a/mods/src/extra.c b/mods/src/extra.c index 63dc67e..74b12db 100644 --- a/mods/src/extra.c +++ b/mods/src/extra.c @@ -320,6 +320,12 @@ __attribute__((constructor)) static void init() { patch((void *) 0x63c98, invalid_item_background_patch); } + if (extra_has_feature("Disable gui_blocks Atlas")) { + // Disable gui_blocks Atlas Which Contains Pre-Rendered Textures For Blocks In The Inventory + unsigned char disable_gui_blocks_atlas_patch[4] = {0x00, 0xf0, 0x20, 0xe3}; + patch((void *) 0x63c2c, disable_gui_blocks_atlas_patch); + } + smooth_lighting = extra_has_feature("Smooth Lighting"); if (smooth_lighting) { // Enable Smooth Lighting