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


Java ElementType.CHAT属性代码示例

本文整理汇总了Java中net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.CHAT属性的典型用法代码示例。如果您正苦于以下问题:Java ElementType.CHAT属性的具体用法?Java ElementType.CHAT怎么用?Java ElementType.CHAT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType的用法示例。


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

示例1: onDraw

@CoreEvent
public void onDraw(final @Nonnull RenderGameOverlayEvent.Post event) {
	if (event.resolution==null)
		return;
	if (event.type==ElementType.CHAT&&Client.mc.currentScreen==null)
		if (!isDelegated()) {
			setWidth(event.resolution.getScaledWidth());
			setHeight(event.resolution.getScaledHeight());
			drawScreen(event.mouseX, event.mouseY, event.partialTicks);
		}
}
 
开发者ID:Team-Fruit,项目名称:SignPicture,代码行数:11,代码来源:OverlayFrame.java

示例2: displayEntityStatus

@SubscribeEvent
public void displayEntityStatus(RenderGameOverlayEvent.Pre event) {
	if (event.getType() != ElementType.CHAT) {
		return;
	}
	ToroHealthMod.proxy.setEntityInCrosshairs();
}
 
开发者ID:ToroCraft,项目名称:ToroHealth,代码行数:7,代码来源:Events.java

示例3: drawHealthBar

@SubscribeEvent
public void drawHealthBar(RenderGameOverlayEvent.Pre event) {
	if (!showHealthBar || event.getType() != ElementType.CHAT) {
		return;
	}
	updateGuiAge();
	updatePositions();
	drawSkin();
	draw();
}
 
开发者ID:ToroCraft,项目名称:ToroHealth,代码行数:10,代码来源:GuiEntityStatus.java

示例4: onDraw

@SubscribeEvent
public void onDraw(final RenderGameOverlayEvent.Post event) {
	if (event.type==ElementType.CHAT&&FMLClientHandler.instance().getClient().currentScreen==null)
		if (!isDelegated()) {
			setWidth(event.resolution.getScaledWidth());
			setHeight(event.resolution.getScaledHeight());
			drawScreen(event.mouseX, event.mouseY, event.partialTicks);
		}
}
 
开发者ID:Team-Fruit,项目名称:EEWReciever,代码行数:9,代码来源:OverlayFrame.java

示例5: overlayRender

@SubscribeEvent(priority = EventPriority.LOWEST)
   public void overlayRender(RenderGameOverlayEvent.Pre event) {
	
	EntityPlayer player = Minecraft.getMinecraft().thePlayer;
	
	ItemStack stack = player.inventory.getCurrentItem();
	
	HUDRenderer hud = new HUDRenderer();
	
	if (Minecraft.getMinecraft().gameSettings.thirdPersonView == 0) {
		
		if (!FWConfig.disableScopeHUD) {
			
			if (stack != null && stack.getItem() == InitItems.fusion_sniper_rifle) {
				
				GunData data = new GunData(stack);
				
				if (data.scope > 0) hud.renderTexture("scope_hud.png", 0, 0, 0, 0, 100, hud.width, hud.height * 2, hud.width, hud.height);
			}			
		}
	
		if (!FWConfig.disableScubaHUD && event.type == ElementType.CHAT) {
		
			for (ItemStack armor : player.inventory.armorInventory) {
		
				if (armor != null && armor.getItem() == InitItems.scuba_helmet) {
			
					hud.renderTexture("scuba_hud.png", 0, 0, 0, 0, -100, hud.width, hud.height * 2, hud.width, hud.height);
					
					int water = 0;
					
					if (player.isInsideOfMaterial(Material.water)) {
						
						if (timer.isDoneAndReset()) if (growWidth > 0) growWidth--;
										
						for (int i = 1; i <= 60; i++) {
							
							if (player.worldObj.getBlock((int)(player.posX - 1F), (int)player.posY + i, (int)(player.posZ - 1F)).getMaterial() == Material.water) {								
								water++;
							}
							
							else break;
						}
					}	
											
					else {
						if (timer.isDoneAndReset()) if (growWidth < 30) growWidth++;							
					}	
					
					hud.renderTexture("scuba_hud.png", 0 - growWidth, (hud.height / 2) - (85 / 2), 0, 128, 0, 256, 256, 31, 85);
					hud.renderTexture("scuba_hud.png", 2 - growWidth, ((hud.height / 2) - 21) + water, 0, 128, 0, 256, 256, 7, 1);
				}		
			}
		}	
	}	
}
 
开发者ID:TeamMonumental,项目名称:FusionWarfare,代码行数:56,代码来源:HUDEvent.java


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