Advertisement
HalestormXV

Untitled

Jul 15th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.97 KB | None | 0 0
  1. package halestormxv.eAngelus.mobs.models;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.client.renderer.GlStateManager;
  6. import net.minecraft.entity.Entity;
  7. import org.lwjgl.opengl.GL11;
  8.  
  9. /**
  10.  * Created by Blaze on 7/15/2017.
  11.  */
  12. public class ModelPhantom extends ModelBase
  13. {
  14.     public ModelRenderer field_178723_h;
  15.     public ModelRenderer field_178721_j;
  16.     public ModelRenderer field_78116_c;
  17.     public ModelRenderer field_78115_e;
  18.     public ModelRenderer field_178724_i;
  19.     public ModelRenderer field_178722_k;
  20.     public ModelRenderer field_178720_f;
  21.  
  22.     public ModelPhantom()
  23.     {
  24.         this.textureWidth = 64;
  25.         this.textureHeight = 64;
  26.  
  27.         this.field_178723_h = new ModelRenderer(this, 40, 16);
  28.         this.field_178723_h.setRotationPoint(-5.0F, 2.0F, 0.0F);
  29.         this.field_178723_h.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4);
  30.         this.setRotationAngles(this.field_178723_h, -1.3962635347535182F, -0.10000000116728046F, 0.10000000116728046F);
  31.         this.field_178721_j = new ModelRenderer(this, 0, 16);
  32.         this.field_178721_j.setRotationPoint(-1.9F, 12.0F, 0.1F);
  33.         this.field_178721_j.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4);
  34.         this.field_78116_c = new ModelRenderer(this, 0, 0);
  35.         this.field_78116_c.setRotationPoint(0.0F, 0.0F, 0.0F);
  36.         this.field_78116_c.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8);
  37.         this.field_78115_e = new ModelRenderer(this, 16, 16);
  38.         this.field_78115_e.setRotationPoint(0.0F, 0.0F, 0.0F);
  39.         this.field_78115_e.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4);
  40.         this.field_178724_i = new ModelRenderer(this, 40, 16);
  41.         this.field_178724_i.setRotationPoint(5.0F, 2.0F, 0.0F);
  42.         this.field_178724_i.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4);
  43.         this.field_178724_i.mirror = true;
  44.         this.setRotationAngles(this.field_178724_i, -1.3962635347535182F, 0.10000000116728046F, -0.10000000116728046F);
  45.         this.field_178722_k = new ModelRenderer(this, 0, 16);
  46.         this.field_178722_k.setRotationPoint(1.9F, 12.0F, 0.1F);
  47.         this.field_178722_k.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4);
  48.         this.field_178722_k.mirror = true;
  49.         this.field_178720_f = new ModelRenderer(this, 32, 0);
  50.         this.field_178720_f.setRotationPoint(0.0F, 0.0F, 0.0F);
  51.         this.field_178720_f.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8);
  52.     }
  53.  
  54.     @Override
  55.     public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float rotationYaw, float rotationPitch, float scale)
  56.     {
  57.         GlStateManager.pushMatrix();
  58.         GlStateManager.translate(this.field_178723_h.offsetX, this.field_178723_h.offsetY, this.field_178723_h.offsetZ);
  59.         GlStateManager.translate(this.field_178723_h.rotationPointX * scale, this.field_178723_h.rotationPointY * scale, this.field_178723_h.rotationPointZ * scale);
  60.         GlStateManager.scale(1.0F, 1.0F, 1.0F);
  61.         GlStateManager.translate(-this.field_178723_h.offsetX, -this.field_178723_h.offsetY, -this.field_178723_h.offsetZ);
  62.         GlStateManager.translate(-this.field_178723_h.rotationPointX * scale, -this.field_178723_h.rotationPointY * scale, -this.field_178723_h.rotationPointZ * scale);
  63.         GlStateManager.enableBlend();
  64.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  65.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  66.         this.field_178723_h.render(scale);
  67.         GlStateManager.disableBlend();
  68.         GlStateManager.popMatrix();
  69.         GlStateManager.enableBlend();
  70.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  71.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  72.         this.field_178721_j.render(scale);
  73.         GlStateManager.disableBlend();
  74.         GlStateManager.enableBlend();
  75.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  76.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  77.         this.field_78116_c.render(scale);
  78.         GlStateManager.disableBlend();
  79.         GlStateManager.enableBlend();
  80.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  81.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  82.         this.field_78115_e.render(scale);
  83.         GlStateManager.disableBlend();
  84.         GlStateManager.pushMatrix();
  85.         GlStateManager.translate(this.field_178724_i.offsetX, this.field_178724_i.offsetY, this.field_178724_i.offsetZ);
  86.         GlStateManager.translate(this.field_178724_i.rotationPointX * scale, this.field_178724_i.rotationPointY * scale, this.field_178724_i.rotationPointZ * scale);
  87.         GlStateManager.scale(1.0F, 1.0F, 1.0F);
  88.         GlStateManager.translate(-this.field_178724_i.offsetX, -this.field_178724_i.offsetY, -this.field_178724_i.offsetZ);
  89.         GlStateManager.translate(-this.field_178724_i.rotationPointX * scale, -this.field_178724_i.rotationPointY * scale, -this.field_178724_i.rotationPointZ * scale);
  90.         GlStateManager.enableBlend();
  91.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  92.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  93.         this.field_178724_i.render(scale);
  94.         GlStateManager.disableBlend();
  95.         GlStateManager.popMatrix();
  96.         GlStateManager.enableBlend();
  97.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  98.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  99.         this.field_178722_k.render(scale);
  100.         GlStateManager.disableBlend();
  101.         GlStateManager.enableBlend();
  102.         GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
  103.         GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
  104.         this.field_178720_f.render(scale);
  105.         GlStateManager.disableBlend();
  106.     }
  107.  
  108.     public void setRotationAngles(ModelRenderer modelRenderer, float x, float y, float z)
  109.     {
  110.         modelRenderer.rotateAngleX = x;
  111.         modelRenderer.rotateAngleY = y;
  112.         modelRenderer.rotateAngleZ = z;
  113.     }
  114. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement