本文整理汇总了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);
}
}
示例2: displayEntityStatus
@SubscribeEvent
public void displayEntityStatus(RenderGameOverlayEvent.Pre event) {
if (event.getType() != ElementType.CHAT) {
return;
}
ToroHealthMod.proxy.setEntityInCrosshairs();
}
示例3: drawHealthBar
@SubscribeEvent
public void drawHealthBar(RenderGameOverlayEvent.Pre event) {
if (!showHealthBar || event.getType() != ElementType.CHAT) {
return;
}
updateGuiAge();
updatePositions();
drawSkin();
draw();
}
示例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);
}
}
示例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);
}
}
}
}
}