Advertisement
Guest User

Untitled

a guest
Feb 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.hugo.hostile.renders;
  2.  
  3. import fr.hugo.hostile.Reference;
  4. import fr.hugo.hostile.entity.EntityAssassin;
  5. import fr.hugo.hostile.models.ModelAssassin;
  6. import net.minecraft.client.model.ModelBiped;
  7. import net.minecraft.client.renderer.entity.RenderBiped;
  8. import net.minecraft.client.renderer.entity.RenderManager;
  9. import net.minecraft.client.renderer.entity.layers.LayerHeldItem;
  10. import net.minecraft.entity.Entity;
  11. import net.minecraft.entity.passive.EntityOcelot;
  12. import net.minecraft.util.ResourceLocation;
  13. import net.minecraftforge.fml.relauncher.SideOnly;
  14.  
  15.  
  16. public class RenderAssassin extends RenderBiped
  17.  
  18. {
  19.  
  20.  
  21.     public static final ResourceLocation ASSASSIN1_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin1.png");
  22.     public static final ResourceLocation ASSASSIN2_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin2.png");
  23.     public static final ResourceLocation ASSASSIN3_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin3.png");
  24.     public static final ResourceLocation ASSASSIN4_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin4.png");
  25.     public static final ResourceLocation ASSASSIN5_TEXTURE = new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin5.png");
  26.  
  27.  
  28.  
  29.  
  30.     public RenderAssassin(RenderManager renderManagerIn)
  31.  
  32.     {
  33.  
  34.         super(renderManagerIn, new ModelBiped(), 0.5F);
  35.  
  36.         this.addLayer(new LayerHeldItem(this));
  37.  
  38.     }
  39.  
  40.  
  41.  
  42.    
  43.  
  44.     {
  45.  
  46.         EntityAssassin.skins = (new ResourceLocation[]
  47.  
  48.                 {
  49.  
  50.                     new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin1.png"), new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin2.png"), new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin3.png"), new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin4.png"), new ResourceLocation(Reference.MOD_ID + ":textures/humans/assassin5.png")
  51.  
  52.                 });
  53.  
  54.     }
  55.  
  56.     protected ResourceLocation getEntityTexture(EntityAssassin assassin)
  57.     {
  58.         switch (EntityAssassin.currentSkin)
  59.         {
  60.             case 0:
  61.             default:
  62.                 return ASSASSIN1_TEXTURE;
  63.             case 1:
  64.                 return ASSASSIN2_TEXTURE;
  65.             case 2:
  66.                 return ASSASSIN3_TEXTURE;
  67.             case 3:
  68.                 return ASSASSIN4_TEXTURE;
  69.             case 4:
  70.                 return ASSASSIN5_TEXTURE;
  71.         }
  72.     }
  73.  
  74.     protected ResourceLocation getAssassinTexture(EntityAssassin assassin)
  75.  
  76.     {
  77.  
  78.         return EntityAssassin.skins[EntityAssassin.currentSkin];
  79.  
  80.     }
  81.  
  82.  
  83.  
  84.     protected ResourceLocation getEntityTexture(Entity entity)
  85.  
  86.     {
  87.  
  88.         return this.getAssassinTexture((EntityAssassin)entity);
  89.  
  90.     }
  91.  
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement