From 2cdedab170941d29aaefbbec77d6becf4cec69b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20N=C3=BCcke?= Date: Sun, 28 Sep 2014 12:06:14 +0200 Subject: [PATCH] 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`. --- .../li/cil/oc/common/event/ChunkloaderUpgradeHandler.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/li/cil/oc/common/event/ChunkloaderUpgradeHandler.scala b/src/main/scala/li/cil/oc/common/event/ChunkloaderUpgradeHandler.scala index 603e28d59..ef48f7491 100644 --- a/src/main/scala/li/cil/oc/common/event/ChunkloaderUpgradeHandler.scala +++ b/src/main/scala/li/cil/oc/common/event/ChunkloaderUpgradeHandler.scala @@ -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 {