Search in sources :

Example 1 with INeedTickUpdate

use of me.desht.pneumaticcraft.client.gui.INeedTickUpdate in project pnc-repressurized by TeamPneumatic.

the class ClientTickHandler method tickEnd.

@SubscribeEvent
public void tickEnd(TickEvent.ClientTickEvent event) {
    if (event.phase == TickEvent.Phase.END) {
        if (Minecraft.getMinecraft().player == 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(me.desht.pneumaticcraft.api.client.pneumaticHelmet.IUpgradeRenderHandler) INeedTickUpdate(me.desht.pneumaticcraft.client.gui.INeedTickUpdate) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

IUpgradeRenderHandler (me.desht.pneumaticcraft.api.client.pneumaticHelmet.IUpgradeRenderHandler)1 INeedTickUpdate (me.desht.pneumaticcraft.client.gui.INeedTickUpdate)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1