Instead of trusting that Minecraft will only request up to index
num_palette_entries - 1, we'll assume Mojang occasionally produces
a weird file where it tries to request past that, up to the maximum
palette index it can based on the bits per value. To facilitate this,
this commit extends the translation palette array to this maximum size.
Such invalid palette picks will simply be replaced by ID 0 (aka air),
so it should cause minimal weirdness in the output.
Works around #1797.
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.
using rem here is probably wrong because we want to be the height
of the line in the span we're inside of, not of some global thing.
Also, add a margin to the left.
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
the code that calls handleEntities in genPOI was building a list
of all filter funcs in the config, then used itertools.groupby to walk over
each region set, calling handleEntities and passing filters funcs for the rset.
this works fine when all of the renders point at a different world,
since rsets are sorted via __lt__ using the regiondir. when an rset appears in
the config multiple times, groupby can't sort the rsets reliably,
so a single rset is passed multiple times to handleEntities with only some
of the applicable filters. for a config with just two renders of the same world,
handleEntities would frequently be called 5-7 times instead of just 2.
this change eliminates group by, and just iterates over all the rsets, each
time plucking the list of applicable filters based on rset associated with
each filter (simple equality).
use json.dumps(sort_keys=True) to apply a consistent sorting to the output JS files.
improves the readability of diffs and making config testing easier
Sometimes people's texture packs contain weird things, and it'd
be good if instead of throwing an unhandled IOError, we raise
a TextureException with the filename in it.
Also, make verbose mode actually run find_file in verbose mode,
which is useful for finding where Overviewer loaded that texture
file from.
This reverts commit 9895fe875b.
The original code was correct, but confusing. Overviewer did regenerate
the texture in each worker process because Python pickling is incredibly
fragile fucking garbage designed by idiots who have no clue of what
a good language looks like.