Sodium

Sodium

35M Downloads

Sodium gets the view distance directly instead of using the getter method

IMS212 opened this issue ยท 7 comments

commented

This causes Vanilla to not run the server view distance check, and returns the client distance even if the server distance is smaller which is unintended behavior as of 1.18.

commented

Is this as simple as calling GameOptions#getViewDistance here instead of reading the field directly?

if (this.client.options.viewDistance != this.renderDistance) {

this.renderDistance = this.client.options.viewDistance;

commented

Should be.

commented

Would it be possible to have an option to switch between "chunks outside the server render distance should remain loaded until they are also outside the client render distance" (something like pre-1.18 behavior) and "the client render distance is capped by the server one" (1.18)?

commented

Seems like that should work (tested locally and everything seemed fine), @HybridEidolon don't forget to change the usage here as well!

Entity.setRenderDistanceMultiplier(MathHelper.clamp((double) this.client.options.viewDistance / 8.0D, 1.0D, 2.5D) * (double) this.client.options.entityDistanceScaling);

commented

Can I work on that issue, if its not done yet?

commented
commented

Looks like it wasn't linked but now that #1050 was merged this should be able to be closed