Don't use .append(), we already know the final length. Instead,
have python initialise the list of a certain size and set the elements
in it.
Makes the function like 4% faster.
Turns out my previous grasp of how Minecraft does this was wrong.
This seems to be the correct way. One side effect is that biome data
now has less resolution. One only really notices this when looking at
water, for which Minecraft does not even use the water colours for
in-game, otherwise I can't really tell a big difference.
Fixes#1698.
Okay so you know how you have chunks and they map to 4 levels of biomes?
Logically you'd go hmmmm, let's just map 4 Y levels to one biome level.
Except there aren't 16 chunk heights, there are about 17 if you count
Y=16 (which can contain data), but there's also -1 technically but I've
never seen this have data in an NBT structure I don't think.
Anyway, let's just hope we're doing the right thing by giving Y=16 the
same biome as Y=15. If someone wants to check whether that is actually
correct please feel free to, but for now it's better than crashing at
the very least.
Would be nice if we had a spec for these kinds of things.
Fixes#1685.
Apparently rotated worlds would try to access the biome for Y-level
-1. I don't know why they do that (probably some dumb reason that may
be a bug in of itself) but returning the first level should be harmless.
Fixes#1683.
Fixes#1650.
Mojang changed the biomes code so that it now can have different
biomes for different Y levels. We need to adjust our logic accordingly,
which is done through some small BiomeDispensary class where we shove
a numpy'd Mojang array in and can then read out the biomes for each level.
Biome data is now stored per-section, which needed some changes on the C
side of things. I didn't change anything in the biome overlay code so
I wouldn't be surprised if it's broken now, but for the time being I'd
rather have 1.15 fixed than some obscure overlay.
Tested to work with 1.14 and 1.15 data. No new biomes have been added
to the code yet.
The unpacking of the block states missed a single bit
when the bits per value was 7. Every 7 bytes it would
miss one bit and store it as 0 instead of the actual
value. This happened because 0xfc was used instead of
0xfe. 0xfc has six bits set to 1 and two to 0. 0xfe
has correctly set seven bits and one bit to 0. We need
those seven bits and not just the six.
Observers get initialised at config parse time, before Overviewer
creates the outputdir. So we can just tell them to create the
outputdir if it doesn't already exist to avoid an awkward error
on the initial render.
Fixes#1657.
Apparently the gzip stream can be malformed in a way where it
does read it, but then throws an EOFError when it abruptly ends.
Catch this so we don't error out.
Documentation Not Accounting for wget oddness with non-existing directories. When using wget options to create directories, results in errors. This change works reliably for utilizing with wget where directories do not already exist, and also adds note indicating ability to integrate with shell scripts.
Apparently this is a status sometimes seen with worlds converted from
1.12 to 1.14. From the sample I have, it looks like they're properly
populated with light and terrain data, so hopefully this doesn't break
anything.
Possibly fixes#1630.