atlarge-research / opencraft

Other
4 stars 2 forks source link

View distance bugfix - [merged] #166

Closed jdonkervliet closed 4 years ago

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 13:43

Merges bugfix/viewdistance -> development

This merge request solves issue #43

When the view distance decreases the chunks outside of the new view distance are unloaded and when the view distance increases all new chunks are loaded.

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 13:45

Commented on src/main/java/net/glowstone/GlowWorld.java line 612

If you store this value as an Integer instead of an int, you can perform a null-check. This would show the difference between the previously stored value being 0 and no value being stored at all.

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 13:46

Commented on src/main/java/net/glowstone/GlowWorld.java line 622

If the previous viewdistance did not exist (which is different from it being 0) than the force flag should also be set.

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 13:47

Commented on src/main/java/net/glowstone/GlowWorld.java line 632

It might be better to name this variable currentRadius, as that would be consistent with the naming of the location, viewdistance, x, and y variables.

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 13:49

Commented on src/main/java/net/glowstone/GlowWorld.java line 649

I think this debug message was left in by mistake.

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 13:50

Commented on src/main/java/net/glowstone/util/AreaOfInterest.java line 47

Missing whiteline inbetween the description and params/return values.

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 14:09

Commented on src/main/java/net/glowstone/GlowWorld.java line 622

changed this line in version 2 of the diff

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 14:09

Commented on src/main/java/net/glowstone/GlowWorld.java line 632

changed this line in version 2 of the diff

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 14:09

Commented on src/main/java/net/glowstone/GlowWorld.java line 649

changed this line in version 2 of the diff

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 14:09

added 1 commit

Compare with previous version

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 14:11

Commented on src/main/java/net/glowstone/GlowWorld.java line 612

I believe that currentViewDistance can't be null anyways right? So that can stay an int instead of an Integer

jdonkervliet commented 4 years ago

In GitLab by @wubero on Jun 3, 2020, 15:04

resolved all threads

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 15:04

resolved all threads

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 16:39

mentioned in commit 679d013ce9d8e5ac9bfe66d564acf8e8bea5c8f9

jdonkervliet commented 4 years ago

In GitLab by @swabbur on Jun 3, 2020, 16:39

merged