0
Commit Graph

1403 Commits

Author SHA1 Message Date
Nicolas F
e5ec41fcf9 Revert "textures: remove baffling texture generation logic"
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.
2020-03-02 19:59:18 +01:00
Nicolas F
9895fe875b textures: remove baffling texture generation logic
We used to generate textures multiple times for each worker process,
which didn't seem to be intended as it was done gated behind a reversed
if statement. It just so happened to fix an issue introduced by the
pickling code which was deleting vital attributes like the actual
generated textures.

I'm honestly not sure why this was ever done, so let's just throw this
out and call it a day.

Fixes #1728
2020-02-19 15:06:42 +01:00
Nicolas F
51efdbaa4e overviewer.h: bump extension version 2020-02-14 21:26:34 +01:00
Nicolas F
d8b3183a88 Merge PR 1717 from DragonDev1906 2020-02-14 21:21:58 +01:00
Nicolas F
1d8279243d genPOI: polyline text improvements
Don't require text for polylines/polygons, and support hovertext
by utilising leaflet's tooltips.
2020-02-13 18:35:20 +01:00
Nicolas F
2c92b4acf9 Merge PR 1649 from deltaidea 2020-02-13 17:40:35 +01:00
Nicolas F
6fdf78c35f overviewer.h: bump extension version 2020-02-13 17:36:20 +01:00
Nicolas F
27e63d4aa6 Merge PR 1704 from dgrimreaper 2020-02-13 17:32:30 +01:00
Daniel Grimwood
ede3ac5db4 And the other location for the temporary variables 2020-02-13 19:58:02 +08:00
Daniel Grimwood
1770e2e6cd mmmm temporary variables 2020-02-12 21:50:58 +08:00
Nicolas F
a929b55d4e observer: minor change to LoggingObserver interval
Off-by-one situation and all that.
2020-02-11 19:52:04 +01:00
Nicolas F
6251a6c730 Merge PR #1716 by Auron956 2020-02-11 07:38:43 +01:00
Nicolas F
58ae9dc529 Merge pull request #1670 from robosphinx/patch-1
Change lava ID from 10 to 11 (Fixes issue #1551)
2020-02-11 07:27:00 +01:00
Nicolas F
7097f76476 Merge PR #1720 by DragonDev1906 2020-02-11 07:02:51 +01:00
Nicolas F
021e88dd4a Merge pull request #1699 from sjamesr/py3.4-compat
Fix construct requiring >=Python3.5
2020-02-11 06:52:51 +01:00
Jens
e9bb7d340e Add regiondir property to CroppedRegionSet
- 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)],
}
2020-02-06 20:14:08 +01:00
Auron956
a3960bd419 Fix chest rendering by using 'type' property
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.
2020-02-04 00:16:28 +00:00
Jens
2c6a77b051 Add Barrel Block
- Barrel Block with 6 directions and open/closed state
- One of the missing Blocks in #1613
2020-02-03 18:02:42 +01:00
Cliff Meyers
a29e9ddf20 Track centers by layer instead of by world
This fixes a bug where a world with multiple layers with different
"northdirection" values would initially load at the wrong center point
because the center for the last layer would override prior values
in the overview.collections.centers map.
2019-12-30 19:40:36 -05:00
Daniel Grimwood
de5f27c446 Fixes #1659 by testing both 8 and 9 for water blockid 2019-12-29 15:38:56 +08:00
Nicolas F
9800c58c14 genpoi: add -p/--processes option for parity
People could always set this through the config file, but somehow
not the command line. This commit fixes this oddity by adding the
option to the genPOI script's argument parser.
2019-12-27 15:32:10 +01:00
Nicolas F
bdca0b9250 textures: clean up chest code
- drop 1.14 compatibility
- code style fixes
2019-12-27 14:42:55 +01:00
Nicolas F
19b5f70fda Merge chest fix of Gyzie into 115 2019-12-27 14:25:38 +01:00
Nicolas F
7538eb42c3 1.15 release preparations
- Update texture error string
- Update docs
- Add missing newline at the end of textures.py
2019-12-27 14:23:01 +01:00
Gijs Oortgiese
885fa75f54 Add bee_hive, beenest, honeycom_block and honey_block 2019-12-27 14:17:34 +01:00
Gijs Oortgiese
050f3dbae4 Updated chests to support 1.15 textures 2019-12-27 00:00:44 +01:00
Nicolas F
a9fa06f019 nbt: small optimisation to list reading
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.
2019-12-26 17:28:51 +01:00
James Ring
317cce307f Fix construct requiring >=Python3.5 2019-12-24 16:48:09 +00:00
Nicolas F
0b74d26c49 Completely change biome code again
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.
2019-12-23 23:50:20 +01:00
Nikita Litvin
a3b9493c57 genPOI: support polylines and filled-in polygons
Add support for polyline POIs just like in the good ol'
Google Maps days. See #883.

The format after this commit is:
{ id, x, y, z, text, color, polyline/polygon: [{ x, y, z }, ...] }

Optional properties:
- common ones like "icon" and "hovertext"
- "strokeColor" (string),
- "fill" (boolean)
- "weight" (integer)

Docs not included.

Largely based on PR #1536 by @jsmienk.
Closes #1456, closes #1536, closes #1643.
2019-12-24 01:23:00 +03:00
Nicolas F
2b699d0355 world: fix door block translation code
Fixes #1697.
2019-12-23 19:06:51 +01:00
Nicolas F
ed46082e16 biome: actually use the full range of biome data
Oopsie.
2019-12-23 18:36:24 +01:00
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
Robosphinx
01d51db7a0 Change lava ID from 10 to 11 (Fixes issue #1551) 2019-11-01 17:26:00 -04: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