Cinderscapes

Cinderscapes

1M Downloads

Twilight Vines sometimes don't connect to the ceiling at both ends

saltyseadoggo opened this issue ยท 6 comments

commented

Expected Behaviour
All Twilight Vines would connect to the Nether ceiling at both ends, as most of them do.
Actual Behaviour
Some Twilight Vines only connect to the Nether ceiling at one end.
Steps to Reproduce

  • Create a new world with seed 919343044181396312 in Creative or Spectator mode with cheats enabled.
  • Enter the Nether by any means, and run /teleport [player name] 308 94 439. Look around and find the twilight vine that is only attached at one end. A similar vine can be found at 310, 82, 305.
    Attachments
    2020-10-12_22 49 42
    2020-10-12_22 49 59
commented

I spent some time on this recently and while it's still fresh in my mind I would like to make a few comments about it.

First off is the unfortunate bit; Mojang at some point reduced the distance allowed for feature block placement, which made this bug worse.

To ameliorate the problem in the 1.18.2 and 1.19 releases, I have restricted the vine length to be short enough not to trigger the bug (by checking whether the vine would enter a far chunk, which is the most permissive effective check possible). This means you will never see really long vines (but that is not a big change; most were simply cut off previously). However, I also added diagonal vines, which allows vines to grow sqrt(2) times as long safely. Overall I think it looks pretty good.

Regarding structure generation, there are some big problems with the approach. Each chunk in a structure has to be able to generate without reference to generation in the other chunks, and in any order. It would be necessary to get the structure bounding box and then map out the entire 3D space to decide the locations of all the vines AND then serialize the vine locations to some NBT-friendly data structure, a process with serious potential performance implications and added complexity. Suggestions to use the jigsaw system ignore the fact the vine has an overall shape which the jigsaw system is entirely incapable of replicating (an absolutely massive amount of situation-specific pieces would be required).

In fact the Minecraft system most compatible with generating large multi-chunk curving vines is probably the carver system. It might be possible (probably via a number of mixins though) to create a carver which carves vine-shaped, vine-filled "voids" out of the air in the caves. I am not certain it would be worth the effort, however.

I will leave this issue open for the time being, in case something changes in Minecraft generation which makes longer vines feasible.

commented

Unfortunately this is actually a limitation of how vanilla chunks generate, there's nothing we can do about it :/. You'll notice it only ever occurs in one direction because of the order in which adjacent chunks generate.

commented

Hm, interesting. I take it they're some kind of world generation feature? Would it be perhaps possible to generate them as structures, similar to, say, dungeons to prevent this issue? Just tossing ideas out.

commented

I mean maybe....? Idk @SuperCoder7979 What do you think of that. It sounds like it might be a little intensive to switch to structures for something so common.

commented

I mean, trees and caves are structures, right? So, it shouldn't be too much of a problem to make vines structures too. :/

commented

Would it be possible to have the twilight vine generator generate structure blocks which place the vines from a number of structure files to allow them to always connect up?