Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void renderItemGlow(EntityLivingBase entity, ItemStack drop, int glowColor) {
- // FIXME doesn't blend
- pushMatrix();
- GL11.glPushAttrib(24577);
- GL11.glDisable(GL11.GL_LIGHTING);
- 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();
- 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();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement