use of cavern.client.gui.GuiLoadCaveTerrain in project Cavern2 by kegare.
the class ClientEventHooks method onGuiOpen.
@SubscribeEvent
public void onGuiOpen(GuiOpenEvent event) {
Minecraft mc = FMLClientHandler.instance().getClient();
GuiScreen gui = event.getGui();
if (gui != null && GuiModList.class == gui.getClass()) {
String desc = I18n.format("cavern.description");
if (!Strings.isNullOrEmpty(desc)) {
Cavern.metadata.description = desc;
}
} else if (DisplayConfig.customLoadingScreen && CavernAPI.dimension.isInCaveDimensions(mc.player) && (mc.currentScreen == null || !(mc.currentScreen instanceof GuiWorldSelection))) {
if (gui == null) {
if (mc.currentScreen != null && GuiDownloadCaveTerrain.class == mc.currentScreen.getClass()) {
event.setGui(new GuiLoadCaveTerrain());
}
} else if (GuiDownloadTerrain.class == gui.getClass()) {
event.setGui(new GuiDownloadCaveTerrain());
}
}
}
Aggregations