Search in sources :

Example 1 with INeedTickUpdate

use of pneumaticCraft.client.gui.INeedTickUpdate in project PneumaticCraft by MineMaarten.

the class ClientTickHandler method tickEnd.

@SubscribeEvent
public void tickEnd(TickEvent.ClientTickEvent event) {
    if (event.phase == TickEvent.Phase.END) {
        if (Minecraft.getMinecraft().thePlayer == null) {
            for (IUpgradeRenderHandler handler : UpgradeRenderHandlerList.instance().upgradeRenderers) {
                handler.reset();
            }
        }
        TICKS++;
        ModuleRegulatorTube.hasTicked = false;
        ModuleRegulatorTube.inverted = false;
        ModuleRegulatorTube.inLine = true;
        for (int i = 0; i < updatedObjects.size(); i++) {
            INeedTickUpdate updatedObject = updatedObjects.get(i).get();
            if (updatedObject != null) {
                updatedObject.update();
            } else {
                updatedObjects.remove(i);
                i--;
            }
        }
    }
}
Also used : IUpgradeRenderHandler(pneumaticCraft.api.client.pneumaticHelmet.IUpgradeRenderHandler) INeedTickUpdate(pneumaticCraft.client.gui.INeedTickUpdate) SubscribeEvent(cpw.mods.fml.common.eventhandler.SubscribeEvent)

Aggregations

SubscribeEvent (cpw.mods.fml.common.eventhandler.SubscribeEvent)1 IUpgradeRenderHandler (pneumaticCraft.api.client.pneumaticHelmet.IUpgradeRenderHandler)1 INeedTickUpdate (pneumaticCraft.client.gui.INeedTickUpdate)1