have the LodRenderer recreated only when leaving a server

This commit is contained in:
James Seibel
2021-09-25 15:34:25 -05:00
parent a9bdbc4300
commit d6c918427b
@@ -232,9 +232,6 @@ public class ClientProxy
@SubscribeEvent
public void worldLoadEvent(WorldEvent.Load event)
{
// TODO why are we re-creating the lodRenderer when the dimension changes?
renderer = new LodRenderer(lodBufferBuilder);
DataPointUtil.worldHeight = event.getWorld().getHeight();
// the player just loaded a new world/dimension
@@ -269,6 +266,7 @@ public class ClientProxy
// breaking when changing worlds.
renderer.destroyBuffers();
recalculateWidths = true;
renderer = new LodRenderer(lodBufferBuilder);
// make sure the nulled objects are freed.