feat(generator): improve jump generation and block placement logic

Refactor the parkour generator to improve jump accuracy, block placement, and lifecycle management.

- Improve jump calculation by normalizing heading vectors and adjusting height/distance constraints.
- Implement height overrides for tall materials (fences, trapdoors, glass panes) during block placement.
- Add difficulty-based special block generation (packed/blue ice).
- Fix block identity issues by using coordinate-based comparison instead of reference equality for scoring and cleanup.
- Optimize generation lead to reduce unnecessary block generation.
- Update leaderboard logic to only replace scores if the new score is strictly better (higher score or faster time).
- Add error handling for generator ticks to prevent session crashes.

build: update build configuration and dependencies

- Add `run-paper` plugin for easier local server testing.
- Update Gradle wrapper to version 8.14.3.
- Change WorldEdit dependencies to `compileOnly`.
- Configure `runServer` task with Minecraft 1.21.4 and PlaceholderAPI.

fix(ui): improve scoreboard placeholder handling

- Add check for PlaceholderAPI plugin enablement before attempting to use it.
This commit is contained in:
loki5512344 2026-06-07 23:02:01 +02:00
parent fd0ba2cc0e
commit 0b6409397b
15 changed files with 168 additions and 55 deletions

View file

@ -1,6 +1,7 @@
plugins {
id("java")
id("io.github.goooler.shadow") version("8.1.8")
id("xyz.jpenilla.run-paper") version("3.0.2")
}
group = "dev.loki"
@ -90,8 +91,8 @@ dependencies {
implementation("org.bstats:bstats-bukkit:3.2.1")
implementation("com.zaxxer:HikariCP:5.1.0")
implementation("com.mysql:mysql-connector-j:8.3.0")
implementation("com.sk89q.worldedit:worldedit-core:7.3.6")
implementation("com.sk89q.worldedit:worldedit-bukkit:7.3.6")
compileOnly("com.sk89q.worldedit:worldedit-core:7.3.6")
compileOnly("com.sk89q.worldedit:worldedit-bukkit:7.3.6")
// Provided dependencies (plugins)
compileOnly("me.clip:placeholderapi:2.11.6")
@ -119,8 +120,6 @@ tasks.shadowJar {
relocate("io.papermc.lib", "dev.loki.loparkour.lib.paperlib")
relocate("com.google.gson", "dev.loki.loparkour.lib.gson")
relocate("org.bstats", "dev.loki.loparkour.lib.bstats")
relocate("com.sk89q.worldedit", "dev.loki.loparkour.lib.worldedit")
relocate("org.enginehub", "dev.loki.loparkour.lib.enginehub")
// Don't minimize - causes issues with Caffeine's dynamically generated classes
// minimize {
@ -156,5 +155,18 @@ tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
// Run paper server via gradlew runServer
tasks {
runServer {
minecraftVersion("1.21.4")
jvmArgs("-Xms2G", "-Xmx2G")
runDirectory.set(layout.projectDirectory.dir("run"))
downloadPlugins {
modrinth("placeholderapi", "2.11.6")
}
}
}
// Default task
defaultTasks("clean", "build")