0
Commit Graph

1278 Commits

Author SHA1 Message Date
InrcedibleHolg
702e4e9e8b added new 1.14 slabs, referencing issue #1560 2019-04-28 10:48:57 +02:00
Nicolas F
e25557d257 textures: fix stone slabs for 1.14 2019-04-26 04:11:20 +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
6f680aa287 Revert "web: fix goToHash on layer change"
This reverts commit 2186d08c32.

Fixes #1553.
2019-04-21 18:02:19 +02:00
Nicolas F
134d6063bf primitives: misc char -> short fixes 2019-04-07 20:25:53 +02:00
Nicolas F
6a1906445c world: space comments correctly 2019-04-07 20:23:32 +02:00
Nicolas F
bd40aeda3d textures: set prismarine slabs to transparent
This fixes upper slabs removing the block below them.
2019-04-07 20:21:45 +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
aheadley
2186d08c32 web: fix goToHash on layer change
Fixes #1548.
2019-03-28 16:07:30 +01: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
Wunkolo
4b0b50f215 Implement style fixes 2019-03-18 14:04:36 -07:00
Wunkolo
62dcfab7a0 Fix block_class_is_subset linkage 2019-03-17 20:21:03 -07:00
Wunkolo
121b0d96ab Increment extension version 2019-03-17 18:48:06 -07:00
Wunkolo
26bd4d120a Fix implicit declaration 2019-03-17 18:46:45 -07:00
Wunkolo
1271772aa1 Collapse special case logic to block_class_is_subset
Thanks demorgan's law
2019-03-17 18:02:44 -07:00
Wunkolo
5ff6a6400e Convert case switch to block_class_is_subset 2019-03-17 17:57:18 -07:00
Wunkolo
ee9a3411ba block_class_is_subset implementation pass 2019-03-17 17:33:30 -07:00
Wunkolo
2c3d54ea5d Implement block_class header 2019-03-17 15:09:33 -07:00
Wunkolo
eb9d6a98e5 Increment overviewer extension version 2019-03-17 12:05:32 -07:00
Wunkolo
50f12827f5 Block ID enum pass 2019-03-16 22:42:08 -07:00
Wunkolo
4d4df31ece Block ID to mc_id replacement pass 2019-03-16 21:15:08 -07:00
Wunkolo
7e97544f4d First pass mc_id enum implementation 2019-03-16 20:21:44 -07: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
Nicolas F
061406ca55 world: fix mossy cobblestone block/wall rendering
Concerns #1486

I need some high-proof alcohol.
2019-03-16 17:07:35 +01:00
Nicolas F
dd6e69189f world: fix petrified_oak_slab rendering
Concerns #1486
2019-03-16 16:50:15 +01:00
Nicolas F
6aaf680c8c settingsValidators: fix code style, adjust strings
Some absolute thonkers in here like two-spaces indent code. Yikes
my man.
2019-03-15 16:48:08 +01:00
Jeroen Smienk
84938213dd Simplified finding spawn Y
Simplified finding the first air block above saved spawn Y by removing the function and looping through the sections once.
2019-03-11 14:52:29 +01:00
Nicolas F
c9b506a58c genPOI: fix code style
One code style error can't really be fixed because despite
has_key being deprecated, "in" doesn't work on "super" for objects
that derive from dict, at least not in Python 2.7. Thanks Guido.

Also, I don't know which one of you it is that keeps putting semicolons
at the end of your statements but you seriously need to stop.
2019-03-10 18:05:32 +01:00
Nicolas F
a551795969 optimizeimages: fix code style 2019-03-07 15:50:59 +01:00
Nicolas F
ec63aa55b6 util: fix code style 2019-03-07 15:49:37 +01:00
Nicolas F
fc88572aa3 cache: fix code style 2019-03-07 15:43:01 +01:00
Nicolas F
94aa49019c logger: code style fixes 2019-03-07 15:33:28 +01:00
Nicolas F
61ebd35240 Add WebP image format support
Since Firefox 65 added support for WebP, users may be interested
in having maps that use WebP images. Support for this is added in
this commit, along with documentation for it.

A new option, "imglossless", controls whether we write out lossless
or lossy WebP images. The generic name "imglossless" as opposed to
a more specific "webplossless" was chosen in case future image
formats we also implement also support lossless/lossy modes in the
same format (JPEG-XL? AV1 image format?).

It's an okay meme but lossy mode really falls apart on our sorts
of images on the more zoomed out composite tiles, resulting in
pretty blurry messes. Might be due to a PSNR bias in the encoder,
which is to be expected from Google.
2019-03-04 17:04:09 +01:00
Nicolas F
7f63dfe315 tileset: drastic code style fixes
We've also added a setup.cfg to specify what rules we want for
pycodestyle. We'll be ignoring some dumb ones that make no sense
and probably shouldn't exist, like both W503 and W504 being an
issue somehow???????

We're using a line length limit of 100. If you're on an 80 character
terminal and incredibly upset about this, then that's the nursing
home staff's problem, not ours.
2019-03-03 16:47:35 +01:00
Nicolas F
846b7ab8f8 nbt: code style fixes
We're ignoring E221 and E741 since I disagree with them; I think extra
whitespace around operators to align repeated operations can aid
readability and help spot bugs.

This was mostly whitespace issues, e.g. trailing whitespace and
a single space on blank lines.
2019-03-02 15:47:13 +01:00
Nicolas F
336850ea04 observer: drastic code style fixes
I've used pycodestyle to find pep8 violations, and isort to fix import
sorting.

Currently we're looking at a max line length of 80, but I think we may
want to raise this to 100 because 80 is a pain in the butt.
2019-03-02 15:32:25 +01:00
Nicolas F
715b3a2d43 progressbar: actually flush the fd on update
A young software tinkerer from Switzerland noticed an issue with
an application he was working on one day. The progress bar it
was rendering only updated very rarely. This perplexed the teenager,
but never bugged him enough to investigate further. Nobody else seemed
to notice this, so maybe it was his system?

Fast forward a few years. The young man is now a 24 year old fully
grown manchild. The progress bar was still updating only very rarely.
On this rainy afternoon, the tinkerer had nothing else to do than
finally get to the bottom of this perplexing behaviour.

Much investigating was done. Did the Observer have a logic bug? No,
if we check in the update function by appending a line to a file,
we can see that it works properly. Besides, the logic of this piece
of code surely hasn't been changed for years.

Did maxvalue get set to 100 instead of the number of tiles? No, it
correctly overrode the right method to not just set max_value but
also maxvalue. (Great naming there, aheadley.)

Was it the polymorphic inheritance causing issues then? No, even the
parent class correctly behaved in its update function. Well, almost.
That is when the developer came upon a shocking revelation. His hands
trempled as his fingers moved across the laptop's keyboard, nearly
accidentally entering the "nuclear missile launch" mode in Kate's
Vi-Input editing. The developer added one line to the file.

self.fd.flush()

The progress bar finally worked as intended.
2019-03-01 14:36:28 +01:00
Nicolas F
311d3eacc2 web: add layer fallback to goToHash
With the changes to things being indexed by path instead of name,
old hashes would stop working. To make this a bit less jarring, we
can fall back to the default tileset of a world, which means the
map would still load.
2019-02-28 13:37:19 +01:00
Nicolas F
b57db703ae web: fix overlays showing up for all base layers
Overlays should only show up for the base layers they apply to,
however, we've had them show up for all base layers in a world.

To fix this, we first change things to be indexed by the unique path,
not the human-readable name (which is not supposed to be always unique).

Then, we remove and add overlay layers to the layerCtrl as needed on a
baselayerchange event.
2019-02-27 14:22:18 +01:00
Aaron Griffith
28f924621b do block state unpacking with numpy slices, not loops
For posterity, my testbench used to make sure this implementation
yields identical results:

https://gist.github.com/agrif/a34efb8e0b534f0309415c9af4872a69
2019-02-22 12:11:37 -05:00
Nicolas F
b70f1a012f Fix C extension build warnings the painful way
Some bad distributions (Debian) apparently are not good enough to
have a Pillow version from this decade packaged.

Therefore, we need to do it the painful way of prefixing our
symbols and refactoring everything to use them.

A new header file called "utils.h" has been added for this purpose,
and it is included in "overviewer.h".

The following macros have been prefixed with "OV_":
- MIN
- MAX
- CLAMP
- BLEND
- MULDIV255

Additionally, the C extension version was bumped to 56 because 55
was reverted back to 54.
2019-02-22 12:53:47 +01:00