Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class FactionsEntities
- {
- private static void RegisterEntityAI(Class<? extends EntityLivingAI> entity)
- {
- long x = entity.getName().hashCode();
- Random random = new Random(x);
- int eggPrimary = random.nextInt() * 16777215; // first egg color
- int eggSecondary = random.nextInt() * 16777215;
- EntityRegistry.registerModEntity(ResourceLocationHelper.getEntityLocation(References.Mod.Id, entity.getName()), entity, entity.getName(), 0, Factions.instance, 64, 1, true, eggPrimary,
- eggSecondary);
- }
- private static void RegisterRenderer(Class<? extends EntityLivingAI> entity, IRenderFactory<? super EntityLivingAI> renderFactory)
- {
- RenderingRegistry.registerEntityRenderingHandler(entity, renderFactory);
- }
- public static void init()
- {
- RegisterEntityAI(EntityFactionHuman.class);
- }
- public static void RegisterRenderers()
- {
- RegisterRenderer(EntityFactionHuman.class, RenderHumanoid::new);
- }
- }
Add Comment
Please, Sign In to add comment