0
Commit Graph

1370 Commits

Author SHA1 Message Date
Nicolas F
e7c9a2c49e biome: fix biome reading code
Fixes #1696.
2019-12-23 18:31:30 +01:00
Nicolas F
64edf65aa5 biome: fix biomes for chunks at Y=16
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.
2019-12-11 19:15:56 +01:00
Nicolas F
37ad13dba7 biome: for Y -1, return the first biome
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.
2019-12-11 18:43:16 +01:00
Nicolas F
76bbabb7de fix various logging.warn calls
Those are deprecated in favour of logging.warning now.
2019-12-11 18:42:35 +01:00
Nicolas F
268938a706 Fix biomes for Minecraft 1.15
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.
2019-12-10 23:12:16 +01:00
Florian Graf
19086b3ea5 Fixed incorrect rendering of blocks (issue #1578)
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.
2019-12-07 20:50:37 +01:00
Ian Salmons
9e27e6adc9 add composter 2019-11-01 11:45:00 +01:00
InrcedibleHolg
3c3e958eae add bamboo 2019-11-01 10:50:20 +01:00
Nicolas F
3d31347e9b observer: create outputdir if it doesn't exist
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.
2019-10-27 20:19:07 +01:00
InrcedibleHolg
17bb942b94 add missing smooth_red_sandstone_stairs 2019-10-27 11:46:20 +01:00
InrcedibleHolg
fa954714ae adapt id for bamboo sapling 2019-10-27 09:36:43 +01:00
Florian Graf
935bdb847d feat: added 1.14 scaffolding block 2019-10-27 09:10:55 +01:00
InrcedibleHolg
20fde52236 add new stone walls 2019-10-27 09:07:00 +01:00
Nicolas F
240a02a2dc Merge pull request #1663 from Esvandiary/fix/go-to-hash-layers
Web: Fix multiple layers being added on page load if a non-default layer is in the hash
2019-10-26 21:56:40 +02:00
Nicolas F
d07c2e708b Merge pull request #1634 from Gyzie/saplings_rework
Created seperate sapling blocks and added bamboo_sapling
2019-10-26 21:52:59 +02:00
Andy Martin
17e3e48928 goToHash: set current layer before firing worldCtrl's onChange event so the correct layer is added 2019-10-26 13:36:46 +01:00
Nicolas F
79a5668bd2 genPOI: handle more uuidcache.dat corruption
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.
2019-10-26 02:41:56 +02:00
Nicolas F
71d59be4b9 tileset: fix changelist option for Python 3
Turns out os.write only accepts bytes!
2019-09-11 21:00:34 +02:00
Nicolas F
4f619cbaef world: also allow chunks of status "spawn"
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.
2019-08-26 19:37:12 +02:00
Gijs Oortgiese
7342085140 Created seperate sapling blocks and added bamboo_sapling 2019-08-21 09:44:37 +02:00
Nicolas F
3498641d4e Merge rebased sign changes from Gyzie's 1-14-signs (#1627) 2019-08-19 12:36:57 +02:00
Gijs Oortgiese
f73e5d92ff Added sign variants added in 1.14 2019-08-19 12:35:56 +02:00
InrcedibleHolg
cdcb88b0f2 Implement new stairs fix stone stairs and slabs
added code change requests by @CounterPillow
2019-08-17 11:09:03 +02:00
Nicolas F
3b96158fb4 Implement smooth sandstone stairs 2019-08-06 14:26:03 +02:00
Nicolas F
b28073c3a7 Increase overviewer C extension version to 71 2019-08-02 17:12:04 +02:00
Nicolas F
467dc728b8 Merge branch 'add-lantern' of IncredibleHolg/Minecraft-Overviewer (#1617) 2019-08-02 17:03:40 +02:00
InrcedibleHolg
a5d9787071 Lantern implemented
enforcing coding style
2019-07-30 14:43:04 +02:00
Nicolas F
15f18812d5 observer: use == 0, not is 0
Who thought that was a good idea?
2019-07-29 16:51:52 +02:00
Nicolas F
e2ee37393b world: fix rail orientations
Fixes #1616.
2019-07-29 11:36:23 +02:00
Nicolas F
0d3d630104 Get rid of config global state, improve tests
While dicking around with the tests I noticed that you could make
them fail if you ran them twice. Many hours were spent investigating,
and it turns out that Overviewer's config stuff has global state that
gets modified by having parsed configurations actually modify the
default config values. Not good!

We can fix this by having settingsDefinition return a dict of the
defaults, instead of assigning it to module-level names.

We can also get rid of test_all.py, because what it would do with
pytest is run all tests *twice*. Instead, do the module path stuff
in __init__.py. Also, instead of throwing a non-specific Exception
if exmaple isn't checked out, just skip the test thank you very much.

This is the weirdest rabbit hole I've ever gone down and I haven't
slept in about 30 hours. I'm going to push this commit, and if it
breaks anything, I'll be blissfully asleep as the unwashed masses
begin to riot over exception this traceback that.
2019-07-24 17:02:39 +02:00
Nicolas F
0bb823599d assetmanager: code style fixes 2019-07-24 09:49:25 +02:00
Nicolas F
cf74500efa dispatcher: code style fixes 2019-07-24 09:35:52 +02:00
Nicolas F
da80e50022 observer: code style fixes 2019-07-24 09:23:36 +02:00
Nicolas F
01f30de176 remove vestigial python2 references 2019-07-24 09:20:49 +02:00
Nicolas F
c13d3aae3c rename configParser to config_parser
CamelCase does not bode well in Python land, so it's best we rename
these ill-named files before the Guidoists get us and throw us into
a damp dungeon.
2019-07-24 09:18:02 +02:00
Nicolas F
f314de1403 configParser: code style and string changes
It's now PEP8 compliant! Also we can remove an unused optparse
import (wtf?) and let logging.error do the string formatting lazily.
2019-07-24 05:35:40 +02:00
Nicolas F
7e2cb56c1b Implement some mossy blocks
This adds:
- mossy stone brick stairs
- mossy cobblestone stairs
- mossy stone brick walls

We also add another block class for walls, and while we're at it,
clean up the stairs texture function to not have a huge sprawling
elif mess for loading textures, but instead to a cheeky dictionary
lookup.

In case you're wondering, yes I am just as disgusted by this code as
you are.
2019-07-15 17:23:25 +02:00
Nicolas F
634e13c92c Merge branch 'workstations' of https://github.com/IncredibleHolg/Minecraft-Overviewer 2019-07-13 17:37:58 +02:00
Nicolas F
a422270666 Add force_writable argument to mirror_dir
Fixes #1611.
2019-07-12 23:37:35 +02:00
InrcedibleHolg
419889c1f1 add workstations: blastfurnace, smoker, lectern, loom, stonecutter and grindstone 2019-07-12 21:16:22 +02:00
Nicolas F
70c64cd4c5 overviewer_core/__init__: code style fixes 2019-07-12 17:55:30 +02:00
Nicolas F
f6937fe6a3 signals: whitespace fixes 2019-07-12 17:48:32 +02:00
Nicolas F
07cb05f4d8 observer: don't divide by zero in RConObserver
If no tiles needed to be updated, RConObserver would divide by zero,
which is less than ideal.

Fixes #1422.
2019-07-12 17:37:58 +02:00
Nicolas F
a9aabab790 util.js: actually run the ready queue
Fixes #1466 I hope.
2019-07-12 17:25:29 +02:00
Nicolas F
106d332136 Catch KeyboardInterrupt so we don't barf a trace
Concerns issue #1531.

Future work can actually try to save state in this case, but especially
with multiprocessing, that might become a bit hairy.
2019-07-12 17:15:51 +02:00
Nicolas F
402d35fefc util.js: remove some obsolete stuff
A few debug console.log statements got the axe too, because I
felt like it.
2019-07-12 16:55:47 +02:00
Nicolas F
4d27cf3dfc util.js: don't specify a map minzoom of 0
Who put this here? Why? Whatever.

Fixes #1590.
2019-07-12 16:43:05 +02:00
Nicolas F
4dc2c8a5b7 world: add __lt__ to RegionSetWrapper for genPOI
genPOI needs this for groupby, and since we can now throw cropped
regionsets into genPOI we definitely need this too.

Probably also fixes rotated regionsets with multiple genPOI filters.
2019-07-12 16:32:07 +02:00
Nicolas F
033d75b08e genPOI: respect crop option
Use CroppedRegionSets to generate markers, which should only affect
handleEntities. I have not yet checked whether this generates
dupicate players and manualpois for maps with multiple crop zones,
but that's a fire to put out for another day.

Fixes #1574.
2019-07-12 16:04:28 +02:00
Nicolas F
aeeaadd5bb Bump C extension version to 68 2019-07-12 15:27:42 +02:00