Advertisement
Guest User

Model

a guest
Mar 8th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.05 KB | None | 0 0
  1. package fr.hugoland.rpmod.client.models;
  2.  
  3. import net.minecraft.client.model.ModelBase;
  4. import net.minecraft.client.model.ModelRenderer;
  5.  
  6. public class ModelPancarte extends ModelBase
  7. {
  8.   //fields
  9.     ModelRenderer Base;
  10.     ModelRenderer Horizontal;
  11.  
  12.   public ModelPancarte()
  13.   {
  14.     textureWidth = 64;
  15.     textureHeight = 32;
  16.    
  17.       Base = new ModelRenderer(this, 0, 0);
  18.       Base.addBox(0F, 0F, 0F, 14, 10, 2);
  19.       Base.setRotationPoint(-7F, 11F, 4F);
  20.       Base.setTextureSize(64, 32);
  21.       setRotation(Base, 0F, 0F, 0F);
  22.       Horizontal = new ModelRenderer(this, 33, 0);
  23.       Horizontal.addBox(0F, 0F, 0F, 2, 2, 8);
  24.       Horizontal.setRotationPoint(-1F, 15F, 6F);
  25.       Horizontal.setTextureSize(64, 32);
  26.       setRotation(Horizontal, 0F, 0F, 0F);
  27.   }
  28.  
  29.   public void renderAll()
  30.   {
  31.     Base.render(0.0625F);
  32.     Horizontal.render(0.0625F);
  33.   }
  34.  
  35.   private void setRotation(ModelRenderer model, float x, float y, float z)
  36.   {
  37.     model.rotateAngleX = x;
  38.     model.rotateAngleY = y;
  39.     model.rotateAngleZ = z;
  40.   }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement