// TODO: Remove this, switch to a property change listener
WorldRenderer worldRenderer = CoreRegistry.get(WorldRenderer.class);
LocalPlayer player = CoreRegistry.get(LocalPlayer.class);
if (player != null) {
player.getClientEntity().send(new ChangeViewRangeRequest(viewDistance));
}
if (worldRenderer != null) {
worldRenderer.changeViewDistance(viewDistance);
}
}