本文整理汇总了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));
}
}
}
示例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);
}
}
示例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);
}
}
示例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--;
}
示例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;
}
}
}
示例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);
}
}
示例7: onRenderGUI
@SubscribeEvent
public void onRenderGUI(RenderGameOverlayEvent.Pre event) {
if (event.getType() == ElementType.TEXT)
event.setCanceled(true);
}