question: 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 ) ; } }
target:  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.