use of stevekung.mods.moreplanets.util.debug.GuiGetItemName in project MorePlanets by SteveKunG.
the class ClientEventHandler method onClientTick.
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onClientTick(ClientTickEvent event) {
if (MorePlanetsCore.isObfuscatedEnvironment()) {
if (Keyboard.isKeyDown(Keyboard.KEY_F7)) {
try {
// used for real time debugging item description
Object proxy = Class.forName("mezz.jei.JustEnoughItems").getDeclaredMethod("getProxy").invoke(Class.forName("mezz.jei.startup.ProxyCommonClient"));
Field pluginsField = proxy.getClass().getDeclaredField("plugins");
pluginsField.setAccessible(true);
Class<?> starter = Class.forName("mezz.jei.startup.JeiStarter");
Object obj = starter.newInstance();
Method method = obj.getClass().getDeclaredMethod("start", List.class);
method.invoke(obj, (ArrayList<Object>) pluginsField.get(proxy));
} catch (Exception e) {
e.printStackTrace();
}
}
if (Keyboard.isKeyDown(Keyboard.KEY_NUMPAD5) && !this.mc.player.getHeldItemMainhand().isEmpty()) {
this.mc.displayGuiScreen(new GuiGetItemName());
}
}
if (ClientEventHandler.loadRenderers) {
if (--this.loadRendererTick == 0) {
MPLog.debug("Reload renderer");
this.mc.renderGlobal.loadRenderers();
this.loadRendererTick = 30;
ClientEventHandler.loadRenderers = false;
}
}
if (this.mc.player != null) {
if (ConfigManagerMP.enableStartedPlanet && this.mc.player.dimension == -1 && this.mc.currentScreen instanceof GuiGameOver && !(this.mc.currentScreen instanceof GuiGameOverMP)) {
this.mc.displayGuiScreen(new GuiGameOverMP());
}
}
if (this.mc.currentScreen instanceof GuiMainMenu) {
ClientEventHandler.receiverRenderPos.clear();
ClientEventHandler.wasteRenderPos.clear();
ClientEventHandler.entityId.clear();
ClientEventHandler.bossList.clear();
ClientEventHandler.itemRendererTicks = 0;
}
if (event.phase == Phase.START) {
ClientEventHandler.itemRendererTicks++;
this.partialTicks++;
WeatherRendererNibiru.INSTANCE.runRenderTick();
CloudRendererNibiru.INSTANCE.runRenderTick();
}
}
Aggregations