Change Flag Grouping

This commit is contained in:
TheBrokenRail 2024-11-22 03:30:34 -05:00
parent 67ceb4ad00
commit ef3292c5e0
5 changed files with 51 additions and 32 deletions

View File

@ -52,6 +52,7 @@
* `Increase Render Chunk Size` (Enabled By Default) * `Increase Render Chunk Size` (Enabled By Default)
* `Proper Entity Shading` (Enabled By Default) * `Proper Entity Shading` (Enabled By Default)
* `Fix Sugar Position In Hand` (Enabled By Default) * `Fix Sugar Position In Hand` (Enabled By Default)
* `Fix Reloading Textures On Resize` (Enabled By Default)
* Existing Functionality (All Enabled By Default) * Existing Functionality (All Enabled By Default)
* `Fix Screen Rendering When Hiding HUD` * `Fix Screen Rendering When Hiding HUD`
* `Sanitize Usernames` * `Sanitize Usernames`
@ -73,13 +74,16 @@
* `Enable Text Input` * `Enable Text Input`
* `Update Default Options` * `Update Default Options`
* `Fix options.txt Loading/Saving` * `Fix options.txt Loading/Saving`
* `Fix Reloading Textures On Resize` * `Extend Supported Keycodes`
* Split Up `Remove Creative Mode Restrictions` Feature Flag * Split Up `Remove Creative Mode Restrictions` Feature Flag
* `Remove Creative Mode Restrictions` (Disabled By Default) * `Remove Creative Mode Restrictions` (Disabled By Default)
* `Display Slot Count In Creative Mode` (Disabled By Default) * `Display Slot Count In Creative Mode` (Disabled By Default)
* `Force Survival Mode Inventory UI` (Disabled By Default) * `Force Survival Mode Inventory UI` (Disabled By Default)
* `Force Survival Mode Inventory Behavior` (Disabled By Default) * `Force Survival Mode Inventory Behavior` (Disabled By Default)
* `Maximize Creative Mode Inventory Stack Size` (Disabled By Default) * `Maximize Creative Mode Inventory Stack Size` (Disabled By Default)
* Split Up `Miscellaneous Input Fixes` Feature Flag
* `Fix Escape Key Handling` (Enabled By Default)
* `Stop Locked Mouse From Interacting With HUD` (Enabled By Default)
* Rename Feature Flags * Rename Feature Flags
* `Disable Buggy Held Item Caching` To `Fix Held Item Caching` * `Disable Buggy Held Item Caching` To `Fix Held Item Caching`
* `Disable 'gui_blocks' Atlas` To `Regenerate "gui_blocks" Atlas` * `Disable 'gui_blocks' Atlas` To `Regenerate "gui_blocks" Atlas`

View File

@ -76,16 +76,14 @@ CATEGORY Textures
TRUE Animated Lava TRUE Animated Lava
TRUE Animated Fire TRUE Animated Fire
CATEGORY Input CATEGORY Input
TRUE Fix Bow & Arrow
TRUE Fix Attacking
TRUE Disable Autojump By Default TRUE Disable Autojump By Default
TRUE Miscellaneous Input Fixes
TRUE Bind "Q" Key To Item Dropping TRUE Bind "Q" Key To Item Dropping
TRUE Bind Common Toggleable Options To Function Keys TRUE Bind Common Toggleable Options To Function Keys
FALSE Disable Raw Mouse Motion (Not Recommended) FALSE Disable Raw Mouse Motion (Not Recommended)
FALSE Disable Speed Bridging FALSE Disable Speed Bridging
FALSE Disable Creative Mode Mining Delay FALSE Disable Creative Mode Mining Delay
TRUE Enable Text Input TRUE Enable Text Input
TRUE Extend Supported Keycodes
CATEGORY Multiplayer CATEGORY Multiplayer
CATEGORY Chat CATEGORY Chat
TRUE Implement Chat TRUE Implement Chat
@ -105,25 +103,33 @@ CATEGORY Gameplay
TRUE Implement Sound Engine TRUE Implement Sound Engine
TRUE Generate Caves TRUE Generate Caves
CATEGORY Bug Fixes CATEGORY Bug Fixes
TRUE Fix Furnace Not Checking Item Auxiliary CATEGORY Visual
TRUE Fix Held Item Caching TRUE Fix Held Item Caching
TRUE Fix Pigmen Burning In The Sun TRUE Fix Cobweb Lighting
TRUE Fix Carried Grass's Bottom Texture TRUE Fix Furnace Screen Visual Bug
TRUE Fix Screen Rendering When Hiding HUD TRUE Fix Text Wrapping
TRUE Fix Door Duplication TRUE Fix Carried Grass's Bottom Texture
TRUE Fix Cobweb Lighting TRUE Fix Screen Rendering When Hiding HUD
TRUE Fix Sneaking Syncing TRUE Fix Sugar Position In Hand
TRUE Fix Fire Immunity TRUE Fix Switching Perspective While Sneaking
TRUE Fix Fire Syncing CATEGORY Network
TRUE Fix Sunlight Not Properly Setting Mobs On Fire TRUE Patch RakNet Security Bug
TRUE Patch RakNet Security Bug TRUE Prevent Unnecessary Server Pinging
TRUE Prevent Unnecessary Server Pinging TRUE Fix Fire Syncing
TRUE Fix Furnace Screen Visual Bug TRUE Fix Sneaking Syncing
TRUE Fix Text Wrapping CATEGORY Input
TRUE Fix Transferring Durability When Using Items TRUE Fix Bow & Arrow
TRUE Fix Switching Perspective While Sneaking TRUE Fix Attacking
TRUE Fix Escape Key Handling
TRUE Stop Locked Mouse From Interacting With HUD
CATEGORY Gameplay
TRUE Fix Furnace Not Checking Item Auxiliary
TRUE Fix Pigmen Burning In The Sun
TRUE Fix Door Duplication
TRUE Fix Fire Immunity
TRUE Fix Sunlight Not Properly Setting Mobs On Fire
TRUE Fix Transferring Durability When Using Items
TRUE Fix Crash When Generating Certain Seeds TRUE Fix Crash When Generating Certain Seeds
TRUE Fix Sugar Position In Hand
TRUE Fix Reloading Textures On Resize TRUE Fix Reloading Textures On Resize
TRUE Fix options.txt Loading/Saving TRUE Fix options.txt Loading/Saving
CATEGORY Logging CATEGORY Logging

View File

@ -1,6 +1,10 @@
#include <mods/input/input.h> #include <mods/input/input.h>
#include <mods/feature/feature.h>
#include <symbols/minecraft.h> #include <symbols/minecraft.h>
#include <libreborn/patch.h> #include <libreborn/patch.h>
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include "input-internal.h" #include "input-internal.h"
@ -20,5 +24,7 @@ static int32_t sdl_key_to_minecraft_key_injection(Common_sdl_key_to_minecraft_ke
// Init // Init
void _init_keys() { void _init_keys() {
overwrite_calls(Common_sdl_key_to_minecraft_key, sdl_key_to_minecraft_key_injection); if (feature_has("Extend Supported Keycodes", server_disabled)) {
overwrite_calls(Common_sdl_key_to_minecraft_key, sdl_key_to_minecraft_key_injection);
}
} }

View File

@ -66,14 +66,8 @@ static void Gui_handleClick_injection(Gui_handleClick_t original, Gui *gui, cons
// Init // Init
void _init_misc() { void _init_misc() {
if (feature_has("Miscellaneous Input Fixes", server_disabled)) { // Proper Back Button Handling
// Fix OptionsScreen Ignoring The Back Button if (feature_has("Fix Escape Key Handling", server_disabled)) {
patch_vtable(OptionsScreen_handleBackEvent, OptionsScreen_handleBackEvent_injection);
// Fix "Sleeping Beauty" Bug
patch_vtable(InBedScreen_handleBackEvent, InBedScreen_handleBackEvent_injection);
// Disable Opening Inventory Using The Cursor When Cursor Is Hidden
overwrite_calls(Gui_handleClick, Gui_handleClick_injection);
// Proper Back Button Handling
misc_run_on_key_press([](Minecraft *mc, const int key) { misc_run_on_key_press([](Minecraft *mc, const int key) {
if (key == MC_KEY_ESCAPE) { if (key == MC_KEY_ESCAPE) {
_handle_back(mc); _handle_back(mc);
@ -82,6 +76,15 @@ void _init_misc() {
return false; return false;
} }
}); });
// Fix OptionsScreen Ignoring The Back Button
patch_vtable(OptionsScreen_handleBackEvent, OptionsScreen_handleBackEvent_injection);
// Fix "Sleeping Beauty" Bug (https://discord.com/channels/740287937727561779/761048906242981948/1164426402318270474)
patch_vtable(InBedScreen_handleBackEvent, InBedScreen_handleBackEvent_injection);
}
// Fix UI When Mouse Is Locked
if (feature_has("Stop Locked Mouse From Interacting With HUD", server_disabled)) {
// Disable Opening Inventory Using The Cursor When Cursor Is Hidden
overwrite_calls(Gui_handleClick, Gui_handleClick_injection);
// Disable Item Dropping Using The Cursor When Cursor Is Hidden // Disable Item Dropping Using The Cursor When Cursor Is Hidden
overwrite_call((void *) 0x27800, (void *) Gui_tickItemDrop_Minecraft_isCreativeMode_call_injection); overwrite_call((void *) 0x27800, (void *) Gui_tickItemDrop_Minecraft_isCreativeMode_call_injection);
} }

View File

@ -210,7 +210,7 @@ void init_options() {
overwrite_calls(TileRenderer_tesselateBlockInWorld, TileRenderer_tesselateBlockInWorld_injection); overwrite_calls(TileRenderer_tesselateBlockInWorld, TileRenderer_tesselateBlockInWorld_injection);
// options.txt // options.txt
if (feature_has("Fix options.txt Loading/Saving", server_disabled)) { if (feature_has("Fix options.txt Loading/Saving", server_enabled)) {
// Actually Save options.txt // Actually Save options.txt
overwrite_call((void *) 0x197fc, (void *) Options_save_Options_addOptionToSaveOutput_injection); overwrite_call((void *) 0x197fc, (void *) Options_save_Options_addOptionToSaveOutput_injection);
// Fix options.txt Path // Fix options.txt Path