use of net.tropicraft.client.gui.GuiTropicsLoading in project Tropicraft by Tropicraft.
the class TropicraftLoadingListener method onOpenGui.
@SubscribeEvent
public void onOpenGui(GuiOpenEvent evt) {
if (evt.getGui() instanceof GuiDownloadTerrain) {
if (FMLClientHandler.instance().getClientPlayHandler() instanceof NetHandlerPlayClient) {
if (mc.player != null) {
GuiTropicsLoading guiLoading = new GuiTropicsLoading();
boolean isLeaving = false;
if (lastDimension != TropicraftWorldUtils.TROPICS_DIMENSION_ID && mc.player.dimension == TropicraftWorldUtils.TROPICS_DIMENSION_ID) {
isLeaving = true;
}
guiLoading.setLeaving(isLeaving);
if (wasTropicsInvolved() && isDimensionFarewellAllowed(isLeaving)) {
evt.setGui(guiLoading);
}
}
}
}
}
Aggregations