Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package halestormxv.eAngelus.mobs.models;
- import net.minecraft.client.model.ModelBase;
- import net.minecraft.client.model.ModelRenderer;
- import net.minecraft.client.renderer.GlStateManager;
- import net.minecraft.entity.Entity;
- import org.lwjgl.opengl.GL11;
- /**
- * Created by Blaze on 7/15/2017.
- */
- public class ModelPhantom extends ModelBase
- {
- public ModelRenderer field_178723_h;
- public ModelRenderer field_178721_j;
- public ModelRenderer field_78116_c;
- public ModelRenderer field_78115_e;
- public ModelRenderer field_178724_i;
- public ModelRenderer field_178722_k;
- public ModelRenderer field_178720_f;
- public ModelPhantom()
- {
- this.textureWidth = 64;
- this.textureHeight = 64;
- this.field_178723_h = new ModelRenderer(this, 40, 16);
- this.field_178723_h.setRotationPoint(-5.0F, 2.0F, 0.0F);
- this.field_178723_h.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4);
- this.setRotationAngles(this.field_178723_h, -1.3962635347535182F, -0.10000000116728046F, 0.10000000116728046F);
- this.field_178721_j = new ModelRenderer(this, 0, 16);
- this.field_178721_j.setRotationPoint(-1.9F, 12.0F, 0.1F);
- this.field_178721_j.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4);
- this.field_78116_c = new ModelRenderer(this, 0, 0);
- this.field_78116_c.setRotationPoint(0.0F, 0.0F, 0.0F);
- this.field_78116_c.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8);
- this.field_78115_e = new ModelRenderer(this, 16, 16);
- this.field_78115_e.setRotationPoint(0.0F, 0.0F, 0.0F);
- this.field_78115_e.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4);
- this.field_178724_i = new ModelRenderer(this, 40, 16);
- this.field_178724_i.setRotationPoint(5.0F, 2.0F, 0.0F);
- this.field_178724_i.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4);
- this.field_178724_i.mirror = true;
- this.setRotationAngles(this.field_178724_i, -1.3962635347535182F, 0.10000000116728046F, -0.10000000116728046F);
- this.field_178722_k = new ModelRenderer(this, 0, 16);
- this.field_178722_k.setRotationPoint(1.9F, 12.0F, 0.1F);
- this.field_178722_k.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4);
- this.field_178722_k.mirror = true;
- this.field_178720_f = new ModelRenderer(this, 32, 0);
- this.field_178720_f.setRotationPoint(0.0F, 0.0F, 0.0F);
- this.field_178720_f.addBox(-4.0F, -8.0F, -4.0F, 8, 8, 8);
- }
- @Override
- public void render(Entity entity, float limbSwing, float limbSwingAmount, float ageInTicks, float rotationYaw, float rotationPitch, float scale)
- {
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.field_178723_h.offsetX, this.field_178723_h.offsetY, this.field_178723_h.offsetZ);
- GlStateManager.translate(this.field_178723_h.rotationPointX * scale, this.field_178723_h.rotationPointY * scale, this.field_178723_h.rotationPointZ * scale);
- GlStateManager.scale(1.0F, 1.0F, 1.0F);
- GlStateManager.translate(-this.field_178723_h.offsetX, -this.field_178723_h.offsetY, -this.field_178723_h.offsetZ);
- GlStateManager.translate(-this.field_178723_h.rotationPointX * scale, -this.field_178723_h.rotationPointY * scale, -this.field_178723_h.rotationPointZ * scale);
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_178723_h.render(scale);
- GlStateManager.disableBlend();
- GlStateManager.popMatrix();
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_178721_j.render(scale);
- GlStateManager.disableBlend();
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_78116_c.render(scale);
- GlStateManager.disableBlend();
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_78115_e.render(scale);
- GlStateManager.disableBlend();
- GlStateManager.pushMatrix();
- GlStateManager.translate(this.field_178724_i.offsetX, this.field_178724_i.offsetY, this.field_178724_i.offsetZ);
- GlStateManager.translate(this.field_178724_i.rotationPointX * scale, this.field_178724_i.rotationPointY * scale, this.field_178724_i.rotationPointZ * scale);
- GlStateManager.scale(1.0F, 1.0F, 1.0F);
- GlStateManager.translate(-this.field_178724_i.offsetX, -this.field_178724_i.offsetY, -this.field_178724_i.offsetZ);
- GlStateManager.translate(-this.field_178724_i.rotationPointX * scale, -this.field_178724_i.rotationPointY * scale, -this.field_178724_i.rotationPointZ * scale);
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_178724_i.render(scale);
- GlStateManager.disableBlend();
- GlStateManager.popMatrix();
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_178722_k.render(scale);
- GlStateManager.disableBlend();
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- GlStateManager.color(1.0F, 1.0F, 1.0F, 0.0F);
- this.field_178720_f.render(scale);
- GlStateManager.disableBlend();
- }
- public void setRotationAngles(ModelRenderer modelRenderer, float x, float y, float z)
- {
- modelRenderer.rotateAngleX = x;
- modelRenderer.rotateAngleY = y;
- modelRenderer.rotateAngleZ = z;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement