-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #200 from ToberoCat/faster-clustering
Faster clustering
- Loading branch information
Showing
46 changed files
with
753 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
160 changes: 0 additions & 160 deletions
160
...ain/kotlin/io/github/toberocat/improvedfactions/claims/clustering/ClaimClusterDetector.kt
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
.../main/kotlin/io/github/toberocat/improvedfactions/claims/clustering/ClaimQueryProvider.kt
This file was deleted.
Oops, something went wrong.
89 changes: 0 additions & 89 deletions
89
...ns-base/src/main/kotlin/io/github/toberocat/improvedfactions/claims/clustering/Cluster.kt
This file was deleted.
Oops, something went wrong.
14 changes: 7 additions & 7 deletions
14
...rc/main/kotlin/io/github/toberocat/improvedfactions/claims/clustering/ClusterExtension.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package io.github.toberocat.improvedfactions.claims.clustering | ||
|
||
import io.github.toberocat.improvedfactions.ImprovedFactionsPlugin | ||
import io.github.toberocat.improvedfactions.claims.clustering.position.ChunkPosition | ||
import org.bukkit.entity.Player | ||
|
||
object ClusterExtension { | ||
fun Player.getCurrentClusters(chunkRenderDistance: Int) = location.world?.name?.let { world -> | ||
ChunkPosition(location.chunk.x, location.chunk.z, world) | ||
.getNeighbours(chunkRenderDistance) | ||
.mapNotNull { ImprovedFactionsPlugin.instance.claimChunkClusters.getCluster(it) } | ||
} ?: emptyList() | ||
} | ||
fun Player.getCurrentClusters(chunkRenderDistance: Int) = location.world?.name?.let { world -> | ||
ChunkPosition(location.chunk.x, location.chunk.z, world) | ||
.getNeighbours(chunkRenderDistance) | ||
.mapNotNull { it.getFactionClaim() } | ||
.mapNotNull { ImprovedFactionsPlugin.instance.claimChunkClusters.getCluster(it) } | ||
} ?: emptyList() |
6 changes: 6 additions & 0 deletions
6
...ase/src/main/kotlin/io/github/toberocat/improvedfactions/claims/clustering/ClusterType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package io.github.toberocat.improvedfactions.claims.clustering | ||
|
||
enum class ClusterType { | ||
FACTION, | ||
ZONE | ||
} |
Oops, something went wrong.