Java 类cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent 实例源码

项目:4Space-5    文件:MarsModuleClient.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event)
{
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null)
    {
        if (world.provider instanceof WorldProviderMars)
        {
            if (world.provider.getSkyRenderer() == null)
            {
                world.provider.setSkyRenderer(new SkyProviderMars((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null)
            {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-5    文件:AsteroidsEventHandlerClient.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event)
{
    Minecraft minecraft = Minecraft.getMinecraft();
    WorldClient world = minecraft.theWorld;

    if (world != null)
    {
        if (world.provider instanceof WorldProviderAsteroids)
        {
            if (world.provider.getSkyRenderer() == null)
            {
                world.provider.setSkyRenderer(new SkyProviderAsteroids((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null)
            {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-5    文件:KeyHandler.java   
@SubscribeEvent
public void onTick(ClientTickEvent event)
{
    if (event.side == Side.CLIENT)
    {
        if (event.phase == Phase.START)
        {
            this.keyTick(event.type, false);
        }
        else if (event.phase == Phase.END)
        {
            this.keyTick(event.type, true);
        }
    }

}
项目:LambdaLib    文件:ParticleFactoryBase.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if (event.phase == Phase.END && ++ticker == UPDATE_RATE) {
        ticker = 0;

        Iterator<Particle> iter = alive.iterator();
        while (iter.hasNext()) {
            Particle p = iter.next();
            if (p.isDead) {
                iter.remove();
                if (dead.size() < MAX_POOL_SIZE) {
                    dead.add(p);
                }
            }
        }
        // System.out.println("GC: " + alive.size() + " / " +
        // dead.size());
    }
}
项目:4Space-1.7    文件:ClientProxyEuropa.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null) {
        if (world.provider instanceof WorldProviderEuropa) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderEuropa((IGalacticraftWorldProvider) world.provider));
            }
            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-1.7    文件:ClientProxyMercury.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null) {
        if (world.provider instanceof WorldProviderMercury) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderMercury((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-1.7    文件:ClientProxyPluto.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null) {
        if (world.provider instanceof WorldProviderPluto) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderPluto((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-1.7    文件:ClientProxyCallisto.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null) {
        if (world.provider instanceof WorldProviderCallisto) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderCallisto((IGalacticraftWorldProvider) world.provider));
            }
            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-1.7    文件:ClientProxyIo.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null) {
        if (world.provider instanceof WorldProviderIo) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderIo((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-1.7    文件:ClientProxyElipse.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();

    final WorldClient world = minecraft.theWorld;

    if (world != null) {
        if (world.provider instanceof WorldProviderElipse) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderElipse((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:ElConQore    文件:EQTickHandlerClient.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if(event.phase == Phase.END) {
        for(EQMod mod : EQMod.mods.values()) {
            if(mod.config.displayVersionResult && !mod.versionMessage && mod.versionResult == EQVersion.OUTDATED) {
                if(FMLClientHandler.instance().getClient().currentScreen == null) {
                    if(mod.versionResult != EQVersion.UNINITIALIZED || mod.versionResult != EQVersion.FINAL_ERROR) {
                        mod.versionMessage = true;
                        if(mod.versionResult == EQVersion.OUTDATED) {
                            ChatComponentText chatComponent = new ChatComponentText(EQVersion.getResultMessageForClient(mod));
                            chatComponent.getChatStyle().setChatHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new ChatComponentText(LanguageManager.getLocalization("elconqore.version.chat_hover"))));
                            chatComponent.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, mod.remoteUpdateLocation));
                            Minecraft.getMinecraft().thePlayer.addChatMessage(chatComponent);
                        }
                    }
                }
            }
        }
    }
}
项目:4Space-5    文件:TickHandlerClient.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    Minecraft minecraft = FMLClientHandler.instance().getClient();
    WorldClient world = minecraft.theWorld;
    EntityClientPlayerMP player = minecraft.thePlayer;

    // Starts a version check.
    if (event.phase == Phase.START) {
        if (world != null && TickHandlerClient.checkedVersion) {
            SpaceVersionCheck.startCheck();
            TickHandlerClient.checkedVersion = false;
        }
    }

    // Sets up the atmosphere for the world.
    if (world != null) {
        for (ICoreModule module : SpaceCore.modulesList) {
            if (module instanceof ICoreCelestial) {
                ICoreCelestial celestial = (ICoreCelestial) module;

                if (celestial.instanceOfProvider(world.provider)) {
                    if (world.provider.getSkyRenderer() == null) {
                        world.provider.setSkyRenderer(celestial.createSkyProvider((IGalacticraftWorldProvider) world.provider));
                    }

                    if (world.provider.getCloudRenderer() == null) {
                        world.provider.setCloudRenderer(new CloudRenderer());
                    }   

                    break;
                }
            }
        }
    }
}
项目:SignPicture    文件:CoreHandler.java   
@SubscribeEvent
public void onTick(final @Nonnull ClientTickEvent event) {
    if (event.phase==Phase.END) {
        Client.startSection("signpic_load");
        debugKey();
        // this.keyHandler.onTick();
        this.signEntryManager.onTick();
        this.signHandler.onTick();
        this.contentManager.onTick();
        this.overlayHandler.onTick(event);
        this.informationHandler.onTick(event);
        EntrySlot.Tick();
        Client.endSection();
    }
}
项目:GTVeinLocator    文件:ClientVeinNameHelper.java   
@SubscribeEvent
public void onTick(ClientTickEvent event) {
    if(!mapInit) {
        GTVeinLocator.gtModHelper.initClientVeinNameHelper();
        mapInit = true;
    }
}
项目:LambdaLib    文件:ControlOverrider.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent cte) {
    GuiScreen cgs = Minecraft.getMinecraft().currentScreen;
    if(lastTickGui == null && cgs != null) {
        releaseLocks();
    }
    if(lastTickGui != null && cgs == null) {
        restoreLocks();
    }
    lastTickGui = cgs;
}
项目:LambdaLib    文件:LIFMLGameEventDispatcher.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if (!addClientTick.isEmpty()) {
        hClientTick.addAll(addClientTick);
        addClientTick.clear();
    }
    for (Iterator<LIHandler> it = hClientTick.iterator(); it.hasNext(); ) {
        LIHandler handler = it.next();
        if (handler.isDead())
            it.remove();
        else
            handler.trigger(event);
    }
}
项目:GameAnalyticsAPI    文件:ActivityReportTickEventHandler.java   
@SuppressWarnings("static-method")
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void clientTick(ClientTickEvent event) {
    if (event.phase == Phase.START) {
        sendAnalyticsActivityEvent();
    }
}
项目:EnderCore    文件:Scheduler.java   
/**
 * For internal use only. Do not call.
 */
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
  if (event.phase == Phase.END) {
    runTasks(clientQueue);
    if (!serverQueue.isEmpty() && !Minecraft.getMinecraft().isIntegratedServerRunning()) {
      serverQueue.clear();
    }
  }
}
项目:vsminecraft    文件:ClientTickHandler.java   
@SubscribeEvent
public void onTick(ClientTickEvent event)
{
    if(event.phase == Phase.START)
    {
        tickStart();
    }
}
项目:GimmeTime    文件:AlarmHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if (event.phase == Phase.END
            && Minecraft.getMinecraft().thePlayer != null
            && !TimeUtil.isMin(minLastChecked)) {
        checkAlarms();
        minLastChecked = TimeUtil.getMin();
    }
}
项目:Framez    文件:MovementScheduler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {

    if (Framez.proxy.isGamePaused())
        return;

    tick(Framez.proxy.getWorld(), event.phase);
}
项目:MyMod    文件:AlarmHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if (event.phase == Phase.END
            && Minecraft.getMinecraft().thePlayer != null
            && !TimeUtil.isMin(minLastChecked)) {
        checkAlarms();
        minLastChecked = TimeUtil.getMin();
    }
}
项目:4Space-1.7    文件:ClientProxyVenus.java   
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();
    final WorldClient world = minecraft.theWorld;
    final EntityClientPlayerMP player = minecraft.thePlayer;

    // TODO: Make work!
    if (Side.CLIENT != null) {
        if (player != null && world != null && player.inventory.armorItemInSlot(2) != null && player.inventory.armorItemInSlot(2).getItem() == VenusItems.jetpack && FMLClientHandler.instance().getClient().gameSettings.keyBindJump.isPressed() && player.posY < 360) {
            ((ItemJetpack) player.inventory.armorItemInSlot(2).getItem()).setActive();
            player.motionY -= 0.05D;
            player.motionY += 0.07 + player.rotationPitch * 2 / 150 * 0.750;
            player.fallDistance = 0.0F;
            world.spawnParticle("largesmoke", player.posX, player.posY - 1D, player.posZ, 0, -0.5, 0);
        }
    }

    if (world != null) {
        if (world.provider instanceof WorldProviderVenus) {
            if (world.provider.getSkyRenderer() == null) {
                world.provider.setSkyRenderer(new SkyProviderVenus((IGalacticraftWorldProvider) world.provider));
            }

            if (world.provider.getCloudRenderer() == null) {
                world.provider.setCloudRenderer(new CloudRenderer());
            }
        }
    }
}
项目:4Space-1.7    文件:TickHandlerClient.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    final Minecraft minecraft = FMLClientHandler.instance().getClient();
    final WorldClient world = minecraft.theWorld;
    final EntityClientPlayerMP player = minecraft.thePlayer;

    if (event.phase == Phase.START) {
        if (world != null && TickHandlerClient.checkedVersion) {
            ThreadVersionCheck.startCheck();
            TickHandlerClient.checkedVersion = false;
        }
    }
}
项目:E-Mobile    文件:ClientConfigTickHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent evt) {
    if (evt.phase == Phase.END) {
        if (mc.currentScreen instanceof GuiMainMenu && configNeedsReset) {
            configNeedsReset = false;
            EMConfig.onConfigChanged("emobile");
        } else if (mc.inGameHasFocus) {
            configNeedsReset = true;
        }
    }
}
项目:Farrago    文件:ClientProxy.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent e) {
    Minecraft mc = Minecraft.getMinecraft();
    if (e.phase == Phase.START) {
        if (FarragoMod.scoped) {
            if (mc.thePlayer == null) {
                FarragoMod.scoped = false;
                return;
            }
            if (mc.thePlayer.getHeldItem() == null) {
                FarragoMod.scoped = false;
                return;
            }
            if (mc.thePlayer.getHeldItem().getItem() != FarragoMod.RIFLE) {
                FarragoMod.scoped = false;
                return;
            }
        }
        FarragoMod.scopeTicks++;
        if (mc.thePlayer != null) {
            if (mc.thePlayer.inventory.armorInventory[1] != null) {
                ItemStack legs = mc.thePlayer.inventory.armorInventory[1];
                if (legs.getItem() == FarragoMod.UTILITY_BELT) {
                    UtilityBeltRenderer.tick(mc, legs);
                    if (nextHotbar.isPressed()) {
                        FarragoMod.CHANNEL.sendToServer(new ChangeSelectedHotbarMessage(true));
                        UtilityBeltRenderer.direction = true;
                    } else if (prevHotbar.isPressed()) {
                        FarragoMod.CHANNEL.sendToServer(new ChangeSelectedHotbarMessage(false));
                        UtilityBeltRenderer.direction = false;
                    } else if (renameHotbar.isPressed()) {
                        new PaneRenameHotbar(FarragoMod.UTILITY_BELT.getCurrentRow(legs), legs).show();
                    } else if (lockSlot.isPressed()) {
                        FarragoMod.CHANNEL.sendToServer(new LockSlotMessage(mc.thePlayer.inventory.currentItem));
                    }
                }
            }
        }
    }
}
项目:Dimensional-Pockets    文件:ClientEventHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if (event.phase == Phase.END) {
        GuiScreen gui = Minecraft.getMinecraft().currentScreen;
        if (gui == null || !gui.doesGuiPauseGame()) {
            gameTicks++;
        }
    }
}
项目:SimplyJetpacks    文件:ClientTickHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent evt) {
    if (evt.phase == Phase.START) {
        tickStart();
    } else {
        tickEnd();
    }
}
项目:ShadowsOfPhysis    文件:ClientTickHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if(event.phase == Phase.END) {
        GuiScreen gui = Minecraft.getMinecraft().currentScreen;
        if (gui == null || !gui.doesGuiPauseGame()) {
            gameTicks++;
        }

        ServerData.tick(true);

        RenderSocketed.tryInjectRenderer();
    }   
}
项目:TheMinersFriend    文件:MotionSensorTickHandler.java   
@SubscribeEvent
public void onSensorClientTick(ClientTickEvent event) {
    EntityPlayer entityplayer = mc.thePlayer;
    World world = mc.theWorld;

    if (this.shouldTick(entityplayer,
                        world)) {
        GuiScreen guiScreen = this.mc.currentScreen;
        if (guiScreen == null) onTickInGame(entityplayer,
                                            world);
    }
}
项目:AgeCraft-Old    文件:ACTickHandlerClient.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
    if(event.phase == Phase.END) {
        Minecraft mc = Minecraft.getMinecraft();
        if(((BlockLeaves) Trees.leaves).fancyGraphics != mc.gameSettings.fancyGraphics) {
            ((BlockLeaves) Trees.leaves).fancyGraphics = mc.gameSettings.fancyGraphics;
        }
    }
}
项目:OpenPeripheral-Addons    文件:TerminalManagerClient.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent evt) {
    if (evt.phase == Phase.END) {
        final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
        terminalGuid = player != null? TerminalIdAccess.instance.getIdFrom(player) : Optional.<Long> absent();
    }
}
项目:MinecraftScripting    文件:ClientTickHandler.java   
@SubscribeEvent
public void tick(ClientTickEvent event) {
    if (event.phase == Phase.START && Minecraft.getMinecraft().thePlayer != null && Minecraft.getMinecraft().theWorld != null) {
        clientCore.tick();

        if (++counter == SELECTION_UPDATE) {
            ScriptingMod.proxy.update();
            counter = 0;
        }
    }
}
项目:Soul-Forest    文件:SoulForestKeyHandler.java   
/**
    * KeyInputEvent is in the FML package, so we must register to the FML event bus
    */
   @SubscribeEvent
   public void onKeyInput(ClientTickEvent event) {
if(Keyboard.getEventKey() == keys[CUSTOM_INV].getKeyCode()){
    if(Keyboard.getEventKeyState()){
        this.isKeyPressed = true;
    }
    else{
    this.isKeyPressed = false;  
    }
}
   }
项目:ServerObserver    文件:CoreHandler.java   
@SubscribeEvent
public void tickclient(final @Nonnull ClientTickEvent e) {
    this.guiHandler.tickclient();
}
项目:SignPicture    文件:Informations.java   
@CoreEvent
public void onTick(final @Nonnull ClientTickEvent event) {
    if (event.phase==Phase.END)
        onTick(getSource(), getState());
}
项目:SignPicture    文件:OverlayFrame.java   
@CoreEvent
public void onTick(final @Nonnull ClientTickEvent event) {
    updateScreen();
}
项目:EEWReciever    文件:OverlayFrame.java   
@SubscribeEvent
public void onTick(final ClientTickEvent event) {
    updateScreen();
}
项目:LambdaLib    文件:KeyManager.java   
@SubscribeEvent
public void onEvent(ClientTickEvent event) {
    if(event.phase == Phase.START && activated) {
        tick();
    }
}
项目:EnderCore    文件:ClientHandler.java   
@SubscribeEvent
public void onClientTick(ClientTickEvent event) {
  if (event.phase == Phase.END) {
    ticksElapsed++;
  }
}