WorldEdit

WorldEdit

43M Downloads

Feature request: Retrieve vanilla biome information

LadyCailinBot opened this issue ยท 4 comments

commented

WORLDEDIT-3865 - Reported by SlimeDog

biomeinfo reports the biome(s) of the current selection (in my usage, the current chunk). For informational purposes, it would be helpful to report the original (vanilla) biome(s) as well, at least if different. Since regen generates the selection with the original biome(s), I assume that the data are stored (somewhere) or calculated from the seed or otherwise known. Is it possible for biomeinfo to report both values?

commented

Comment by wizjany

It's not really possible.
Even if we could recalculate it from the seed, it's not guaranteed to be correct since the world gen can change.
It might (with great hackiness) be possible to tell what the biome would be if we re-ran the generator, but that's about it.

commented

Comment by SlimeDog

Is there someplace in the WEAPI that a plugin could get the hackful version of the biomes that regen would use, for a selected column?

Use case: I am constructing a plugin that remaps the biomes immediately after chunks are generated, in order to create an ice/snow environment, but with the original chunk landscape and flora and structures and mobs. However, it would be possible for the server operator to reconfigure the biome mappings, so I would like to set them back to the vanilla values in some cases. I appreciate that the generator might have changed in the interim, but that would be an acceptable (and a heavily documented at-your-own-hazard, keep-backups and try-it-on-your-test-server-first) risk.

commented

Comment by wizjany

why don't you just store the vanilla values immediately after chunks are genned but immediately before you change them?

also no, worldedit doesn't do that at all. i'm saying it would be possible if you (or worldedit) dive into NMS. we don't (for this).

commented

Comment by SlimeDog

Understood. I do not want to record the vanilla values, because the required storage would overwhelm many servers. It's a minimum of 128 bits per Y-column (X, Z, Biome ID) rounded to 64bits. If I did the arithmetic correctly, that's 4MB for a single fully-populated MC region. Even if it's half that, it's still too large.