0
Commit Graph

234 Commits

Author SHA1 Message Date
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
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
InrcedibleHolg
5df95be17a added: prismarine_brick_stairs, prismarine_slab, dark_prismarine_slab, prismarine_brick_slab 2019-04-06 21:56:30 +02:00
Nicolas F
1ab66dddea fix prismarine stairs
Sorry for the noise in mc_id.h, but somebody decided they want DOS
line endings and I couldn't allow that to happen. When not doing that
put the whole thing into diff, I decided to just fix the indentation
too while I was at it.

Needed bugfixing of some overlooked unsigned char usages for block IDs,
as otherwise the lighting would be scuffed.

Concerns issue #1486.
2019-03-31 19:20:10 +02:00
Nicolas F
f93bc28230 world: fix stair orientations
Concerns issue #1486.

Inner/outer corners apparently have their data from ancil data instead
of Minecraft's stuff, so we might need to fix that in the future.
2019-03-28 16:02:53 +01:00
Nicolas F
79754b367c world: bandaid fix for double stone brick slabs
This code badly needs a rewrite, we're just altering code path and
data all over the place and this isn't okay.
2019-03-25 21:42:08 +01:00
InrcedibleHolg
37dd1bc56c added cut_red_sandstone and chiseled_red_sandstone 2019-03-24 20:12:24 +01:00
Nicolas F
0072eae3f0 world: fix reading old biomes
Some older maps store biomes differently, and we should use this as
a bytes object, not a str object.
2019-03-17 18:13:26 +01:00
Nicolas F
e348a548b6 Initial Python 3 port
Many things work, some don't. Notably, genPOI doesn't work, and
there's some signedness comparison stuff going on in the C extension.

This also completely drops support for Python 2, as maintaining a C
extension for both Python 2 and 3 is a pain and not worth it for the
9 months that Python 2 is still going to be supported upstream.

The documentation needs to be adjusted as well.

All of the few tests we have pass, and rendering a map works, both
with a configuration file and without. We can also use optimizeimages.

Concerns #1528.
2019-03-17 17:57:07 +01:00
Nicolas F
99eebd5b69 world: fix potatoes and carrots growth stages
Concerns #1486

Also get rid of an obviously broken leftover wheat elif.
2019-03-16 17:47:49 +01:00
Nicolas F
f7ab92917f world: fix seed growth stages
Concerns #1486
2019-03-16 17:40:05 +01:00