Trying to find entity editor bug
This commit is contained in:
@@ -118,14 +118,14 @@ class EntityPanel(QWidget):
|
||||
chunk = self.parent.map.getChunkAtWorldPos(*position)
|
||||
if chunk is None:
|
||||
return
|
||||
|
||||
localX = position[0] - chunk.x
|
||||
localY = position[1] - chunk.y
|
||||
localZ = position[2] - chunk.z
|
||||
|
||||
|
||||
localX = (position[0] - chunk.x) % CHUNK_WIDTH
|
||||
localY = (position[1] - chunk.y) % CHUNK_HEIGHT
|
||||
localZ = (position[2] - chunk.z) % CHUNK_DEPTH
|
||||
|
||||
for ent in chunk.entities.values():
|
||||
if ent.localX != localX or ent.localY != localY or ent.localZ != localZ:
|
||||
continue
|
||||
continue
|
||||
self.onEntitySelect(ent)
|
||||
self.entityList.setCurrentItem(ent.item)
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user