Guest User

Untitled

a guest
Dec 7th, 2019
122
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package shedi;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import net.minecraft.client.Minecraft;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraft.util.ResourceLocation;
  8. import net.minecraftforge.client.IItemRenderer;
  9.  
  10. public class Render1 implements IItemRenderer {
  11.  
  12. public static final ResourceLocation texture = new ResourceLocation("shedimod",
  13. "textures/models/items/bloodyvengeance.png");
  14.  
  15. @Override
  16. public boolean handleRenderType(ItemStack is, ItemRenderType type) {
  17. if (type == ItemRenderType.INVENTORY)
  18. return false;
  19. return true;
  20. }
  21.  
  22. @Override
  23. public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack is, ItemRendererHelper helper) {
  24. if (type == ItemRenderType.INVENTORY)
  25. return false;
  26. return true;
  27. }
  28.  
  29. @Override
  30. public void renderItem(ItemRenderType type, ItemStack is, Object... data) {
  31. GL11.glPushMatrix();
  32. if (type == ItemRenderType.EQUIPPED) {
  33. GL11.glTranslatef(1.25F, 0.786F, 1.25F);
  34. GL11.glRotatef(-30, 33, 500, -500);
  35. GL11.glRotatef(-257, 30, 30, 30);
  36. GL11.glRotatef(257, 25, 0, 0);
  37. GL11.glRotatef(0, 0, 0, 0);
  38. GL11.glScalef(0.5F, 0.5F, 0.5F);
  39. } else if (type == ItemRenderType.EQUIPPED_FIRST_PERSON) {
  40. GL11.glTranslatef(5.35F, 2.0F, -0.008F);
  41. GL11.glScalef(1F, 1F, 1F);
  42. GL11.glRotatef(17, 1, 0, 0);
  43. GL11.glRotatef(0, 0, 0, 1);
  44. GL11.glRotatef(-110, 0, 1, 0);
  45. } else if (type == ItemRenderType.ENTITY) {
  46. GL11.glTranslatef(0F, 0F, 0F);
  47. GL11.glScalef(0.5F, 0.5F, 0.5F);
  48. GL11.glRotatef(0, 1, 0, 0);
  49. GL11.glRotatef(0, 0, 0, 1);
  50. GL11.glRotatef(0, 0, 1, 0);
  51. } else if (type == ItemRenderType.FIRST_PERSON_MAP) {
  52. GL11.glTranslatef(0F, 0F, 0F);
  53. GL11.glScalef(0.5F, 0.5F, 0.5F);
  54. GL11.glRotatef(0, 1, 0, 0);
  55. GL11.glRotatef(0, 0, 0, 1);
  56. GL11.glRotatef(0, 0, 1, 0);
  57. }
  58. Minecraft.getMinecraft().renderEngine.bindTexture(texture);
  59. GL11.glCallList(ClientProxy.displayList[0]);
  60. GL11.glPopMatrix();
  61. }
  62.  
  63. }
RAW Paste Data