Skip to content

Commit

Permalink
fix: prevent map render lags
Browse files Browse the repository at this point in the history
  • Loading branch information
acrylic-style committed Jul 25, 2024
1 parent 5d4c736 commit c7be9f1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "net.azisaba"
version = "1.15.2+6.16.0"
version = "1.15.2+6.16.1"

java {
toolchain.languageVersion.set(JavaLanguageVersion.of(8))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/mori01231/lifecore/LifeCore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class LifeCore : JavaPlugin() {
}
}
}
}, 100, 100)
}, 200, 200)

logger.info("LifeCore has been enabled.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SerializedMapDataRenderer(private val canvas: SerializedMapCanvas) : MapRe
private var init = false

override fun render(view: MapView, canvas: MapCanvas, player: Player) {
if (init) return
this.canvas.injectToCraftMapCanvas(canvas as CraftMapCanvas)
for (i in 0 until canvas.cursors.size()) {
canvas.cursors.removeCursor(canvas.cursors.getCursor(i))
Expand All @@ -23,5 +24,6 @@ class SerializedMapDataRenderer(private val canvas: SerializedMapCanvas) : MapRe
worldMap.flagDirty(x, y)
}
}
init = true
}
}

0 comments on commit c7be9f1

Please sign in to comment.