Fix unicorn nametags being black when an item is held.

Removed some code, reimplement sometime.
This commit is contained in:
Matthew Messinger 2015-08-13 00:49:28 -04:00
parent 48fce4e3b1
commit 3405dc2843
2 changed files with 5 additions and 29 deletions

View file

@ -904,13 +904,13 @@ public class pm_newPonyAdv extends ModelPony {
this.headpiece[2].render(this.scale); this.headpiece[2].render(this.scale);
if (this.heldItemRight != 0 && this.glowColor != 0) { if (this.heldItemRight != 0 && this.glowColor != 0) {
GL11.glPushAttrib(24577); GL11.glPushAttrib(24577);
GL11.glDisable(3553); GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDisable(2896); GL11.glDisable(GL11.GL_LIGHTING);
GL11.glEnable(3042); GL11.glEnable(GL11.GL_BLEND);
float var4 = (this.glowColor >> 16 & 255) / 255.0F; float var4 = (this.glowColor >> 16 & 255) / 255.0F;
float green = (this.glowColor >> 8 & 255) / 255.0F; float green = (this.glowColor >> 8 & 255) / 255.0F;
float blue = (this.glowColor & 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); color(var4, green, blue, 0.4F);
this.hornglow[0].render(this.scale); this.hornglow[0].render(this.scale);
color(var4, green, blue, 0.2F); color(var4, green, blue, 0.2F);

View file

@ -2,9 +2,6 @@ package com.minelittlepony.minelp.renderer.layer;
import static net.minecraft.client.renderer.GlStateManager.*; 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.PMAPI;
import com.minelittlepony.minelp.model.PlayerModel; import com.minelittlepony.minelp.model.PlayerModel;
import com.minelittlepony.minelp.model.pony.pm_newPonyAdv; 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.entity.player.EntityPlayer;
import net.minecraft.init.Items; import net.minecraft.init.Items;
import net.minecraft.item.EnumAction; import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
public class LayerHeldPonyItem implements LayerRenderer { public class LayerHeldPonyItem implements LayerRenderer {
@ -121,27 +117,7 @@ public class LayerHeldPonyItem implements LayerRenderer {
} }
public void renderItemGlow(EntityLivingBase entity, ItemStack drop, int glowColor) { public void renderItemGlow(EntityLivingBase entity, ItemStack drop, int glowColor) {
// FIXME doesn't blend // TODO reimplement
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();
} }
@Override @Override