Advertisement
Guest User

Untitled

a guest
Aug 12th, 2015
260
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.88 KB | None | 0 0
  1.     public void renderItemGlow(EntityLivingBase entity, ItemStack drop, int glowColor) {
  2.         // FIXME doesn't blend
  3.         pushMatrix();
  4.         GL11.glPushAttrib(24577);
  5.         GL11.glDisable(GL11.GL_LIGHTING);
  6.         float red = (glowColor >> 16 & 255) / 255.0F;
  7.         float green = (glowColor >> 8 & 255) / 255.0F;
  8.         float blue = (glowColor & 255) / 255.0F;
  9.         float alpha = 0.2F;
  10.         enableBlend();
  11.         GL14.glBlendColor(red, green, blue, alpha);
  12.         blendFunc('\u8001', 1);
  13.         color(red, green, blue, alpha);
  14.         // translate(1.1F, 1.1F, 1.1F);
  15.         if (!(drop.getItem() instanceof ItemBlock) || !drop.getItem().isFull3D()) {
  16.             translate(0.02F, -0.06F, -0.02F);
  17.         }
  18.         Minecraft.getMinecraft().getItemRenderer().renderItem(entity, drop, TransformType.THIRD_PERSON);
  19.         popAttrib();
  20.         popMatrix();
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement