Previously, walls were all numbered at 21000+. This is bad because
our blockmap is an array, so this caused our blockmap to take up
80 MiB of RAM in each worker process.
This commit changes the wall numbering, and exploits some bitmasking
to have the wall check run in constant time no matter how many walls
there are. This is done with a simple mask and xor to check the prefix.
RAM usage for the blockmap thus drops to like 44 MiB.
This is in preparation for adding more walls for 1.16.
Minecraft 1.16.1 loves writing these in singleplayer, and they
cause a whole bunch of corruption warnings if we don't handle them
in a special way like this.
Minecraft occasionally generates chunks which are not yet lit.
In the past, I'd have said to just make them not render, but these
can sometimes be large areas of the world.
Instead, render them with full bright SkyLight. This looks less bad
than whatever is stored in the SkyLight property in these cases.
Closes#1787, probably. Only one person bothered providing a sample file.
Closes#1790.
If a chunk fails reading due to an underlying operating system
IO error, we can invoke the retry logic too. No clue what could
cause this to happen beyond hardware faults.
Also lower the sleep time to 0.25s down from 0.5s because half a
second of sleeping for each chunk this happens on seems incredibly
overkill.
Making the nbt code raise a CorruptChunkError in this case also means
that failing to read a chunk due to an IOError is not a fatal error
anymore, it'll simply skip it and move on.
- Replaces exising implementation with a texture that better
resembles the in game block, accounting for its facing & whether
a book has been placed or not
- Replaces existing implementation with a texture that better
resembles the in game block and accounts for its facing & what
surface it is attached to (ceiling, wall, or floor)
- Add all possible variants of mushroom blocks introduced in 1.13
- Render mushroom stems similarly to red/brown mushroom blocks
- Add vine variants where vines are on the upwards facing side
- Use 'lit' property to determine when block is on or off
- Account for facing when generating textures
- Clean up smoker/furnace/dispenser/dropper texture generation code
- Fix extended pistons rendering as if they were retracted
- Fix retracted pistons rendering completely dark when using a
lighting rendermode primitive
- Use piston head 'facing' property to determine rotation
- Use piston head 'type' property to determine if sticky or not
- Add beds with colors other than red
- Use bed 'facing' property to determine bed's rotation
- Use bed 'type' property to determine if the head or foot is rendered
- Correct faulty logic during bed texture generation
- CroppedRegionSet is a Wrapper for RegionSet and should have all of
it's Variables / Parameters
- genPOI sorts a list by (Cropped)RegionSet objects
- The comparing method (__lt__) was correct in CroppedRegionSet but not
in RegionSet. To prevent this issue from happening again, the
RegionSetWrapper now has the regiondir property, too
- Fixes Issue: #1706
- Example config: see below
def testFilter(poi):
if poi['id'] == 'Town':
return poi['name']
def townFilter(poi):
if poi['id'] == 'Town':
return poi['name']
renders["normalrender"] = {
"world": "Test12985",
"title": "Normal Render of Testworld",
'markers': [dict(name="Towns", filterFunction=townFilter), dict(name="Test", filterFunction=testFilter)],
}
renders["secondrender"] = {
"world": "Test12985",
"title": "Second Render of Testworld",
"crop": (180, -230, 220, -260),
'markers': [dict(name="Towns", filterFunction=townFilter), dict(name="Test", filterFunction=testFilter)],
}
Resolves an issue where chests with more than one adjacent chest would
fail to render. Instead of distinguishing double from single chests by
checking for the presence of adjacent chests, use the provided "type"
property of chests to determine if they are single or the left/right
part of a double chest.
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.
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.