BedrockIfy - Bedrock Features on Java!

BedrockIfy - Bedrock Features on Java!

462k Downloads

"Panorama Background On All Screens" breaks YetAnotherConfigLib screens

SAJewers opened this issue · 7 comments

commented
  • Enable "Panorama Background On All Screens"
  • Go to the options for a mod that uses YACL (eg. Debufigy or Mixtape)
  • Switch to a different tab

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

commented

@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

commented

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.

  • Open your Jar as a zip and locate .class file. Java code is compiled to Class file and zipped as Deflate, so you can find the directory for that namespace.
    BedrockIfy for instance, me -> juancarloscp52 -> bedrockify -> Bedrockify.class

or

  • Decompile it on your IDE. For example on IntelliJ IDEA, click “File” on toolbar -> open “Project Structure” subwindow (Ctrl+Alt+Shift+S) -> select “Project Settings: Libraries” on the left pane -> add “Java” library -> locate your Jar -> now is placed in “External Libraries” on your project.

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.

commented

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.

commented

Nope, that doesn't work. No change.

commented

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.

commented

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

commented

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.