public static void registerEntities() {
    for (CustomEntityType entity : values())
    a(entity.getCustomClass(), entity.getName(), entity.getID());
     
    // BiomeBase#biomes became private.
    BiomeBase[] biomes;
    try {
    biomes = (BiomeBase[]) getPrivateStatic(BiomeBase.class, "biomes");
    } catch (Exception exc) {
    // Unable to fetch.
    return;
    }
    for (BiomeBase biomeBase : biomes) {
    if (biomeBase == null)
    break;
     
    // This changed names from J, K, L and M.
    for (String field : new String[] { "as", "at", "au", "av" })
    try {
    Field list = BiomeBase.class.getDeclaredField(field);
    list.setAccessible(true);
    @SuppressWarnings("unchecked")
    List<BiomeMeta> mobList = (List<BiomeMeta>) list.get(biomeBase);
     
    // Write in our custom class.
    for (BiomeMeta meta : mobList)
    for (CustomEntityType entity : values())
    if (entity.getNMSClass().equals(meta.b))
    meta.b = entity.getCustomClass();
    } catch (Exception e) {
    e.printStackTrace();
    }
    }
    }