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