mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-11 16:28:12 -04:00
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:
parent
32ebe03ace
commit
2cdedab170
@ -60,7 +60,7 @@ object ChunkloaderUpgradeHandler extends LoadingCallback {
|
|||||||
|
|
||||||
def updateLoadedChunk(loader: UpgradeChunkloader) {
|
def updateLoadedChunk(loader: UpgradeChunkloader) {
|
||||||
val centerChunk = new ChunkCoordIntPair(math.floor(loader.owner.xPosition).toInt >> 4, math.floor(loader.owner.zPosition).toInt >> 4)
|
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 => {
|
loader.ticket.foreach(ticket => {
|
||||||
ticket.getChunkList.collect {
|
ticket.getChunkList.collect {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user