本文整理汇总了Java中net.minecraftforge.client.event.RenderGameOverlayEvent.Chat方法的典型用法代码示例。如果您正苦于以下问题:Java RenderGameOverlayEvent.Chat方法的具体用法?Java RenderGameOverlayEvent.Chat怎么用?Java RenderGameOverlayEvent.Chat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.client.event.RenderGameOverlayEvent
的用法示例。
在下文中一共展示了RenderGameOverlayEvent.Chat方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renderChat
import net.minecraftforge.client.event.RenderGameOverlayEvent; //导入方法依赖的package包/类
protected void renderChat(int width, int height)
{
mc.mcProfiler.startSection("chat");
RenderGameOverlayEvent.Chat event = new RenderGameOverlayEvent.Chat(eventParent, 0, height - 48);
if (MinecraftForge.EVENT_BUS.post(event)) return;
GlStateManager.pushMatrix();
GlStateManager.translate((float) event.getPosX(), (float) event.getPosY(), 0.0F);
persistantChatGUI.drawChat(updateCounter);
GlStateManager.popMatrix();
post(CHAT);
mc.mcProfiler.endSection();
}
示例2: renderChat
import net.minecraftforge.client.event.RenderGameOverlayEvent; //导入方法依赖的package包/类
protected void renderChat(int width, int height)
{
field_73839_d.field_71424_I.func_76320_a("chat");
RenderGameOverlayEvent.Chat event = new RenderGameOverlayEvent.Chat(eventParent, 0, height - 48);
if (MinecraftForge.EVENT_BUS.post(event)) return;
GL11.glPushMatrix();
GL11.glTranslatef((float)event.posX, (float)event.posY, 0.0F);
field_73840_e.func_146230_a(field_73837_f);
GL11.glPopMatrix();
post(CHAT);
field_73839_d.field_71424_I.func_76319_b();
}
示例3: renderChat
import net.minecraftforge.client.event.RenderGameOverlayEvent; //导入方法依赖的package包/类
protected void renderChat(int width, int height)
{
mc.mcProfiler.startSection("chat");
RenderGameOverlayEvent.Chat event = new RenderGameOverlayEvent.Chat(eventParent, 0, height - 48);
if (MinecraftForge.EVENT_BUS.post(event)) return;
GL11.glPushMatrix();
GL11.glTranslatef((float)event.posX, (float)event.posY, 0.0F);
persistantChatGUI.drawChat(updateCounter);
GL11.glPopMatrix();
post(CHAT);
mc.mcProfiler.endSection();
}
示例4: onRenderGameOverlay
import net.minecraftforge.client.event.RenderGameOverlayEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onRenderGameOverlay(RenderGameOverlayEvent.Chat event) {
Minecraft mc = Minecraft.getMinecraft();
if (mc.player != null && isKnockedOut && mc.currentScreen != null) {
prevChatHeight = mc.gameSettings.chatHeightFocused;
mc.gameSettings.chatHeightFocused = 0.1f;
}
}
示例5: chatEvent
import net.minecraftforge.client.event.RenderGameOverlayEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void chatEvent(RenderGameOverlayEvent.Chat event)
{
if(gui != null && !Minecraft.getMinecraft().player.isCreative())
{
event.setPosY(event.getPosY() - 10);
}
}