mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-22 04:27:59 +01:00
Fix unicorn nametags being black when an item is held.
Removed some code, reimplement sometime.
This commit is contained in:
parent
48fce4e3b1
commit
3405dc2843
2 changed files with 5 additions and 29 deletions
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue