Shhh you saw nothing (items glow again)

This commit is contained in:
Sollace 2018-04-29 16:41:40 +02:00
parent fd68e60923
commit 7060359f58

View file

@ -7,6 +7,8 @@ import static net.minecraft.client.renderer.GlStateManager.pushMatrix;
import static net.minecraft.client.renderer.GlStateManager.scale; import static net.minecraft.client.renderer.GlStateManager.scale;
import static net.minecraft.client.renderer.GlStateManager.translate; import static net.minecraft.client.renderer.GlStateManager.translate;
import org.lwjgl.opengl.GL14;
import com.minelittlepony.ducks.IRenderItem; import com.minelittlepony.ducks.IRenderItem;
import com.minelittlepony.model.capabilities.IModelUnicorn; import com.minelittlepony.model.capabilities.IModelUnicorn;
import com.minelittlepony.util.coordinates.Color; import com.minelittlepony.util.coordinates.Color;
@ -63,7 +65,7 @@ public class LayerHeldPonyItemMagical<T extends EntityLivingBase> extends LayerH
pushMatrix(); pushMatrix();
disableLighting(); disableLighting();
Color.glColor(glowColor, 0.2F); GL14.glBlendColor(Color.r(glowColor), Color.g(glowColor), Color.b(glowColor), 0.2F);
RenderItem renderItem = Minecraft.getMinecraft().getRenderItem(); RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();
((IRenderItem) renderItem).useTransparency(true); ((IRenderItem) renderItem).useTransparency(true);
@ -83,10 +85,10 @@ public class LayerHeldPonyItemMagical<T extends EntityLivingBase> extends LayerH
} }
private ItemStack stackWithoutEnchantment(ItemStack original) { private ItemStack stackWithoutEnchantment(ItemStack original) {
ItemStack copy = original.copy(); if (original.isItemEnchanted()) {
if (copy.isItemEnchanted()) { original = original.copy();
copy.getTagCompound().removeTag("ench"); original.getTagCompound().removeTag("ench");
} }
return copy; return original;
} }
} }