juancarloscp52 / BedrockIfy

A Minecraft mod that implements some Minecraft Bedrock features into Java edition.
GNU General Public License v3.0
180 stars 37 forks source link

"Panorama Background On All Screens" breaks YetAnotherConfigLib screens #289

Open SAJewers opened 1 year ago

SAJewers commented 1 year ago

The config screen immediately goes blank, and you have to either hit Esc to get out, or try and fumble around the menu without being able to see anything. Works fine if "Panorama Background On All Screens" is disabled

2023-07-12_11 54 54

lonefelidae16 commented 1 year ago

Have you tried adding yacl3.gui.YACLScreen into Disable panorama on screens? The namespace of YetAnotherConfigLib seems to have changed since v3. 2023-07-27_08 18 17

There is no modset information provided and I don’t have a mod that depends on YACL, so I cannot confirm about this issue.

SAJewers commented 1 year ago

Nope, that doesn't work. No change.

lonefelidae16 commented 1 year ago

Okay I found a solution. This feature have been applied to all tab screens added since 1.20 and a bit of conditions need to be added.

thanks for your time, I’ll create of this fix.

jbrown1597 commented 1 year ago

@lonefelidae16 How can I locate the "class name" of mods so I may add them to my "panorama disabled list" & fix broken menus?

Future request: Panorama for loading screen & main menu only, not forced on all possible screens.

THANK YOU FOR ALL YOUR HARD WORK <3

lonefelidae16 commented 1 year ago

How can I locate the "class name" of mods so I may add them to my "panorama disabled list" & fix broken menus?

There are two things.

or

Future request: Panorama for loading screen & main menu only, not forced on all possible screens.

Sorry, but it’s out of this issue, please raise a new one. however I probably can’t solve it right away - will increase setting options.

TheChilliPL commented 1 year ago

Any way to have Minecraft e.g. log the current screen name to the console in order to quickly and easily disable them?

lonefelidae16 commented 1 year ago

Any way to have Minecraft e.g. log the current screen name to the console in order to quickly and easily disable them?

Yeah there is. I think adding Mixin to the constructor method of the Screen class would be a good idea, but I’m not sure if this way is easy...

public class YourModClass {
    public static final Logger LOGGER = LoggerFactory.getLogger(YourModClass.class);

    // Works on 1.18.2 or later.
    // public static final Logger LOGGER = LogUtils.getLogger();
}
@Mixin(Screen.class)
public class ScreenMixin {

    @Inject(method = "<init>(Lnet/minecraft/text/Text;)V", at = @At("RETURN"))
    private void putScreenClassName(Text text, CallbackInfo ci) {
        // Get the current Screen class.
        Screen $this = Screen.class.cast(this);
        // Objective code.
        YourModClass.LOGGER.info("[ScreenLogger] ClassName = '{}'", $this.getClass().getCanonicalName());
    }
}

Note that this code generates the line each time when you open new screens, such as opening select world screen, opening inventory, opening options screen, etc.