This commit is contained in:
kirillsaint 2023-07-03 15:04:35 +06:00
parent adc547e61a
commit 49b00c4080

View File

@ -113,17 +113,19 @@ public abstract class MinecraftMixin {
@Inject(method = "displayGuiScreen", at = @At("RETURN"), cancellable = true)
public void displayGuiScreenInject(GuiScreen guiScreenIn, CallbackInfo ci) {
if(guiScreenIn != null) {
Client.logger.info("Opening menu: " + guiScreenIn.getClass().toString());
}
if(Client.backgroundPanorama == null) {
Client.backgroundPanorama = new BackgroundPanorama(Minecraft.getMinecraft());
}
if(guiScreenIn instanceof GuiMainMenu) {
displayGuiScreen(new net.silentclient.client.gui.minecraft.GuiMainMenu());
return;
}
if(guiScreenIn instanceof GuiIngameMenu) {
displayGuiScreen(new net.silentclient.client.gui.minecraft.GuiIngameMenu());
return;
}
if(guiScreenIn != null) {
Client.logger.info("Opening menu: " + guiScreenIn.getClass().toString());
}
}