0
Commit Graph

243 Commits

Author SHA1 Message Date
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
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
Gijs Oortgiese
885fa75f54 Add bee_hive, beenest, honeycom_block and honey_block 2019-12-27 14:17:34 +01: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
Nicolas F
2b699d0355 world: fix door block translation code
Fixes #1697.
2019-12-23 19:06:51 +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
InrcedibleHolg
17bb942b94 add missing smooth_red_sandstone_stairs 2019-10-27 11:46:20 +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
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
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
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
e2ee37393b world: fix rail orientations
Fixes #1616.
2019-07-29 11:36:23 +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
InrcedibleHolg
419889c1f1 add workstations: blastfurnace, smoker, lectern, loom, stonecutter and grindstone 2019-07-12 21:16:22 +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
6bdcd32a6f world: remove redundant stride 1 in iteration
IRC chairfarters are pedantic.
2019-07-09 18:11:29 +02:00
Nicolas F
8bbe034aad world: use numpy.empty instead of numpy.zeros
Some arrays get completely filled anyway, so we might as well not
use numpy.zeros, and instead choose numpy.empty.
2019-07-09 18:05:15 +02:00
Nicolas F
a5071663cd world: optimise bad block translation code
Makes Overviewer like 45% faster lol
2019-07-09 17:59:40 +02:00
Nicolas F
0b4ad361c3 world: fix those pesky poi warnings 2019-07-06 21:24:58 +02:00
Nicolas F
c34be9ca67 world: add __lt__ method to RegionSet
So turns out genPOI wants to use sorted() so it can use itertools.groupby.

Python 2 somehow just... sorted objects so that groupby (which is basically
the UNIX uniq) could group them properly. Python 3 no longer does this,
so as comparison method let's just compare regiondir strings since that
gives us the desired result.

Fixes #1597.
2019-06-25 19:19:28 +02:00
Andrew Chin
c78b17f6a7 Fix for reading worlds from local dir 2019-06-21 23:35:33 -04:00
Aaron Griffith
248ea42dd2 Merge branch 'master' into python3-fun-times 2019-06-21 22:08:58 -04:00
Nicolas F
f1c7ab93f1 world: remove lit chunk check
Apparently not even chunks of that data version can be relied upon
to have that flag mean anything at all, as the --forceUpgrade and
--eraseCache switches result in a world where chunks are flagged
as not being lit but seemingly do have SkyLight and BlockLight keys.

Concerns #1570.
2019-05-05 15:17:43 +02:00
Nicolas F
9479ac59b4 world: make the chunk populated code even uglier
Fixes #1568.
Fixes #1566.
2019-05-03 15:13:18 +02:00
Nicolas F
c77fcc5fb3 world: fix snowy grass check
pro tip: 'false' == True.
2019-04-30 21:08:00 +02:00
Nicolas F
0d10211d1b world: fix rendering of 1.13 worlds
Fixes #1563.
2019-04-30 19:41:35 +02:00
Nicolas F
0004540a57 world: only render fully formed and lit chunks
Minecraft notes various stages of fetal development that chunks are
in, with the complete ones being "full". Previously, we'd check
against a list of states that are not full to skip a chunk, which
is obviously not future proof, and broke as Mojang updated their
possible range of values for the status field. It's better to
just bail if the status is anything other than "full".

Additionally, a key called "isLightOn" is in the chunk now. This
seemingly determines whether a chunk has been lit. We're also going
to check for this, and bail if it's not. In my tests, I have not yet
seen a single "full" chunk that does not have "isLightOn" set.

Fixes #1558.
2019-04-28 13:41:17 +02:00
Nicolas F
3fc97d131e Add fletching, cartography and smithing tables 2019-04-28 12:55:14 +02:00
InrcedibleHolg
702e4e9e8b added new 1.14 slabs, referencing issue #1560 2019-04-28 10:48:57 +02:00
Nicolas F
8760b040c6 world: ignore poi directory in world dir
This is a new directory added in 1.14 which contains .mca files too.

Since we scan for directories with .mca files to use as RegionSets,
and we don't know how to handle these, just skip them.

Fixes some warnings during rendering.
2019-04-23 14:03:25 +02:00
Nicolas F
bc322fa3e4 world: fix for chunk parsing for 1.14
If there's missing light data, just make up some with an empty array.
2019-04-23 14:03:25 +02:00
Nicolas F
6a1906445c world: space comments correctly 2019-04-07 20:23:32 +02:00
InrcedibleHolg
f1dd70bdec reorder code in world.py 2019-04-07 19:21:12 +02:00
InrcedibleHolg
abc4a858ff double slab fix 2019-04-07 19:21:12 +02:00
InrcedibleHolg
c34638d26d activated red_sandstone_slab, for only half implemented 2019-04-07 08:21:13 +02:00
InrcedibleHolg
8529cc90bd fix upper/lower slab issue for more slab types 2019-04-07 08:05:22 +02:00