当前位置: 首页>>代码示例>>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;未经允许,请勿转载。