Advertisement
Guest User

Modelo.class

a guest
Sep 11th, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. package com.deablofk.blocks.RenderEntity;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5. import net.minecraft.entity.Entity;
  6.  
  7. public class Modelo extends ModelBase
  8. {
  9. ModelRenderer Shape1;
  10.  
  11. public Modelo()
  12. {
  13. textureWidth = 64;
  14. textureHeight = 32;
  15.  
  16. Shape1 = new ModelRenderer(this, 0, 0);
  17. Shape1.addBox(0F, 0F, 0F, 16, 16, 16);
  18. Shape1.setRotationPoint(-8F, 8F, -8F);
  19. Shape1.setTextureSize(64, 32);
  20. Shape1.mirror = true;
  21. setRotation(Shape1, 0F, 0F, 0F);
  22. }
  23.  
  24. public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  25. {
  26. super.render(entity, f, f1, f2, f3, f4, f5);
  27. setRotationAngles(entity, f, f1, f2, f3, f4, f5);
  28. Shape1.render(f5);
  29. }
  30.  
  31. private void setRotation(ModelRenderer model, float x, float y, float z)
  32. {
  33. model.rotateAngleX = x;
  34. model.rotateAngleY = y;
  35. model.rotateAngleZ = z;
  36. }
  37.  
  38. public void setRotationAngles(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
  39. {
  40. super.setRotationAngles(f, f1, f2, f3, f4, f5, entity);
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement