Advertisement
Guest User

Untitled

a guest
Feb 18th, 2015
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.10 KB | None | 0 0
  1. public class ModelBolt extends ModelBase {
  2.     // Fields
  3.     ModelRenderer MainPart;
  4.    
  5.     public ModelBolt() {
  6.         textureWidth = 64;
  7.         textureHeight = 32;
  8.        
  9.         MainPart = new ModelRenderer(this, 0, 0);
  10.         MainPart.addBox(0F, 0F, 0F, 5, 5, 5);
  11.         MainPart.setRotationPoint(0F, 0F, 0F);
  12.         MainPart.setTextureSize(64, 32);
  13.         MainPart.mirror = true;
  14.         setRotation(MainPart, 0F, 0F, 0F);
  15.     }
  16.    
  17.     @Override
  18.     public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float factor) {
  19.         super.render(entity, f, f1, f2, f3, f4, factor);
  20.         setRotationAngles(f, f1, f2, f3, f4, factor, entity);
  21.         MainPart.render(factor);
  22.     }
  23.    
  24.     @Override
  25.     public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity entity) {
  26.         super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  27.     }
  28.    
  29.     private void setRotation(ModelRenderer model, float x, float y, float z) {
  30.         model.rotateAngleX = x;
  31.         model.rotateAngleY = y;
  32.         model.rotateAngleZ = z;
  33.     }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement