@SubscribeEvent public void onRenderTick(RenderTickEvent event) { b = b + 0.01F; e = e + 0.07F; a = a + 0.01F; // System.out.println(b + " / " + e + " / " + a); if (b >= 180F) { b = -180F; } if (e >= 180F) { e = -180F; } if (a >= 180F) { a = -180F; } }
@SubscribeEvent public void TickEvent(RenderTickEvent event) { config = new Configuration(new File( "." + "/config/", DefaultProps.configDirectory + DefaultProps.defaultConfigFile)); config.load(); displayBossHealth = config.get("mob controls", "Display PZBoss HealthBar", this.displayBossHealth).getBoolean(displayBossHealth); config.save(); if (event.phase == Phase.END && displayBossHealth) { if (validTargetPresent(targetBoss) && Minecraft.getMinecraft().thePlayer != null) { renderBossHealthBar(targetBoss, targetBoss.getDefaultEntityName() + " Health"); } } }
@SubscribeEvent public void onRenderTick(RenderTickEvent event) { if(event.phase == Phase.END) { Minecraft mc = Minecraft.getMinecraft(); if(mc.currentScreen instanceof net.minecraft.client.gui.GuiMainMenu && !(mc.currentScreen instanceof GuiMainMenu)) { mc.displayGuiScreen(new GuiMainMenu()); } if(!(mc.ingameGUI instanceof GuiInGame)) { mc.ingameGUI = new GuiInGame(mc); } if(GuiTechTreeComponent.instance == null) { GuiTechTreeComponent.instance = new GuiTechTreeComponent(); } GuiTechTreeComponent.instance.updateTechTreeWindow(); } }
@SubscribeEvent public void RenderTickEvent(RenderTickEvent event) { if ((event.type == Type.RENDER || event.type == Type.CLIENT) && event.phase == Phase.END) { Minecraft mc = Minecraft.getMinecraft(); if (!ticked && mc.ingameGUI != null) { mc.ingameGUI = new GuiAdvancedHUD(mc); ticked = true; } if (firstload && mc != null) { if (!SaveController.loadConfig("config")) { HUDRegistry.checkForResize(); HUDRegistry.resetAllDefaults(); SaveController.saveConfig("config"); } firstload = false; } // TODO Add notification on main menu when an update for advancedhud is available :) // if (mc.currentScreen instanceof GuiMainMenu) { // int mouseX = Mouse.getX() * mc.currentScreen.width / mc.displayWidth; // int mouseY = mc.currentScreen.height - Mouse.getY() * mc.currentScreen.height / mc.displayHeight - 1; // RenderAssist.drawCircle(mouseX, mouseY, 3, 24, 0xFFFFFFFF); // RenderAssist.drawRect(1, 1, 70, 11, 0x608f3eff); // mc.currentScreen.drawString(mc.fontRenderer, "AdvancedHUD!", 2, 2, 0x48dce9); // } } }
@Override public void invoke(Event event) { if (event instanceof RenderTickEvent) new sl.steeldood.bit.client.event.impl.RenderTickEvent().call(); else new ClientTickEvent().call(); }
@SubscribeEvent public void onRenderTick(RenderTickEvent event) { if (!addRenderTick.isEmpty()) { hRenderTick.addAll(addRenderTick); addRenderTick.clear(); } for (Iterator<LIHandler> it = hRenderTick.iterator(); it.hasNext(); ) { LIHandler handler = it.next(); if (handler.isDead()) it.remove(); else handler.trigger(event); } }
@SubscribeEvent public void tickEnd( RenderTickEvent event ) { if ( !event.phase.equals( TickEvent.Phase.END ) ) { return; } Minecraft mc = FMLClientHandler.instance().getClient(); if ( mc.currentScreen != null || renderObj == null || renderMethod == null ) { return; } EntityPlayer player = mc.thePlayer; ItemStack chestplate = player.getCurrentArmor( 2 ); if ( chestplate == null || chestplate.getItem() != ComponentEquipment.items.chestplate ) { return; } ArmorItem armor = ( ArmorItem ) chestplate.getItem(); if ( armor.armor.getModifierLevel( chestplate, "hoverHarness" ) <= 0 ) { return; } ItemStack harnessStack = ItemApi.getItem( "itemHoverHarness", 0 ); harnessStack.setTagCompound( chestplate.getTagCompound() ); try { renderMethod.invoke( renderObj, ( Float ) event.renderTickTime, player, System.currentTimeMillis(), harnessStack ); } catch ( Exception exception ) { exception.printStackTrace(); } }
@SubscribeEvent public void renderTick(RenderTickEvent tick) { if (tick.phase == TickEvent.Phase.END) { Minecraft mc = Minecraft.getMinecraft(); if (mc.inGameHasFocus) { boolean renderMana = false; ItemStack hand = mc.thePlayer.getCurrentEquippedItem(); IPlayerSession session; if (Rings.proxy.manaHandler.playerHasSession(mc.thePlayer)) { session = Rings.proxy.manaHandler.getPlayerSession(mc.thePlayer); if (SimpleUtil.displayHud(mc.thePlayer)) renderMana = SimpleUtil.displayHud(mc.thePlayer); if (hand != null && !renderMana) { if (hand.getItem() instanceof ItemMagicRing) { if (hand.getTagCompound() != null) { NBTTagCompound handtag = hand.getTagCompound().hasKey(ModLibs.RING_TAG) ? hand.getTagCompound().getCompoundTag(ModLibs.RING_TAG) : null; if (handtag != null && handtag.hasKey(ModLibs.SPELL_ID)) renderMana = true; } } } if (renderMana) { String mpInfo = StatCollector.translateToLocal(ModLibs.MANA) + ": " + session.getMana() + " / " + session.getMaxMana(); mc.fontRenderer.drawString(mpInfo, ModLibs.DISPLAY_X + 1, ModLibs.DISPLAY_Y + 1, 0x000000); mc.fontRenderer.drawString(mpInfo, ModLibs.DISPLAY_X, ModLibs.DISPLAY_Y, 0x00C4C4); } } } } }
@SubscribeEvent public void TickEvent(RenderTickEvent event) { if (event.phase == Phase.END) { if (validTargetPresent(targetBoss) && Minecraft.getMinecraft().thePlayer != null) { renderBossHealthBar(targetBoss, "Pharaoh Health"); } } }
@SubscribeEvent public void onRenderStart(RenderTickEvent event) { if(event.phase == Phase.START) { float ctime = (float) Math.floor(time) + event.renderTickTime; delta = (ctime - time) * 50; time = ctime; EmoteHandler.clearPlayerList(); } }
@SideOnly(Side.CLIENT) @SubscribeEvent public void tick(RenderTickEvent event) { Minecraft mc = Minecraft.getMinecraft(); if(event.phase == Phase.END && mc.thePlayer != null && mc.inGameHasFocus) { boolean hasBattery = false; int maxpower = 0; int power = 0; RandomItemBattery heighest = null; for (int i = 0; i < mc.thePlayer.inventory.mainInventory.length; i++) { RandomItem item = RandomItem.getRandomItem(mc.thePlayer.inventory.mainInventory[i]); if(item instanceof RandomItemBattery) { maxpower += ((RandomItemBattery) item).maxDamage; if(heighest == null || ((RandomItemBattery) item).maxDamage > heighest.maxDamage) heighest = (RandomItemBattery) item; power += ((RandomItemBattery) item).getPower(mc.thePlayer.inventory.mainInventory[i]); hasBattery = true; } } if(hasBattery) { //RenderHelper2D.renderIcon(Blocks.iron_block.getBlockTextureFromSide(0), 3, 3, 1, true, 0, 100, 20); GL11.glDisable(GL11.GL_LIGHTING); mc.fontRenderer.drawString(power + "/" + maxpower + " RA", 23, 10, 16777215); RenderHelper2D.renderItem(heighest.getItemStack(), 5, 5); } } }
@SubscribeEvent public void onRenderEvent(RenderTickEvent event) { if (event.phase == TickEvent.Phase.START) { EntityPlayer entityplayer = mc.thePlayer; World world = mc.theWorld; if (entityplayer != null && world != null) { this.onRenderTick(entityplayer, world); } } }
@SubscribeEvent public void onSensorRenderTick(RenderTickEvent event) { EntityPlayer entityplayer = mc.thePlayer; World world = mc.theWorld; GuiScreen guiScreen = this.mc.currentScreen; if (guiScreen == null) onRenderTick(entityplayer); }
@Override public void nullify() { unregister(this, FMLCommonHandler.instance().bus(), RenderTickEvent.class); unregister(this, FMLCommonHandler.instance().bus(), TickEvent.ClientTickEvent.class); }
public TickEventDispatcher() { register(this, FMLCommonHandler.instance().bus(), RenderTickEvent.class); register(this, FMLCommonHandler.instance().bus(), TickEvent.ClientTickEvent.class); }
@SubscribeEvent public void onFrame(RenderTickEvent e) { if (e.phase == Phase.START) { core.frame(); } }
@SubscribeEvent public void onRenderTick(RenderTickEvent event) { if(event.phase == Phase.END) { if(mc.thePlayer != null) { if(!mc.isGamePaused()) { if(mc.inGameHasFocus && mc.thePlayer.openContainer == mc.thePlayer.inventoryContainer && GameSettings.isKeyDown(inventory)) GuiHandler.openGui(HandCraft.guiID, new NBTTagCompound()); if(chains.size() > 0) { double timeLeft = (System.currentTimeMillis() - lastTick); progress += timeLeft/10; int rendered = 0; int chainIndex = 0; int entryIndex = 0; for (int i = 0; rendered < 20; i++) { if(chains.size() > chainIndex) { if(chains.get(chainIndex).size() > entryIndex) { ScaledResolution resolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight); renderRecipe(5+rendered*20, resolution.getScaledHeight()-44, chains.get(chainIndex).getRecipe(entryIndex), i == 0 ? progress : 0, chains.get(chainIndex).isResult(chains.get(chainIndex).getRecipe(entryIndex))); rendered++; entryIndex++; }else{ chainIndex++; entryIndex = 0; } }else break; } if(progress >= chains.get(0).getCurrentRecipe().time) { chains.get(0).processRecipe(); progress = 0; } } lastTick = System.currentTimeMillis(); } }else if(chains.size() > 0) chains.clear(); } }
@SubscribeEvent public void onRenderTick(RenderTickEvent evt) { if (evt.phase == Phase.END && (Config.enableFuelHUD || Config.enableStateHUD)) { tickEnd(); } }
@SubscribeEvent public void onRenderTick(RenderTickEvent event) { if(Minecraft.getMinecraft().theWorld != null && articlePopup != null) { articlePopup.update(); } }
@SubscribeEvent public void onRenderTick(RenderTickEvent evt) { tickEnd(); }
@SubscribeEvent public void renderTick(RenderTickEvent event) { this.advanceAnimatorInstances(event); }