當前位置: 首頁>>代碼示例>>Java>>正文


Java ElementType.TEXT屬性代碼示例

本文整理匯總了Java中net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.TEXT屬性的典型用法代碼示例。如果您正苦於以下問題:Java ElementType.TEXT屬性的具體用法?Java ElementType.TEXT怎麽用?Java ElementType.TEXT使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType的用法示例。


在下文中一共展示了ElementType.TEXT屬性的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: onRenderGui

@SubscribeEvent
public void onRenderGui(RenderGameOverlayEvent event)
{
	if (event.isCancelable() || event.getType() != ElementType.TEXT)
	{
		return;
	}

	PlayerAether player = PlayerAether.get(this.mc.thePlayer);

	if (player.poisonInstance() != null)
	{
		AetherOverlay.renderCure(this.mc);
		AetherOverlay.renderPoison(this.mc);
	}

	if (player.thePlayer != null)
	{
		AetherOverlay.renderIronBubble(this.mc);
		AetherOverlay.renderCooldown(this.mc);
		AetherOverlay.renderJumps(this.mc);
		AetherOverlay.renderBossHP(this.mc);
	}

       float portalTime =  player.portalAnimTime * 1.2F + (player.prevPortalAnimTime -  player.portalAnimTime);

       if(portalTime > 0.0F)
       {
           if (portalTime > 0.0F)
           {
           	AetherOverlay.renderAetherPortal(portalTime, new ScaledResolution(this.mc));
           }
       }
       
}
 
開發者ID:Modding-Legacy,項目名稱:Aether-Legacy,代碼行數:35,代碼來源:GuiAetherInGame.java

示例2: doRender

@Override
public void doRender(@Nonnull final RenderGameOverlayEvent.Pre event) {
	if (event.getType() == ElementType.TEXT && this.textPanel.hasText()) {
		final int centerX = event.getResolution().getScaledWidth() / 2;
		final int centerY = 80;
		this.textPanel.render(centerX, centerY, Reference.TOP_CENTER);
	}
}
 
開發者ID:OreCruncher,項目名稱:DynamicSurroundings,代碼行數:8,代碼來源:BlockInfoHelperHUD.java

示例3: renderOverlay

@SubscribeEvent
public void renderOverlay(RenderGameOverlayEvent.Post event) {
	if (event.getType() == ElementType.TEXT && showTextureMap) {
		GlStateManager.color(1, 1, 1);
		mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
		Render.drawTexturedRect(textMapX, textMapY, textMapW, textMapH);
		ScaledResolution res = event.getResolution();
		drawString(TOOLTIP, res, 0xFFFFFF);
	}
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:10,代碼來源:EventHandlerClient.java

示例4: onRenderOverlay

@SubscribeEvent(priority = EventPriority.NORMAL)
public void onRenderOverlay(RenderGameOverlayEvent.Pre event) {
	if (event.getType() == ElementType.HELMET && Minecraft.getMinecraft().currentScreen instanceof GuiCamera) {
		event.setCanceled(true);
	} else if (event.getType() == ElementType.TEXT && profile) {
		displayDebugInfo();
	}
	if (i > 0)
		i--;
}
 
開發者ID:tom5454,項目名稱:Toms-Mod,代碼行數:10,代碼來源:EventHandlerClient.java

示例5: onRenderOverlay

@SubscribeEvent
    public void onRenderOverlay(RenderGameOverlayEvent event) {
        if (!enabled || event.isCancelable() || event.getType() != ElementType.TEXT) {
            return;
        }

        getClientDragon();
        getServerDragon();

        if (dragonClient != null) {
            GuiIngameForge ingameGUI = (GuiIngameForge) mc.ingameGUI;
            res = ingameGUI.getResolution();

            renderTitle();

            try {
                if (Keyboard.isKeyDown(Keyboard.KEY_LCONTROL)) {
                    renderNavigation();
                    renderAttributes();
                    renderBreedPoints();
                } else {
                    renderEntityInfo();
                    renderAITasks();
//                    renderWatchedObjects();
                }

                renderProbe();
            } catch (Exception ex) {
                renderException(ex);
            }

            if (dragonClient.isDead) {
                dragonClient = null;
                dragonServer = null;
            }
        }

    }
 
開發者ID:ata4,項目名稱:dragon-mounts,代碼行數:38,代碼來源:GuiDragonDebug.java

示例6: renderGameOverlayEvent

@SideOnly(Side.CLIENT)
@ForgeSubscribe
public void renderGameOverlayEvent(RenderGameOverlayEvent event)
{
	if(event.type == ElementType.TEXT && RenderManager.instance.getFontRenderer() != null && MigocraftCorePlugin.inDev)
	{
		EntityPlayer player = Minecraft.getMinecraft().thePlayer;
		Vec3 vec3 = player.gravitySource;
		double[] ds = MathUtil.transformVectorToAngle(vec3);
		RenderManager.instance.getFontRenderer().drawStringWithShadow("yaw:"+ds[0], 50, 24, 0xFFFFFF);
		RenderManager.instance.getFontRenderer().drawStringWithShadow("pitch:"+ds[1], 50, 32, 0xFFFFFF);
		RenderManager.instance.getFontRenderer().drawStringWithShadow("roll:"+ds[2], 50, 40, 0xFFFFFF);
	}
}
 
開發者ID:szszss,項目名稱:MigoCraft,代碼行數:14,代碼來源:MigocraftDebuger.java

示例7: onRenderGUI

@SubscribeEvent
public void onRenderGUI(RenderGameOverlayEvent.Pre event) {
	if (event.getType() == ElementType.TEXT)
		event.setCanceled(true);
}
 
開發者ID:GummyBlasian,項目名稱:Inventory-Power,代碼行數:5,代碼來源:RenderGUIHandler.java


注:本文中的net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.TEXT屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。