There's some stuff left to do, like properly do the functools.partial
stuff, and check that the uuidcache is actually working. But hey,
player markers work at least, and so does --skip-scan.
Still needs a port to argparse though.
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.
Apparently TileEntities can just not even exist now, and the same
goes for the player Dimension key. For the latter, I'm not sure
whether the fallback is correct, but it's a guess I suppose.
Hopefully addresses #1480.
Entries in the uuidcache will now be considered expired if they were
retrieved before the mtime of the player dat file. This follows the
recommendation made in issue #1279.
Minecraft now uses minecraft:sign as its id for signs, but also uses
Sign for older versions or chunks that have not yet been updated.
Change the genPOI sign wrangling code and the documentation to reflect
this change.
Fixes#1340.
Previously, the files were not closed after reading or writing;
by using a "with" statement, the file handles will be closed as
soon as they go out of scope.
Possible fix for #1271.
* When reading the cache, catch some errors on load, instead of crashing
* When writing to cache, write to tmp file, then move it into place.
This should be more robust if a ctrl+c is recieved while writing the
cache
Addresses #1266
There is no point in ignoring an invalid point, because without an error
message the user might wonder, why it's poyline doesn't look the way it
should.
One should use isinstance instead of `type(A) ==` because of
inheritance.
There should be an exception if a list of `elif`s don't match.
Make Polyline not only accept tuples, but any iterable.
Instead of reading all Players and especially Entities and TileEntities
into RAM and than applying the filter functions onto them, filter
functions are used after each parsed chunk to get only the markers of
this chunk and not all Entities.
This reduced the RAM usage dramatically:
On a 233 MB map over 200 MB of RAM was used before.
Using these changes (and only having two filter functions for signs) not
more than 36 MB of RAM was used.
Since all the POIs are created from different lists, multiple for loops
were used. With itertools.chain these lists can be looped over with only
one for loop thus removing doubled code.
The code creating the actual marker dict out of the entity and the
result of the filter function was almost the same for every set of
entities. Thus it is now a function.