当前位置: 首页>>代码示例>>Java>>正文


Java ClientTickEvent类代码示例

本文整理汇总了Java中cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent的典型用法代码示例。如果您正苦于以下问题:Java ClientTickEvent类的具体用法?Java ClientTickEvent怎么用?Java ClientTickEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ClientTickEvent类属于cpw.mods.fml.common.gameevent.TickEvent包,在下文中一共展示了ClientTickEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
            }
        }
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:25,代码来源:MarsModuleClient.java

示例2: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
            }
        }
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:24,代码来源:AsteroidsEventHandlerClient.java

示例3: onTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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);
        }
    }

}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:17,代码来源:KeyHandler.java

示例4: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
    }
}
 
开发者ID:LambdaInnovation,项目名称:LambdaLib,代码行数:20,代码来源:ParticleFactoryBase.java

示例5: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:19,代码来源:ClientProxyEuropa.java

示例6: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:20,代码来源:ClientProxyMercury.java

示例7: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:20,代码来源:ClientProxyPluto.java

示例8: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:19,代码来源:ClientProxyCallisto.java

示例9: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:20,代码来源:ClientProxyIo.java

示例10: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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());
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-1.7,代码行数:20,代码来源:ClientProxyElipse.java

示例11: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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);
						}
					}
				}
			}
		}
	}
}
 
开发者ID:ElConquistador,项目名称:ElConQore,代码行数:21,代码来源:EQTickHandlerClient.java

示例12: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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;
				}
			}
		}
	}
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:36,代码来源:TickHandlerClient.java

示例13: onTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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();
	}
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:16,代码来源:CoreHandler.java

示例14: onTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@SubscribeEvent
public void onTick(ClientTickEvent event) {
    if(!mapInit) {
    	GTVeinLocator.gtModHelper.initClientVeinNameHelper();
        mapInit = true;
    }
}
 
开发者ID:GWYOG,项目名称:GTVeinLocator,代码行数:8,代码来源:ClientVeinNameHelper.java

示例15: onClientTick

import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; //导入依赖的package包/类
@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;
}
 
开发者ID:LambdaInnovation,项目名称:LambdaLib,代码行数:12,代码来源:ControlOverrider.java


注:本文中的cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。