"Panorama Background On All Screens" breaks YetAnotherConfigLib screens
SAJewers opened this issue · 7 comments
- 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
@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
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.
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.
Any way to have Minecraft e.g. log the current screen name to the console in order to quickly and easily disable them?
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.