Made the loaded chunks a set, because I don't trust it to not be dynamically re-generated each time it's accessed by contains.

This commit is contained in:
Florian Nücke 2014-09-28 12:06:14 +02:00
parent 32ebe03ace
commit 2cdedab170

View File

@ -60,7 +60,7 @@ object ChunkloaderUpgradeHandler extends LoadingCallback {
def updateLoadedChunk(loader: UpgradeChunkloader) {
val centerChunk = new ChunkCoordIntPair(math.floor(loader.owner.xPosition).toInt >> 4, math.floor(loader.owner.zPosition).toInt >> 4)
val robotChunks = (for (x <- -1 to 1; z <- -1 to 1) yield new ChunkCoordIntPair(centerChunk.chunkXPos+x, centerChunk.chunkZPos+z))
val robotChunks = (for (x <- -1 to 1; z <- -1 to 1) yield new ChunkCoordIntPair(centerChunk.chunkXPos + x, centerChunk.chunkZPos + z)).toSet
loader.ticket.foreach(ticket => {
ticket.getChunkList.collect {