mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Shhh you saw nothing (items glow again)
This commit is contained in:
parent
fd68e60923
commit
7060359f58
1 changed files with 7 additions and 5 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue