From 3405dc284300a11e80f3bb804a3f3e7e84814efc Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Thu, 13 Aug 2015 00:49:28 -0400 Subject: [PATCH] Fix unicorn nametags being black when an item is held. Removed some code, reimplement sometime. --- .../minelp/model/pony/pm_newPonyAdv.java | 8 +++--- .../renderer/layer/LayerHeldPonyItem.java | 26 +------------------ 2 files changed, 5 insertions(+), 29 deletions(-) diff --git a/src/main/java/com/minelittlepony/minelp/model/pony/pm_newPonyAdv.java b/src/main/java/com/minelittlepony/minelp/model/pony/pm_newPonyAdv.java index 2353d027..3ab35ee0 100644 --- a/src/main/java/com/minelittlepony/minelp/model/pony/pm_newPonyAdv.java +++ b/src/main/java/com/minelittlepony/minelp/model/pony/pm_newPonyAdv.java @@ -904,13 +904,13 @@ public class pm_newPonyAdv extends ModelPony { this.headpiece[2].render(this.scale); if (this.heldItemRight != 0 && this.glowColor != 0) { GL11.glPushAttrib(24577); - GL11.glDisable(3553); - GL11.glDisable(2896); - GL11.glEnable(3042); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glEnable(GL11.GL_BLEND); float var4 = (this.glowColor >> 16 & 255) / 255.0F; float green = (this.glowColor >> 8 & 255) / 255.0F; float blue = (this.glowColor & 255) / 255.0F; - blendFunc(770, 1); + blendFunc(GL11.GL_SRC_ALPHA, 1); color(var4, green, blue, 0.4F); this.hornglow[0].render(this.scale); color(var4, green, blue, 0.2F); diff --git a/src/main/java/com/minelittlepony/minelp/renderer/layer/LayerHeldPonyItem.java b/src/main/java/com/minelittlepony/minelp/renderer/layer/LayerHeldPonyItem.java index 7ca6ecec..6276a5ab 100644 --- a/src/main/java/com/minelittlepony/minelp/renderer/layer/LayerHeldPonyItem.java +++ b/src/main/java/com/minelittlepony/minelp/renderer/layer/LayerHeldPonyItem.java @@ -2,9 +2,6 @@ package com.minelittlepony.minelp.renderer.layer; import static net.minecraft.client.renderer.GlStateManager.*; -import org.lwjgl.opengl.GL11; -import org.lwjgl.opengl.GL14; - import com.minelittlepony.minelp.model.PMAPI; import com.minelittlepony.minelp.model.PlayerModel; import com.minelittlepony.minelp.model.pony.pm_newPonyAdv; @@ -20,7 +17,6 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.EnumAction; -import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; public class LayerHeldPonyItem implements LayerRenderer { @@ -121,27 +117,7 @@ public class LayerHeldPonyItem implements LayerRenderer { } public void renderItemGlow(EntityLivingBase entity, ItemStack drop, int glowColor) { - // FIXME doesn't blend - pushMatrix(); - GL11.glPushAttrib(24577); - GL11.glDisable(2896); - float red = (glowColor >> 16 & 255) / 255.0F; - float green = (glowColor >> 8 & 255) / 255.0F; - float blue = (glowColor & 255) / 255.0F; - float alpha = 0.2F; - enableBlend(); - GL11.glEnable(3042); - GL14.glBlendColor(red, green, blue, alpha); - blendFunc('\u8001', 1); - color(red, green, blue, alpha); - // translate(1.1F, 1.1F, 1.1F); - if (!(drop.getItem() instanceof ItemBlock) || !drop.getItem().isFull3D()) { - translate(0.02F, -0.06F, -0.02F); - } - // Minecraft.getMinecraft().getItemRenderer().renderItem(entity, drop, - // TransformType.THIRD_PERSON); - popAttrib(); - popMatrix(); + // TODO reimplement } @Override