public static void handleWorldChange(WorldClient world){
  if (ModConfigs.disabled)   return;
  if (world == null)   return;
  int dimid=world.provider.dimensionId;
  if (!proxyworlds.containsKey(dimid))   return;
  proxyworlds.put(dimid,world);
  Collection<WorldView> worldviews=worldviewsets.get(dimid);
  for (  WorldView view : worldviews) {
    view.replaceWorldObject(world);
  }
}

public static void handleWorldChange ( WorldClient world ) { if ( ModConfigs . disabled ) return ; if ( world == null ) return ; int dimid = world . provider . dimensionId ; if ( ! proxyworlds . containsKey ( dimid ) ) return ; proxyworlds . put ( dimid , world ) ; Collection < WorldView > worldviews = worldviewsets . get ( dimid ) ; for ( WorldView view : worldviews ) { view . replaceWorldObject ( world ) ; } }
this is a complex bit . as we want to reuse the current client world when rendering , if possible , we need to handle when that world changes . we could simply destroy all the views pointing to the existing proxy world , but that would be annoying to mods using the api . instead , we replace our proxy world with the new client world . this should only be called by lookingglass , and only from the handling of the client world change detection .
