本文整理匯總了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);
}
}