0

Merge PR #2004 from stwalkerster

POIs: Add additional tag to search for entities
This commit is contained in:
Nicolas F
2021-12-09 21:27:25 +01:00
committed by GitHub

View File

@@ -130,7 +130,7 @@ def parseBucketChunks(task_tuple):
for b in bucket: for b in bucket:
try: try:
data = rset.get_chunk(b[0], b[1]) data = rset.get_chunk(b[0], b[1])
for poi in itertools.chain(data.get('TileEntities', []), data.get('Entities', [])): for poi in itertools.chain(data.get('TileEntities', []), data.get('Entities', []), data.get('block_entities', [])):
if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign': if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign':
poi = signWrangler(poi) poi = signWrangler(poi)
for name, filter_function in filters: for name, filter_function in filters:
@@ -183,7 +183,7 @@ def handleEntities(rset, config, config_path, filters, markers):
for (x, z, mtime) in rset.iterate_chunks(): for (x, z, mtime) in rset.iterate_chunks():
try: try:
data = rset.get_chunk(x, z) data = rset.get_chunk(x, z)
for poi in itertools.chain(data.get('TileEntities', []), data.get('Entities', [])): for poi in itertools.chain(data.get('TileEntities', []), data.get('Entities', []), data.get('block_entities', [])):
if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign': # kill me if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign': # kill me
poi = signWrangler(poi) poi = signWrangler(poi)
for name, __, filter_function, __, __, __ in filters: for name, __, filter_function, __, __, __ in filters: