mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Fix JourneyMap waypoint label flickering when on armor tab (#247)
This commit is contained in:
1 parent
bcf7458b9a
commit
ab057744ba
9 files changed
+72
-68
No files matched your search
@@ -1,15 +1,12 @@
|
||||
package tconstruct.armor.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
import net.minecraft.client.renderer.InventoryEffectRenderer;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import tconstruct.armor.inventory.ArmorExtendedContainer;
|
||||
import tconstruct.armor.player.ArmorExtended;
|
||||
@@ -105,49 +102,13 @@ public class ArmorExtendedGui extends InventoryEffectRenderer {
|
||||
|
||||
cornerX = this.guiLeft;
|
||||
cornerY = this.guiTop;
|
||||
drawPlayerOnGui(
|
||||
this.mc,
|
||||
// player model render
|
||||
GuiInventory.func_147046_a(
|
||||
cornerX + 33,
|
||||
cornerY + 75,
|
||||
30,
|
||||
(float) (cornerX + 51) - this.xSize_lo,
|
||||
(float) (cornerY + 75 - 50) - this.ySize_lo);
|
||||
(float) (cornerY + 75 - 50) - this.ySize_lo,
|
||||
Minecraft.getMinecraft().thePlayer);
|
||||
}
|
||||
|
||||
public static void drawPlayerOnGui(Minecraft par0Minecraft, int par1, int par2, int par3, float par4, float par5) {
|
||||
GL11.glEnable(GL11.GL_COLOR_MATERIAL);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float) par1, (float) par2, 50.0F);
|
||||
GL11.glScalef((float) (-par3), (float) par3, (float) par3);
|
||||
GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F);
|
||||
float f2 = par0Minecraft.thePlayer.renderYawOffset;
|
||||
float f3 = par0Minecraft.thePlayer.rotationYaw;
|
||||
float f4 = par0Minecraft.thePlayer.rotationPitch;
|
||||
par4 -= 19;
|
||||
GL11.glRotatef(135.0F, 0.0F, 1.0F, 0.0F);
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
GL11.glRotatef(-135.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-((float) Math.atan(par5 / 40.0F)) * 20.0F, 1.0F, 0.0F, 0.0F);
|
||||
par0Minecraft.thePlayer.renderYawOffset = (float) Math.atan(par4 / 40.0F) * 20.0F;
|
||||
par0Minecraft.thePlayer.rotationYaw = (float) Math.atan(par4 / 40.0F) * 40.0F;
|
||||
par0Minecraft.thePlayer.rotationPitch = -((float) Math.atan(par5 / 40.0F)) * 20.0F;
|
||||
par0Minecraft.thePlayer.rotationYawHead = par0Minecraft.thePlayer.rotationYaw;
|
||||
GL11.glTranslatef(0.0F, par0Minecraft.thePlayer.yOffset, 0.0F);
|
||||
RenderManager.instance.playerViewY = 180.0F;
|
||||
RenderManager.instance.renderEntityWithPosYaw(par0Minecraft.thePlayer, 0.0D, 0.0D, 0.0D, 0.0F, 1.0F);
|
||||
par0Minecraft.thePlayer.renderYawOffset = f2;
|
||||
par0Minecraft.thePlayer.rotationYaw = f3;
|
||||
par0Minecraft.thePlayer.rotationPitch = f4;
|
||||
GL11.glPopMatrix();
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
OpenGlHelper.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
||||
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
||||
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
||||
}
|
||||
|
||||
/*
|
||||
* protected void keyTyped(char par1, int par2) { if (par2 == TControls.armorKey.keyCode) {
|
||||
* this.mc.thePlayer.closeScreen(); } super.keyTyped(par1, par2); }
|
||||
*/
|
||||
}
|
||||
Reference in new issue
Block a user