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)
* `Proper Entity Shading` (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)
* `Fix Screen Rendering When Hiding HUD`
* `Sanitize Usernames`
@ -73,13 +74,16 @@
* `Enable Text Input`
* `Update Default Options`
* `Fix options.txt Loading/Saving`
* `Fix Reloading Textures On Resize`
* `Extend Supported Keycodes`
* Split Up `Remove Creative Mode Restrictions` Feature Flag
* `Remove Creative Mode Restrictions` (Disabled By Default)
* `Display Slot Count In Creative Mode` (Disabled By Default)
* `Force Survival Mode Inventory UI` (Disabled By Default)
* `Force Survival Mode Inventory Behavior` (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
* `Disable Buggy Held Item Caching` To `Fix Held Item Caching`
* `Disable 'gui_blocks' Atlas` To `Regenerate "gui_blocks" Atlas`

View File

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

View File

@ -1,6 +1,10 @@
#include <mods/input/input.h>
#include <mods/feature/feature.h>
#include <symbols/minecraft.h>
#include <libreborn/patch.h>
#include <SDL/SDL.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
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
void _init_misc() {
if (feature_has("Miscellaneous Input Fixes", server_disabled)) {
// Fix OptionsScreen Ignoring The Back Button
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
// Proper Back Button Handling
if (feature_has("Fix Escape Key Handling", server_disabled)) {
misc_run_on_key_press([](Minecraft *mc, const int key) {
if (key == MC_KEY_ESCAPE) {
_handle_back(mc);
@ -82,6 +76,15 @@ void _init_misc() {
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
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);
// 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
overwrite_call((void *) 0x197fc, (void *) Options_save_Options_addOptionToSaveOutput_injection);
// Fix options.txt Path