Deeper and Darker

Deeper and Darker

25M Downloads

[bug] [compat] Dimension effects causes Distant Horizon to misread the dimension name and corrupt chunk caches

FinchPhil opened this issue ยท 0 comments

commented

Repro:

  • Install both Distant Horizon and DeeperAndDarker.
  • Create a creative world.
  • Go to the nether and explore north for a few minutes.
  • Go to the otherside, switch to spectator, go to the roof of the dimension, and look north.

Expected:
You can only see otherside chunks.

Actual:
You can see distant chunks from the nether in the distance. While this isn't much of an issue for the otherside, as it is a very claustrophobic dimension and you'll probably never see those chunks anyway, it is a major issue if you go back to the nether after exploring the otherside. Since DH shares the same cache for both dimensions, you'll see otherside chunks in the distance of the nether.

Hypothesis:
Distant Horizon uses the effectsLocation's path of a dimension to determine its name, and then uses it as a key to store its chunk caches. See: https://gitlab.com/distant-horizons-team/distant-horizons/-/blob/main/common/src/main/java/com/seibel/distanthorizons/common/wrappers/world/DimensionTypeWrapper.java#L72

I suspect that since the otherside dimension uses minecraft:the_nether as its effects, DH ends up using the same key for both dimensions, causing nether chunks to show up in the otherside, and vice versa.

Note:
I've only tested this in multiplayer (with a local fabric 1.20.1 server running in docker), but it looks like this should behave the same in single player as well.

It's unclear whether it is possible for DH to get the dimension name in a more reliable way, which is why I created this bug here instead of in DH. I assumes DH is doing the correct thing here, and is why I created this issue here instead of reporting it to DH.