public static void handleFinishLoadingFor(ModLoaderModContainer mc, Minecraft game) {
    BaseMod mod = (BaseMod) mc.getMod();

    Map<Class<? extends Entity>, Render> renderers = Maps.newHashMap();

    mod.addRenderer(renderers);

    for (Entry<Class<? extends Entity>, Render> e : renderers.entrySet()) {
      RenderingRegistry.registerEntityRenderingHandler(e.getKey(), e.getValue());
    }

    mod.registerAnimation(game);
  }
Esempio n. 2
0
 /**
  * Get a list of all BaseMod loaded into the system {@link ModLoaderModContainer#findAll}
  *
  * @return
  */
 public static List<BaseMod> getLoadedMods() {
   return ModLoaderModContainer.findAll(BaseMod.class);
 }