TitanChase

Untitled

Feb 22nd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.02 KB | None | 0 0
  1. public class FactionsEntities
  2. {
  3.     private static void RegisterEntityAI(Class<? extends EntityLivingAI> entity)
  4.     {
  5.         long x = entity.getName().hashCode();
  6.         Random random = new Random(x);
  7.         int eggPrimary = random.nextInt() * 16777215; // first egg color
  8.         int eggSecondary = random.nextInt() * 16777215;
  9.         EntityRegistry.registerModEntity(ResourceLocationHelper.getEntityLocation(References.Mod.Id, entity.getName()), entity, entity.getName(), 0, Factions.instance, 64, 1, true, eggPrimary,
  10.                 eggSecondary);
  11.     }
  12.  
  13.     private static void RegisterRenderer(Class<? extends EntityLivingAI> entity, IRenderFactory<? super EntityLivingAI> renderFactory)
  14.     {
  15.         RenderingRegistry.registerEntityRenderingHandler(entity, renderFactory);
  16.     }
  17.  
  18.     public static void init()
  19.     {
  20.         RegisterEntityAI(EntityFactionHuman.class);
  21.     }
  22.  
  23.     public static void RegisterRenderers()
  24.     {
  25.         RegisterRenderer(EntityFactionHuman.class, RenderHumanoid::new);
  26.     }
  27. }
Add Comment
Please, Sign In to add comment