diff --git a/.github/translation-checker/index.js b/.github/translation-checker/index.js index aae8347c..e62f87d1 100644 --- a/.github/translation-checker/index.js +++ b/.github/translation-checker/index.js @@ -80,7 +80,7 @@ function parse(str) { return nodes; } -const langFolder = "../../BlueMapCommon/webapp/public/lang/"; +const langFolder = "../../common/webapp/public/lang/"; const languageFiles = readdirSync(langFolder).filter( (f) => f.endsWith(".conf") && f !== "settings.conf" ); diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d6c40571..c93a7cfd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,13 +23,10 @@ jobs: uses: actions/setup-java@v4 with: distribution: 'temurin' - java-version: | - 16 - 17 - 21 + java-version: 21 cache: 'gradle' - name: Build with Gradle - run: ./gradlew clean spotlessCheck test build + run: ./gradlew spotlessCheck test release --stacktrace - uses: actions/upload-artifact@v4 with: name: artifacts diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index ea1c492a..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Publish - -on: - workflow_dispatch: - push: - tags: - - "**" - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - fetch-depth: 0 # needed for versioning - - name: Set up Java - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: | - 16 - 17 - 21 - cache: 'gradle' - - name: Build with Gradle - run: ./gradlew clean :BlueMapCore:publish :BlueMapCommon:publish - env: - BLUECOLORED_USERNAME: ${{ secrets.BLUECOLORED_USERNAME }} - BLUECOLORED_PASSWORD: ${{ secrets.BLUECOLORED_PASSWORD }} diff --git a/.gitignore b/.gitignore index a211e5a7..4d9a4f73 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ doc/ logs/ .run/ run/ +runs/ node_modules/ .classpath @@ -17,8 +18,8 @@ node_modules/ release.md # exclude generated resource -BlueMapCommon/src/main/resources/de/bluecolored/bluemap/webapp.zip -BlueMapCore/src/main/resources/de/bluecolored/bluemap/resourceExtensions.zip +common/src/main/resources/de/bluecolored/bluemap/webapp.zip +core/src/main/resources/de/bluecolored/bluemap/resourceExtensions.zip #exclude-test-data data/test-render diff --git a/.gitmodules b/.gitmodules index 206668b2..31a1d950 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "BlueMapAPI"] - path = BlueMapAPI + path = api url = https://github.com/BlueMap-Minecraft/BlueMapAPI diff --git a/BlueMapAPI b/BlueMapAPI deleted file mode 160000 index ec977113..00000000 --- a/BlueMapAPI +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ec977113495dacd6f2e24239015f4b94b305fc52 diff --git a/BlueMapCommon/build.gradle.kts b/BlueMapCommon/build.gradle.kts deleted file mode 100644 index 24e448fc..00000000 --- a/BlueMapCommon/build.gradle.kts +++ /dev/null @@ -1,148 +0,0 @@ -import com.github.gradle.node.npm.task.NpmTask -import java.io.IOException - -plugins { - java - `java-library` - `maven-publish` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.5.0" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore -val lastVersion = System.getProperty("bluemap.lastVersion") ?: "?" // set by BlueMapCore - -val javaTarget = 16 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - withSourcesJar() - withJavadocJar() -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://repo.bluecolored.de/releases") -} - -dependencies { - api ("com.mojang:brigadier:1.0.17") - - api ("de.bluecolored.bluemap:BlueMapCore") - - compileOnly ("org.jetbrains:annotations:16.0.2") - compileOnly ("org.projectlombok:lombok:1.18.32") - - annotationProcessor ("org.projectlombok:lombok:1.18.32") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.javadoc { - options { - (this as? StandardJavadocDocletOptions)?.apply { - links( - "https://docs.oracle.com/en/java/javase/16/docs/api/", - "https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/", - "https://javadoc.io/doc/com.google.code.gson/gson/2.8.0/", - ) - addStringOption("Xdoclint:none", "-quiet") - addBooleanOption("html5", true) - } - } -} - -node { - version.set("20.14.0") - download.set(true) - nodeProjectDir.set(file("webapp/")) -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.clean { - doFirst { - if (!file("webapp/dist/").deleteRecursively()) - throw IOException("Failed to delete build directory!") - } -} - -tasks.register("buildWebapp", type = NpmTask::class) { - dependsOn ("npmInstall") - args.set(listOf("run", "build")) - - inputs.dir("webapp/") - outputs.dir("webapp/dist/") -} - -tasks.register("zipWebapp", type = Zip::class) { - dependsOn ("buildWebapp") - from (fileTree("webapp/dist/")) - archiveFileName.set("webapp.zip") - destinationDirectory.set(file("src/main/resources/de/bluecolored/bluemap/")) - - inputs.dir("webapp/dist/") - outputs.file("src/main/resources/de/bluecolored/bluemap/webapp.zip") -} - -//always update the zip before build -tasks.processResources { dependsOn("zipWebapp") } -tasks.getByName("sourcesJar") { dependsOn("zipWebapp") } - -publishing { - repositories { - maven { - name = "bluecolored" - - val releasesRepoUrl = "https://repo.bluecolored.de/releases" - val snapshotsRepoUrl = "https://repo.bluecolored.de/snapshots" - url = uri(if (version == lastVersion) releasesRepoUrl else snapshotsRepoUrl) - - credentials { - username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME") - password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD") - } - } - } - publications { - create("maven") { - groupId = project.group.toString() - artifactId = project.name - version = project.version.toString() - - from(components["java"]) - - versionMapping { - usage("java-api") { - fromResolutionOf("runtimeClasspath") - } - } - } - } -} diff --git a/BlueMapCommon/settings.gradle.kts b/BlueMapCommon/settings.gradle.kts deleted file mode 100644 index a876bfa9..00000000 --- a/BlueMapCommon/settings.gradle.kts +++ /dev/null @@ -1,4 +0,0 @@ -rootProject.name = "BlueMapCommon" - -includeBuild("../BlueMapAPI") -includeBuild("../BlueMapCore") \ No newline at end of file diff --git a/BlueMapCore/build.gradle.kts b/BlueMapCore/build.gradle.kts deleted file mode 100644 index b11881f6..00000000 --- a/BlueMapCore/build.gradle.kts +++ /dev/null @@ -1,179 +0,0 @@ -import java.io.IOException -import java.util.concurrent.TimeoutException - -plugins { - java - `java-library` - `maven-publish` - id("com.diffplug.spotless") version "6.1.2" -} - -fun String.runCommand(): String = ProcessBuilder(split("\\s(?=(?:[^'\"`]*(['\"`])[^'\"`]*\\1)*[^'\"`]*$)".toRegex())) - .directory(projectDir) - .redirectOutput(ProcessBuilder.Redirect.PIPE) - .redirectError(ProcessBuilder.Redirect.PIPE) - .start() - .apply { - if (!waitFor(10, TimeUnit.SECONDS)) { - throw TimeoutException("Failed to execute command: '" + this@runCommand + "'") - } - } - .run { - val error = errorStream.bufferedReader().readText().trim() - if (error.isNotEmpty()) { - throw IOException(error) - } - inputStream.bufferedReader().readText().trim() - } - -val gitHash = "git rev-parse --verify HEAD".runCommand() -var clean = false; -try { - clean = "git status --porcelain".runCommand().isEmpty(); -} catch (ex: TimeoutException) { - println("Failed to run 'git status --porcelain', assuming dirty version.") -} -val lastTag = if ("git tag".runCommand().isEmpty()) "" else "git describe --tags --abbrev=0".runCommand() -val lastVersion = if (lastTag.isEmpty()) "dev" else lastTag.substring(1) // remove the leading 'v' -val commits = "git rev-list --count $lastTag..HEAD".runCommand() -println("Git hash: $gitHash" + if (clean) "" else " (dirty)") - -group = "de.bluecolored.bluemap" -version = lastVersion + - (if (commits == "0") "" else "-$commits") + - (if (clean) "" else "-dirty") - -System.setProperty("bluemap.version", version.toString()) -System.setProperty("bluemap.lastVersion", lastVersion) -println("Version: $version") - -val javaTarget = 16 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - withSourcesJar() - withJavadocJar() -} - -repositories { - mavenCentral() - maven ("https://repo.bluecolored.de/releases") -} - -@Suppress("GradlePackageUpdate") -dependencies { - api ("com.github.ben-manes.caffeine:caffeine:3.1.8") - api ("org.spongepowered:configurate-hocon:4.1.2") - api ("org.spongepowered:configurate-gson:4.1.2") - api ("de.bluecolored.bluenbt:BlueNBT:2.3.0") - api ("org.apache.commons:commons-dbcp2:2.9.0") - api ("io.airlift:aircompressor:0.24") - api ("org.lz4:lz4-java:1.8.0") - - api ("de.bluecolored.bluemap:BlueMapAPI") - - compileOnly ("org.jetbrains:annotations:23.0.0") - compileOnly ("org.projectlombok:lombok:1.18.32") - - annotationProcessor ("org.projectlombok:lombok:1.18.32") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") - testCompileOnly ("org.projectlombok:lombok:1.18.32") - testAnnotationProcessor ("org.projectlombok:lombok:1.18.32") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.javadoc { - options { - (this as? StandardJavadocDocletOptions)?.apply { - links( - "https://docs.oracle.com/en/java/javase/16/docs/api/", - "https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/", - "https://javadoc.io/doc/com.google.code.gson/gson/2.8.0/", - ) - addStringOption("Xdoclint:none", "-quiet") - addBooleanOption("html5", true) - } - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - outputs.upToDateWhen { false } - from("src/main/resources") { - include("de/bluecolored/bluemap/version.json") - duplicatesStrategy = DuplicatesStrategy.INCLUDE - - expand ( - "version" to project.version, - "gitHash" to gitHash + if (clean) "" else " (dirty)", - ) - } -} - -tasks.register("zipResourceExtensions", type = Zip::class) { - from(fileTree("src/main/resourceExtensions")) - archiveFileName.set("resourceExtensions.zip") - destinationDirectory.set(file("src/main/resources/de/bluecolored/bluemap/")) - outputs.upToDateWhen{ false } -} - -//always update the zip before build -tasks.processResources { dependsOn("zipResourceExtensions") } -tasks.getByName("sourcesJar") { dependsOn("zipResourceExtensions") } - -publishing { - repositories { - maven { - name = "bluecolored" - - val releasesRepoUrl = "https://repo.bluecolored.de/releases" - val snapshotsRepoUrl = "https://repo.bluecolored.de/snapshots" - url = uri(if (version == lastVersion) releasesRepoUrl else snapshotsRepoUrl) - - credentials { - username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME") - password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD") - } - } - } - publications { - create("maven") { - groupId = project.group.toString() - artifactId = project.name - version = project.version.toString() - - from(components["java"]) - - versionMapping { - usage("java-api") { - fromResolutionOf("runtimeClasspath") - } - } - } - } -} diff --git a/BlueMapCore/settings.gradle.kts b/BlueMapCore/settings.gradle.kts deleted file mode 100644 index 82c6709b..00000000 --- a/BlueMapCore/settings.gradle.kts +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "BlueMapCore" \ No newline at end of file diff --git a/HEADER b/LICENSE_HEADER similarity index 100% rename from HEADER rename to LICENSE_HEADER diff --git a/api b/api new file mode 160000 index 00000000..8e14a344 --- /dev/null +++ b/api @@ -0,0 +1 @@ +Subproject commit 8e14a344e9385144698ee7f21a2ef668b26d5fe7 diff --git a/build.gradle.kts b/build.gradle.kts deleted file mode 100644 index ea5f6347..00000000 --- a/build.gradle.kts +++ /dev/null @@ -1,57 +0,0 @@ -tasks.register("clean") { - gradle.includedBuilds.forEach { - // workaround for https://github.com/neoforged/NeoGradle/issues/18 - if (it.name == "neoforge-1.20.2") return@forEach - - dependsOn(it.task(":clean")) - } - - doFirst { - if (!file("build").deleteRecursively()) - throw java.io.IOException("Failed to delete build directory!") - } -} - -tasks.register("build") { - gradle.includedBuilds.forEach { - if (it.name == "BlueMapCore") return@forEach - if (it.name == "BlueMapCommon") return@forEach - - dependsOn(it.task(":release")) - } -} - -tasks.register("test") { - gradle.includedBuilds.forEach { - dependsOn(it.task(":test")) - } -} - -tasks.register("spotlessApply") { - gradle.includedBuilds.forEach { - dependsOn(it.task(":spotlessApply")) - } -} - -tasks.register("spotlessCheck") { - gradle.includedBuilds.forEach { - dependsOn(it.task(":spotlessCheck")) - } -} - -tasks.register("publish") { - gradle.includedBuilds.forEach { - if (it.name == "BlueMapCore") return@forEach - if (it.name == "BlueMapCommon") return@forEach - - dependsOn(it.task(":publish")) - } -} - -// adding repositories here so intellij can download source-files and javadocs -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://repo.papermc.io/repository/maven-public/") - maven ("https://repo.bluecolored.de/releases") -} diff --git a/buildSrc/build.gradle.kts b/buildSrc/build.gradle.kts new file mode 100644 index 00000000..3be30dcf --- /dev/null +++ b/buildSrc/build.gradle.kts @@ -0,0 +1,25 @@ +plugins { + `kotlin-dsl` +} + +repositories { + mavenCentral() + gradlePluginPortal() +} + +dependencies { + fun plugin(dependency: Provider) = dependency.map { + "${it.pluginId}:${it.pluginId}.gradle.plugin:${it.version}" + } + + implementation ( plugin( libs.plugins.spotless ) ) + implementation ( plugin( libs.plugins.shadow ) ) + implementation ( plugin( libs.plugins.minotaur ) ) + implementation ( plugin( libs.plugins.cursegradle ) ) + implementation ( plugin( libs.plugins.hangar ) ) + implementation ( plugin( libs.plugins.sponge.ore ) ) + + // explicitly set guava version to resolve a build-dependency issue + implementation( libs.guava ) + +} diff --git a/buildSrc/settings.gradle.kts b/buildSrc/settings.gradle.kts new file mode 100644 index 00000000..a3d4cde4 --- /dev/null +++ b/buildSrc/settings.gradle.kts @@ -0,0 +1,9 @@ + +// use version-catalog from root project +dependencyResolutionManagement { + versionCatalogs { + register("libs") { + from(files("../gradle/libs.versions.toml")) + } + } +} diff --git a/buildSrc/src/main/kotlin/CopyFileTask.kt b/buildSrc/src/main/kotlin/CopyFileTask.kt new file mode 100644 index 00000000..ab5ace68 --- /dev/null +++ b/buildSrc/src/main/kotlin/CopyFileTask.kt @@ -0,0 +1,23 @@ +import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.tasks.InputFile +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.TaskAction + +abstract class CopyFileTask : DefaultTask() { + + @get:InputFile + abstract val inputFile: RegularFileProperty + + @get:OutputFile + abstract val outputFile: RegularFileProperty + + @TaskAction + fun action() { + inputFile.get().asFile.copyTo( + outputFile.get().asFile, + overwrite = true + ) + } + +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/bluemap.base.gradle.kts b/buildSrc/src/main/kotlin/bluemap.base.gradle.kts new file mode 100644 index 00000000..7d5c8717 --- /dev/null +++ b/buildSrc/src/main/kotlin/bluemap.base.gradle.kts @@ -0,0 +1,78 @@ +plugins { + java + `java-library` + `maven-publish` + id ( "com.diffplug.spotless" ) +} + +group = "de.bluecolored" +version = gitVersion() + +repositories { + maven ("https://repo.bluecolored.de/releases") { + content { includeGroupByRegex ("de\\.bluecolored\\..*") } + } + maven ("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") { + content { includeGroup ("org.spigotmc") } + } + + mavenCentral() + maven ("https://libraries.minecraft.net") + maven ( "https://maven.minecraftforge.net" ) + maven ("https://repo.papermc.io/repository/maven-public/") +} + +tasks.withType(JavaCompile::class).configureEach { + options.encoding = "utf-8" +} + +tasks.withType(AbstractArchiveTask::class).configureEach { + isReproducibleFileOrder = true + isPreserveFileTimestamps = false +} + +java { + toolchain.languageVersion = JavaLanguageVersion.of(21) + withSourcesJar() + withJavadocJar() +} + +tasks.javadoc { + (options as StandardJavadocDocletOptions).apply { + links( + "https://docs.oracle.com/en/java/javase/16/docs/api/", + "https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/", + "https://javadoc.io/doc/com.google.code.gson/gson/2.8.9/", + ) + addStringOption("Xdoclint:none", "-quiet") + addBooleanOption("html5", true) + } +} + +tasks.test { + useJUnitPlatform() +} + +spotless { + java { + target ("src/*/java/**/*.java") + + licenseHeaderFile(rootProject.file("LICENSE_HEADER")) + indentWithSpaces() + trimTrailingWhitespace() + } +} + +publishing { + repositories { + maven { + name = "bluecolored" + url = uri( "https://repo.bluecolored.de/releases" ) + + credentials { + username = project.findProperty("bluecoloredUsername") as String? ?: System.getenv("BLUECOLORED_USERNAME") + password = project.findProperty("bluecoloredPassword") as String? ?: System.getenv("BLUECOLORED_PASSWORD") + } + } + } +} diff --git a/buildSrc/src/main/kotlin/bluemap.curseforge.gradle.kts b/buildSrc/src/main/kotlin/bluemap.curseforge.gradle.kts new file mode 100644 index 00000000..227122b7 --- /dev/null +++ b/buildSrc/src/main/kotlin/bluemap.curseforge.gradle.kts @@ -0,0 +1,20 @@ +import com.matthewprenger.cursegradle.Options + +plugins { + id ( "bluemap.implementation" ) + id ( "com.matthewprenger.cursegradle" ) +} + +curseforge { + apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" + options(closureOf { + javaVersionAutoDetect = false + javaIntegration = false + forgeGradleIntegration = false + }) +} + +tasks.curseforge { + group = "publishing" + dependsOn(tasks.getByName("release")) +} diff --git a/buildSrc/src/main/kotlin/bluemap.hangar.gradle.kts b/buildSrc/src/main/kotlin/bluemap.hangar.gradle.kts new file mode 100644 index 00000000..ef3f15f7 --- /dev/null +++ b/buildSrc/src/main/kotlin/bluemap.hangar.gradle.kts @@ -0,0 +1,23 @@ +plugins { + id ( "bluemap.implementation" ) + id ( "io.papermc.hangar-publish-plugin" ) +} + +hangarPublish { + publications.register("bluemap") { + apiKey = System.getenv("HANGAR_TOKEN") + + id = "BlueMap" + channel = "Release" + version = project.version as String + changelog = project.releaseNotes() + + platforms.paper { + jar = tasks.getByName("release").outputs.files.singleFile + } + } +} + +tasks.publishAllPublicationsToHangar { + dependsOn(tasks.getByName("release")) +} diff --git a/buildSrc/src/main/kotlin/bluemap.implementation.gradle.kts b/buildSrc/src/main/kotlin/bluemap.implementation.gradle.kts new file mode 100644 index 00000000..5994b076 --- /dev/null +++ b/buildSrc/src/main/kotlin/bluemap.implementation.gradle.kts @@ -0,0 +1,23 @@ +plugins { + id ( "bluemap.base" ) + id ( "io.github.goooler.shadow" ) +} + +val Project.releaseDirectory: File + get() = rootProject.projectDir.resolve("build/release") + +tasks.shadowJar { + archiveFileName = "${project.name}-${project.version}-shadow.jar" +} + +tasks.register("release") { + group = "publishing" + dependsOn(tasks.shadowJar, tasks.spotlessCheck) + + inputFile = tasks.shadowJar.flatMap { it.archiveFile } + outputFile = releaseDirectory.resolve("bluemap-${project.version}-${project.name}.jar") +} + +tasks.getByName("clean") { + delete(releaseDirectory.listFiles()) +} diff --git a/buildSrc/src/main/kotlin/bluemap.modrinth.gradle.kts b/buildSrc/src/main/kotlin/bluemap.modrinth.gradle.kts new file mode 100644 index 00000000..b180493f --- /dev/null +++ b/buildSrc/src/main/kotlin/bluemap.modrinth.gradle.kts @@ -0,0 +1,17 @@ +plugins { + id ( "bluemap.implementation" ) + id ( "com.modrinth.minotaur" ) +} + +modrinth { + token = System.getenv("MODRINTH_TOKEN") + projectId = "swbUV1cr" + uploadFile = tasks.getByName("release").outputs.files.singleFile + versionNumber = "${project.version}-${project.name}" + changelog = project.releaseNotes() + debugMode = true +} + +tasks.modrinth { + dependsOn(tasks.getByName("release")) +} diff --git a/buildSrc/src/main/kotlin/bluemap.ore.gradle.kts b/buildSrc/src/main/kotlin/bluemap.ore.gradle.kts new file mode 100644 index 00000000..6c2b4766 --- /dev/null +++ b/buildSrc/src/main/kotlin/bluemap.ore.gradle.kts @@ -0,0 +1,18 @@ +plugins { + id ( "bluemap.implementation" ) + id ( "org.spongepowered.gradle.ore" ) +} + +oreDeployment { + apiKey(System.getenv("ORE_TOKEN")) + defaultPublication { + projectId = "bluemap" + createForumPost = true + versionBody = project.releaseNotes() + publishArtifacts.setFrom(tasks.getByName("release").outputs.files.singleFile) + } +} + +tasks.publishToOre { + dependsOn(tasks.getByName("release")) +} diff --git a/buildSrc/src/main/kotlin/curseforge.kt b/buildSrc/src/main/kotlin/curseforge.kt new file mode 100644 index 00000000..01f49aeb --- /dev/null +++ b/buildSrc/src/main/kotlin/curseforge.kt @@ -0,0 +1,17 @@ +import com.matthewprenger.cursegradle.CurseProject +import gradle.kotlin.dsl.accessors._0d85c8abe599c3884bce56e72c18751a.curseforge +import org.gradle.api.Action +import org.gradle.api.Project +import org.gradle.kotlin.dsl.closureOf + +fun Project.curseforgeBlueMap (configuration: Action) { + curseforge.project(closureOf { + id = "406463" + changelogType = "markdown" + changelog = project.releaseNotes() + releaseType = "release" + mainArtifact(tasks.getByName("release").outputs.files.singleFile) + + configuration.execute(this) + }) +} \ No newline at end of file diff --git a/buildSrc/src/main/kotlin/versioning.kt b/buildSrc/src/main/kotlin/versioning.kt new file mode 100644 index 00000000..687b2c74 --- /dev/null +++ b/buildSrc/src/main/kotlin/versioning.kt @@ -0,0 +1,53 @@ +import org.gradle.api.Project +import java.io.IOException +import java.util.concurrent.TimeUnit +import java.util.concurrent.TimeoutException + +fun Project.gitHash(): String { + return runCommand("git rev-parse --verify HEAD", "-") +} + +fun Project.gitClean(): Boolean { + return runCommand("git status --porcelain", "NOT_CLEAN").isEmpty() +} + +fun Project.gitVersion(): String { + val lastTag = if (runCommand("git tag", "").isEmpty()) "" else runCommand("git describe --tags --abbrev=0", "") + val lastVersion = if (lastTag.isEmpty()) "0.0" else lastTag.substring(1) // remove the leading 'v' + val commits = runCommand("git rev-list --count $lastTag..HEAD", "0") + val gitVersion = lastVersion + + (if (commits == "0") "" else "-$commits") + + (if (gitClean()) "" else "-dirty") + + logger.lifecycle("${project.name} version: $gitVersion") + + return gitVersion +} + +fun Project.releaseNotes(): String { + val file = rootProject.projectDir.resolve("release.md") + if (!file.exists()) return "" + + return file + .readText() + .replace("{version}", project.version.toString()) +} + +private fun Project.runCommand(cmd: String, fallback: String? = null): String { + ProcessBuilder(cmd.split("\\s(?=(?:[^'\"`]*(['\"`])[^'\"`]*\\1)*[^'\"`]*$)".toRegex())) + .directory(projectDir) + .redirectOutput(ProcessBuilder.Redirect.PIPE) + .redirectError(ProcessBuilder.Redirect.PIPE) + .start() + .apply { + if (!waitFor(10, TimeUnit.SECONDS)) + throw TimeoutException("Failed to execute command: '$cmd'") + } + .run { + val error = errorStream.bufferedReader().readText().trim() + if (error.isEmpty()) return inputStream.bufferedReader().readText().trim() + logger.warn("Failed to execute command '$cmd': $error") + if (fallback != null) return fallback + throw IOException(error) + } +} diff --git a/common/build.gradle.kts b/common/build.gradle.kts new file mode 100644 index 00000000..187d6c18 --- /dev/null +++ b/common/build.gradle.kts @@ -0,0 +1,75 @@ +import com.github.gradle.node.npm.task.NpmTask +import java.io.IOException + +plugins { + bluemap.base + alias ( libs.plugins.node.gradle ) +} + +dependencies { + api ( project( ":core" ) ) + + api ( libs.brigadier ) + + compileOnly ( libs.jetbrains.annotations ) + compileOnly ( libs.lombok ) + + annotationProcessor ( libs.lombok ) + + // tests + testImplementation ( libs.junit.core ) + testRuntimeOnly ( libs.junit.engine ) + testRuntimeOnly ( libs.lombok ) + testAnnotationProcessor ( libs.lombok ) +} + +node { + version = "20.14.0" + download = true + nodeProjectDir = file("webapp/") +} + +tasks.register("buildWebapp", type = NpmTask::class) { + dependsOn ("npmInstall") + args = listOf("run", "build") + + inputs.dir("webapp/") + outputs.dir("webapp/dist/") +} + +tasks.register("zipWebapp", type = Zip::class) { + dependsOn ("buildWebapp") + from (fileTree("webapp/dist/")) + archiveFileName = "webapp.zip" + destinationDirectory = file("src/main/resources/de/bluecolored/bluemap/") + + inputs.dir("webapp/dist/") + outputs.file("src/main/resources/de/bluecolored/bluemap/webapp.zip") +} + +tasks.processResources { + dependsOn("zipWebapp") +} + +tasks.getByName("sourcesJar") { + dependsOn("zipWebapp") +} + +tasks.clean { + doFirst { + if (!file("webapp/dist/").deleteRecursively()) + throw IOException("Failed to delete build directory!") + } +} + +publishing { + publications { + create("maven") { + groupId = project.group.toString() + artifactId = "bluemap-${project.name}" + version = project.version.toString() + + from(components["java"]) + } + } +} diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/BlueMapConfiguration.java b/common/src/main/java/de/bluecolored/bluemap/common/BlueMapConfiguration.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/BlueMapConfiguration.java rename to common/src/main/java/de/bluecolored/bluemap/common/BlueMapConfiguration.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/BlueMapService.java b/common/src/main/java/de/bluecolored/bluemap/common/BlueMapService.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/BlueMapService.java rename to common/src/main/java/de/bluecolored/bluemap/common/BlueMapService.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/InterruptableReentrantLock.java b/common/src/main/java/de/bluecolored/bluemap/common/InterruptableReentrantLock.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/InterruptableReentrantLock.java rename to common/src/main/java/de/bluecolored/bluemap/common/InterruptableReentrantLock.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/MissingResourcesException.java b/common/src/main/java/de/bluecolored/bluemap/common/MissingResourcesException.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/MissingResourcesException.java rename to common/src/main/java/de/bluecolored/bluemap/common/MissingResourcesException.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java b/common/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java rename to common/src/main/java/de/bluecolored/bluemap/common/WebFilesManager.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/AddonException.java b/common/src/main/java/de/bluecolored/bluemap/common/addons/AddonException.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/AddonException.java rename to common/src/main/java/de/bluecolored/bluemap/common/addons/AddonException.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/AddonInfo.java b/common/src/main/java/de/bluecolored/bluemap/common/addons/AddonInfo.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/AddonInfo.java rename to common/src/main/java/de/bluecolored/bluemap/common/addons/AddonInfo.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/Addons.java b/common/src/main/java/de/bluecolored/bluemap/common/addons/Addons.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/Addons.java rename to common/src/main/java/de/bluecolored/bluemap/common/addons/Addons.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/LoadedAddon.java b/common/src/main/java/de/bluecolored/bluemap/common/addons/LoadedAddon.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/addons/LoadedAddon.java rename to common/src/main/java/de/bluecolored/bluemap/common/addons/LoadedAddon.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/AssetStorageImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/AssetStorageImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/AssetStorageImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/AssetStorageImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapAPIImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/BlueMapAPIImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapAPIImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/BlueMapAPIImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapWorldImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/BlueMapWorldImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapWorldImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/BlueMapWorldImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/PluginImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/PluginImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/PluginImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/PluginImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/RenderManagerImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/RenderManagerImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/RenderManagerImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/RenderManagerImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java b/common/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java rename to common/src/main/java/de/bluecolored/bluemap/common/api/WebAppImpl.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java b/common/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/BlueMapConfigManager.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigLoader.java b/common/src/main/java/de/bluecolored/bluemap/common/config/ConfigLoader.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigLoader.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/ConfigLoader.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigManager.java b/common/src/main/java/de/bluecolored/bluemap/common/config/ConfigManager.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigManager.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/ConfigManager.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigTemplate.java b/common/src/main/java/de/bluecolored/bluemap/common/config/ConfigTemplate.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigTemplate.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/ConfigTemplate.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigurationException.java b/common/src/main/java/de/bluecolored/bluemap/common/config/ConfigurationException.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/ConfigurationException.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/ConfigurationException.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/CoreConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/CoreConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/CoreConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/CoreConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/MapConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/MapConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/MapConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/MapConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/PluginConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/PluginConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/PluginConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/PluginConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/WebappConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/WebappConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/WebappConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/WebappConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/WebserverConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/WebserverConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/WebserverConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/WebserverConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/Dialect.java b/common/src/main/java/de/bluecolored/bluemap/common/config/storage/Dialect.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/Dialect.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/storage/Dialect.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/FileConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/storage/FileConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/FileConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/storage/FileConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/SQLConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/storage/SQLConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/SQLConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/storage/SQLConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageConfig.java b/common/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageConfig.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageConfig.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageConfig.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageType.java b/common/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageType.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageType.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/storage/StorageType.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/KeyTypeSerializer.java b/common/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/KeyTypeSerializer.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/KeyTypeSerializer.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/KeyTypeSerializer.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/Vector2iTypeSerializer.java b/common/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/Vector2iTypeSerializer.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/Vector2iTypeSerializer.java rename to common/src/main/java/de/bluecolored/bluemap/common/config/typeserializer/Vector2iTypeSerializer.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/DebugDump.java b/common/src/main/java/de/bluecolored/bluemap/common/debug/DebugDump.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/DebugDump.java rename to common/src/main/java/de/bluecolored/bluemap/common/debug/DebugDump.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java b/common/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java rename to common/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/live/LiveMarkersDataSupplier.java b/common/src/main/java/de/bluecolored/bluemap/common/live/LiveMarkersDataSupplier.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/live/LiveMarkersDataSupplier.java rename to common/src/main/java/de/bluecolored/bluemap/common/live/LiveMarkersDataSupplier.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/live/LivePlayersDataSupplier.java b/common/src/main/java/de/bluecolored/bluemap/common/live/LivePlayersDataSupplier.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/live/LivePlayersDataSupplier.java rename to common/src/main/java/de/bluecolored/bluemap/common/live/LivePlayersDataSupplier.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/metrics/Metrics.java b/common/src/main/java/de/bluecolored/bluemap/common/metrics/Metrics.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/metrics/Metrics.java rename to common/src/main/java/de/bluecolored/bluemap/common/metrics/Metrics.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/MapUpdateService.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/MapUpdateService.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/MapUpdateService.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/MapUpdateService.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/Plugin.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/PluginState.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/PluginState.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/PluginState.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/PluginState.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/AbstractSuggestionProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/AbstractSuggestionProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/AbstractSuggestionProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/AbstractSuggestionProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/CommandHelper.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/CommandHelper.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/CommandHelper.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/CommandHelper.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/Commands.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/MapSuggestionProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/MapSuggestionProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/MapSuggestionProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/MapSuggestionProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/StorageSuggestionProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/StorageSuggestionProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/StorageSuggestionProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/StorageSuggestionProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/TaskRefSuggestionProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/TaskRefSuggestionProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/TaskRefSuggestionProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/TaskRefSuggestionProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldOrMapSuggestionProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldOrMapSuggestionProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldOrMapSuggestionProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldOrMapSuggestionProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldSuggestionProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldSuggestionProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldSuggestionProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/commands/WorldSuggestionProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/skins/DefaultPlayerIconFactory.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/skins/DefaultPlayerIconFactory.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/skins/DefaultPlayerIconFactory.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/skins/DefaultPlayerIconFactory.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/skins/MojangSkinProvider.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/skins/MojangSkinProvider.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/skins/MojangSkinProvider.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/skins/MojangSkinProvider.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/skins/PlayerSkinUpdater.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/skins/PlayerSkinUpdater.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/skins/PlayerSkinUpdater.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/skins/PlayerSkinUpdater.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/text/Text.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/text/Text.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/text/Text.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/text/Text.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextColor.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextColor.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextColor.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextColor.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextFormat.java b/common/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextFormat.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextFormat.java rename to common/src/main/java/de/bluecolored/bluemap/common/plugin/text/TextFormat.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/CombinedRenderTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/CombinedRenderTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/CombinedRenderTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/CombinedRenderTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapPurgeTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapPurgeTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapPurgeTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapPurgeTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapSaveTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapSaveTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapSaveTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapSaveTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/MapUpdateTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/ProgressTracker.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/ProgressTracker.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/ProgressTracker.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/ProgressTracker.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderManager.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/RenderTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/StorageDeleteTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/StorageDeleteTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/StorageDeleteTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/StorageDeleteTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java b/common/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java rename to common/src/main/java/de/bluecolored/bluemap/common/rendermanager/WorldRegionRenderTask.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/CommandSource.java b/common/src/main/java/de/bluecolored/bluemap/common/serverinterface/CommandSource.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/CommandSource.java rename to common/src/main/java/de/bluecolored/bluemap/common/serverinterface/CommandSource.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/Gamemode.java b/common/src/main/java/de/bluecolored/bluemap/common/serverinterface/Gamemode.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/Gamemode.java rename to common/src/main/java/de/bluecolored/bluemap/common/serverinterface/Gamemode.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/Player.java b/common/src/main/java/de/bluecolored/bluemap/common/serverinterface/Player.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/Player.java rename to common/src/main/java/de/bluecolored/bluemap/common/serverinterface/Player.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/Server.java b/common/src/main/java/de/bluecolored/bluemap/common/serverinterface/Server.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/Server.java rename to common/src/main/java/de/bluecolored/bluemap/common/serverinterface/Server.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerEventListener.java b/common/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerEventListener.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerEventListener.java rename to common/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerEventListener.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerWorld.java b/common/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerWorld.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerWorld.java rename to common/src/main/java/de/bluecolored/bluemap/common/serverinterface/ServerWorld.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/BlueMapResponseModifier.java b/common/src/main/java/de/bluecolored/bluemap/common/web/BlueMapResponseModifier.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/BlueMapResponseModifier.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/BlueMapResponseModifier.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/CachedRateLimitDataSupplier.java b/common/src/main/java/de/bluecolored/bluemap/common/web/CachedRateLimitDataSupplier.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/CachedRateLimitDataSupplier.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/CachedRateLimitDataSupplier.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/FileRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/FileRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/FileRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/FileRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/JsonDataRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/JsonDataRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/JsonDataRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/JsonDataRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/LoggingRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/LoggingRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/LoggingRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/LoggingRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/MapRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/MapRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/MapRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/MapRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/MapStorageRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/RoutingRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/RoutingRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/RoutingRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/RoutingRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpConnection.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpConnection.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpConnection.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpConnection.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpHeader.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpHeader.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpHeader.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpHeader.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequest.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequest.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequest.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequest.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequestHandler.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequestHandler.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequestHandler.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpRequestHandler.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpResponse.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpResponse.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpResponse.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpResponse.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpServer.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpServer.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpServer.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpServer.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpStatusCode.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpStatusCode.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/HttpStatusCode.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/HttpStatusCode.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/SelectionConsumer.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/SelectionConsumer.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/SelectionConsumer.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/SelectionConsumer.java diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java b/common/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java similarity index 100% rename from BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java rename to common/src/main/java/de/bluecolored/bluemap/common/web/http/Server.java diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/core.conf b/common/src/main/resources/de/bluecolored/bluemap/config/core.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/core.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/core.conf diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/maps/map.conf b/common/src/main/resources/de/bluecolored/bluemap/config/maps/map.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/maps/map.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/maps/map.conf diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/plugin.conf b/common/src/main/resources/de/bluecolored/bluemap/config/plugin.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/plugin.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/plugin.conf diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/storages/file.conf b/common/src/main/resources/de/bluecolored/bluemap/config/storages/file.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/storages/file.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/storages/file.conf diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/storages/sql.conf b/common/src/main/resources/de/bluecolored/bluemap/config/storages/sql.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/storages/sql.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/storages/sql.conf diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/webapp.conf b/common/src/main/resources/de/bluecolored/bluemap/config/webapp.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/webapp.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/webapp.conf diff --git a/BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/webserver.conf b/common/src/main/resources/de/bluecolored/bluemap/config/webserver.conf similarity index 100% rename from BlueMapCommon/src/main/resources/de/bluecolored/bluemap/config/webserver.conf rename to common/src/main/resources/de/bluecolored/bluemap/config/webserver.conf diff --git a/BlueMapCommon/webapp/.eslintrc.cjs b/common/webapp/.eslintrc.cjs similarity index 100% rename from BlueMapCommon/webapp/.eslintrc.cjs rename to common/webapp/.eslintrc.cjs diff --git a/BlueMapCommon/webapp/.gitignore b/common/webapp/.gitignore similarity index 100% rename from BlueMapCommon/webapp/.gitignore rename to common/webapp/.gitignore diff --git a/BlueMapCommon/webapp/README.md b/common/webapp/README.md similarity index 100% rename from BlueMapCommon/webapp/README.md rename to common/webapp/README.md diff --git a/BlueMapCommon/webapp/index.html b/common/webapp/index.html similarity index 100% rename from BlueMapCommon/webapp/index.html rename to common/webapp/index.html diff --git a/BlueMapCommon/webapp/package-lock.json b/common/webapp/package-lock.json similarity index 100% rename from BlueMapCommon/webapp/package-lock.json rename to common/webapp/package-lock.json diff --git a/BlueMapCommon/webapp/package.json b/common/webapp/package.json similarity index 100% rename from BlueMapCommon/webapp/package.json rename to common/webapp/package.json diff --git a/BlueMapCommon/webapp/public/assets/logo.png b/common/webapp/public/assets/logo.png similarity index 100% rename from BlueMapCommon/webapp/public/assets/logo.png rename to common/webapp/public/assets/logo.png diff --git a/BlueMapCommon/webapp/public/assets/logoCircle512.png b/common/webapp/public/assets/logoCircle512.png similarity index 100% rename from BlueMapCommon/webapp/public/assets/logoCircle512.png rename to common/webapp/public/assets/logoCircle512.png diff --git a/BlueMapCommon/webapp/public/assets/logoCircle64.png b/common/webapp/public/assets/logoCircle64.png similarity index 100% rename from BlueMapCommon/webapp/public/assets/logoCircle64.png rename to common/webapp/public/assets/logoCircle64.png diff --git a/BlueMapCommon/webapp/public/assets/poi.svg b/common/webapp/public/assets/poi.svg similarity index 100% rename from BlueMapCommon/webapp/public/assets/poi.svg rename to common/webapp/public/assets/poi.svg diff --git a/BlueMapCommon/webapp/public/assets/steve.png b/common/webapp/public/assets/steve.png similarity index 100% rename from BlueMapCommon/webapp/public/assets/steve.png rename to common/webapp/public/assets/steve.png diff --git a/BlueMapCommon/webapp/public/lang/cs.conf b/common/webapp/public/lang/cs.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/cs.conf rename to common/webapp/public/lang/cs.conf diff --git a/BlueMapCommon/webapp/public/lang/de.conf b/common/webapp/public/lang/de.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/de.conf rename to common/webapp/public/lang/de.conf diff --git a/BlueMapCommon/webapp/public/lang/en.conf b/common/webapp/public/lang/en.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/en.conf rename to common/webapp/public/lang/en.conf diff --git a/BlueMapCommon/webapp/public/lang/es.conf b/common/webapp/public/lang/es.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/es.conf rename to common/webapp/public/lang/es.conf diff --git a/BlueMapCommon/webapp/public/lang/fi.conf b/common/webapp/public/lang/fi.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/fi.conf rename to common/webapp/public/lang/fi.conf diff --git a/BlueMapCommon/webapp/public/lang/fr.conf b/common/webapp/public/lang/fr.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/fr.conf rename to common/webapp/public/lang/fr.conf diff --git a/BlueMapCommon/webapp/public/lang/hi.conf b/common/webapp/public/lang/hi.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/hi.conf rename to common/webapp/public/lang/hi.conf diff --git a/BlueMapCommon/webapp/public/lang/hu.conf b/common/webapp/public/lang/hu.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/hu.conf rename to common/webapp/public/lang/hu.conf diff --git a/BlueMapCommon/webapp/public/lang/it.conf b/common/webapp/public/lang/it.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/it.conf rename to common/webapp/public/lang/it.conf diff --git a/BlueMapCommon/webapp/public/lang/ja.conf b/common/webapp/public/lang/ja.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/ja.conf rename to common/webapp/public/lang/ja.conf diff --git a/BlueMapCommon/webapp/public/lang/ko.conf b/common/webapp/public/lang/ko.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/ko.conf rename to common/webapp/public/lang/ko.conf diff --git a/BlueMapCommon/webapp/public/lang/lv.conf b/common/webapp/public/lang/lv.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/lv.conf rename to common/webapp/public/lang/lv.conf diff --git a/BlueMapCommon/webapp/public/lang/nl.conf b/common/webapp/public/lang/nl.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/nl.conf rename to common/webapp/public/lang/nl.conf diff --git a/BlueMapCommon/webapp/public/lang/no_nb.conf b/common/webapp/public/lang/no_nb.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/no_nb.conf rename to common/webapp/public/lang/no_nb.conf diff --git a/BlueMapCommon/webapp/public/lang/pl.conf b/common/webapp/public/lang/pl.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/pl.conf rename to common/webapp/public/lang/pl.conf diff --git a/BlueMapCommon/webapp/public/lang/pt_PT.conf b/common/webapp/public/lang/pt_PT.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/pt_PT.conf rename to common/webapp/public/lang/pt_PT.conf diff --git a/BlueMapCommon/webapp/public/lang/ru.conf b/common/webapp/public/lang/ru.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/ru.conf rename to common/webapp/public/lang/ru.conf diff --git a/BlueMapCommon/webapp/public/lang/settings.conf b/common/webapp/public/lang/settings.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/settings.conf rename to common/webapp/public/lang/settings.conf diff --git a/BlueMapCommon/webapp/public/lang/sr_cyrl.conf b/common/webapp/public/lang/sr_cyrl.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/sr_cyrl.conf rename to common/webapp/public/lang/sr_cyrl.conf diff --git a/BlueMapCommon/webapp/public/lang/sr_latn.conf b/common/webapp/public/lang/sr_latn.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/sr_latn.conf rename to common/webapp/public/lang/sr_latn.conf diff --git a/BlueMapCommon/webapp/public/lang/sv.conf b/common/webapp/public/lang/sv.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/sv.conf rename to common/webapp/public/lang/sv.conf diff --git a/BlueMapCommon/webapp/public/lang/th.conf b/common/webapp/public/lang/th.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/th.conf rename to common/webapp/public/lang/th.conf diff --git a/BlueMapCommon/webapp/public/lang/tr.conf b/common/webapp/public/lang/tr.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/tr.conf rename to common/webapp/public/lang/tr.conf diff --git a/BlueMapCommon/webapp/public/lang/ua.conf b/common/webapp/public/lang/ua.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/ua.conf rename to common/webapp/public/lang/ua.conf diff --git a/BlueMapCommon/webapp/public/lang/vi.conf b/common/webapp/public/lang/vi.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/vi.conf rename to common/webapp/public/lang/vi.conf diff --git a/BlueMapCommon/webapp/public/lang/zh_CN.conf b/common/webapp/public/lang/zh_CN.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/zh_CN.conf rename to common/webapp/public/lang/zh_CN.conf diff --git a/BlueMapCommon/webapp/public/lang/zh_HK.conf b/common/webapp/public/lang/zh_HK.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/zh_HK.conf rename to common/webapp/public/lang/zh_HK.conf diff --git a/BlueMapCommon/webapp/public/lang/zh_TW.conf b/common/webapp/public/lang/zh_TW.conf similarity index 100% rename from BlueMapCommon/webapp/public/lang/zh_TW.conf rename to common/webapp/public/lang/zh_TW.conf diff --git a/BlueMapCommon/webapp/public/sql.php b/common/webapp/public/sql.php similarity index 100% rename from BlueMapCommon/webapp/public/sql.php rename to common/webapp/public/sql.php diff --git a/BlueMapCommon/webapp/src/App.vue b/common/webapp/src/App.vue similarity index 100% rename from BlueMapCommon/webapp/src/App.vue rename to common/webapp/src/App.vue diff --git a/BlueMapCommon/webapp/src/assets/favicon.png b/common/webapp/src/assets/favicon.png similarity index 100% rename from BlueMapCommon/webapp/src/assets/favicon.png rename to common/webapp/src/assets/favicon.png diff --git a/BlueMapCommon/webapp/src/assets/manifest.webmanifest b/common/webapp/src/assets/manifest.webmanifest similarity index 100% rename from BlueMapCommon/webapp/src/assets/manifest.webmanifest rename to common/webapp/src/assets/manifest.webmanifest diff --git a/BlueMapCommon/webapp/src/components/ControlBar/Compass.vue b/common/webapp/src/components/ControlBar/Compass.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/Compass.vue rename to common/webapp/src/components/ControlBar/Compass.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/ControlBar.vue b/common/webapp/src/components/ControlBar/ControlBar.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/ControlBar.vue rename to common/webapp/src/components/ControlBar/ControlBar.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/ControlsSwitch.vue b/common/webapp/src/components/ControlBar/ControlsSwitch.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/ControlsSwitch.vue rename to common/webapp/src/components/ControlBar/ControlsSwitch.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/DayNightSwitch.vue b/common/webapp/src/components/ControlBar/DayNightSwitch.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/DayNightSwitch.vue rename to common/webapp/src/components/ControlBar/DayNightSwitch.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/MenuButton.vue b/common/webapp/src/components/ControlBar/MenuButton.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/MenuButton.vue rename to common/webapp/src/components/ControlBar/MenuButton.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/NumberInput.vue b/common/webapp/src/components/ControlBar/NumberInput.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/NumberInput.vue rename to common/webapp/src/components/ControlBar/NumberInput.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/PositionInput.vue b/common/webapp/src/components/ControlBar/PositionInput.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/PositionInput.vue rename to common/webapp/src/components/ControlBar/PositionInput.vue diff --git a/BlueMapCommon/webapp/src/components/ControlBar/SvgButton.vue b/common/webapp/src/components/ControlBar/SvgButton.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/ControlBar/SvgButton.vue rename to common/webapp/src/components/ControlBar/SvgButton.vue diff --git a/BlueMapCommon/webapp/src/components/Controls/FreeFlightMobileControls.vue b/common/webapp/src/components/Controls/FreeFlightMobileControls.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Controls/FreeFlightMobileControls.vue rename to common/webapp/src/components/Controls/FreeFlightMobileControls.vue diff --git a/BlueMapCommon/webapp/src/components/Controls/ZoomButtons.vue b/common/webapp/src/components/Controls/ZoomButtons.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Controls/ZoomButtons.vue rename to common/webapp/src/components/Controls/ZoomButtons.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/ChoiceBox.vue b/common/webapp/src/components/Menu/ChoiceBox.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/ChoiceBox.vue rename to common/webapp/src/components/Menu/ChoiceBox.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/Group.vue b/common/webapp/src/components/Menu/Group.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/Group.vue rename to common/webapp/src/components/Menu/Group.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/MainMenu.vue b/common/webapp/src/components/Menu/MainMenu.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/MainMenu.vue rename to common/webapp/src/components/Menu/MainMenu.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/MapButton.vue b/common/webapp/src/components/Menu/MapButton.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/MapButton.vue rename to common/webapp/src/components/Menu/MapButton.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/MarkerItem.vue b/common/webapp/src/components/Menu/MarkerItem.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/MarkerItem.vue rename to common/webapp/src/components/Menu/MarkerItem.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue b/common/webapp/src/components/Menu/MarkerSet.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/MarkerSet.vue rename to common/webapp/src/components/Menu/MarkerSet.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/MarkerSetMenu.vue b/common/webapp/src/components/Menu/MarkerSetMenu.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/MarkerSetMenu.vue rename to common/webapp/src/components/Menu/MarkerSetMenu.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/SettingsMenu.vue b/common/webapp/src/components/Menu/SettingsMenu.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/SettingsMenu.vue rename to common/webapp/src/components/Menu/SettingsMenu.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/SideMenu.vue b/common/webapp/src/components/Menu/SideMenu.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/SideMenu.vue rename to common/webapp/src/components/Menu/SideMenu.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/SimpleButton.vue b/common/webapp/src/components/Menu/SimpleButton.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/SimpleButton.vue rename to common/webapp/src/components/Menu/SimpleButton.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/Slider.vue b/common/webapp/src/components/Menu/Slider.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/Slider.vue rename to common/webapp/src/components/Menu/Slider.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/SwitchButton.vue b/common/webapp/src/components/Menu/SwitchButton.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/SwitchButton.vue rename to common/webapp/src/components/Menu/SwitchButton.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/SwitchHandle.vue b/common/webapp/src/components/Menu/SwitchHandle.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/SwitchHandle.vue rename to common/webapp/src/components/Menu/SwitchHandle.vue diff --git a/BlueMapCommon/webapp/src/components/Menu/TextInput.vue b/common/webapp/src/components/Menu/TextInput.vue similarity index 100% rename from BlueMapCommon/webapp/src/components/Menu/TextInput.vue rename to common/webapp/src/components/Menu/TextInput.vue diff --git a/BlueMapCommon/webapp/src/fonts/OFL.txt b/common/webapp/src/fonts/OFL.txt similarity index 100% rename from BlueMapCommon/webapp/src/fonts/OFL.txt rename to common/webapp/src/fonts/OFL.txt diff --git a/BlueMapCommon/webapp/src/fonts/Quicksand.ttf b/common/webapp/src/fonts/Quicksand.ttf similarity index 100% rename from BlueMapCommon/webapp/src/fonts/Quicksand.ttf rename to common/webapp/src/fonts/Quicksand.ttf diff --git a/BlueMapCommon/webapp/src/i18n.js b/common/webapp/src/i18n.js similarity index 100% rename from BlueMapCommon/webapp/src/i18n.js rename to common/webapp/src/i18n.js diff --git a/BlueMapCommon/webapp/src/js/BlueMap.js b/common/webapp/src/js/BlueMap.js similarity index 100% rename from BlueMapCommon/webapp/src/js/BlueMap.js rename to common/webapp/src/js/BlueMap.js diff --git a/BlueMapCommon/webapp/src/js/BlueMapApp.js b/common/webapp/src/js/BlueMapApp.js similarity index 100% rename from BlueMapCommon/webapp/src/js/BlueMapApp.js rename to common/webapp/src/js/BlueMapApp.js diff --git a/BlueMapCommon/webapp/src/js/MainMenu.js b/common/webapp/src/js/MainMenu.js similarity index 100% rename from BlueMapCommon/webapp/src/js/MainMenu.js rename to common/webapp/src/js/MainMenu.js diff --git a/BlueMapCommon/webapp/src/js/MapViewer.js b/common/webapp/src/js/MapViewer.js similarity index 100% rename from BlueMapCommon/webapp/src/js/MapViewer.js rename to common/webapp/src/js/MapViewer.js diff --git a/BlueMapCommon/webapp/src/js/PopupMarker.js b/common/webapp/src/js/PopupMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/PopupMarker.js rename to common/webapp/src/js/PopupMarker.js diff --git a/BlueMapCommon/webapp/src/js/Utils.js b/common/webapp/src/js/Utils.js similarity index 100% rename from BlueMapCommon/webapp/src/js/Utils.js rename to common/webapp/src/js/Utils.js diff --git a/BlueMapCommon/webapp/src/js/controls/ControlsManager.js b/common/webapp/src/js/controls/ControlsManager.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/ControlsManager.js rename to common/webapp/src/js/controls/ControlsManager.js diff --git a/BlueMapCommon/webapp/src/js/controls/KeyCombination.js b/common/webapp/src/js/controls/KeyCombination.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/KeyCombination.js rename to common/webapp/src/js/controls/KeyCombination.js diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/FreeFlightControls.js b/common/webapp/src/js/controls/freeflight/FreeFlightControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/freeflight/FreeFlightControls.js rename to common/webapp/src/js/controls/freeflight/FreeFlightControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/keyboard/KeyHeightControls.js b/common/webapp/src/js/controls/freeflight/keyboard/KeyHeightControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/freeflight/keyboard/KeyHeightControls.js rename to common/webapp/src/js/controls/freeflight/keyboard/KeyHeightControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/keyboard/KeyMoveControls.js b/common/webapp/src/js/controls/freeflight/keyboard/KeyMoveControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/freeflight/keyboard/KeyMoveControls.js rename to common/webapp/src/js/controls/freeflight/keyboard/KeyMoveControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/mouse/MouseAngleControls.js b/common/webapp/src/js/controls/freeflight/mouse/MouseAngleControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/freeflight/mouse/MouseAngleControls.js rename to common/webapp/src/js/controls/freeflight/mouse/MouseAngleControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/mouse/MouseRotateControls.js b/common/webapp/src/js/controls/freeflight/mouse/MouseRotateControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/freeflight/mouse/MouseRotateControls.js rename to common/webapp/src/js/controls/freeflight/mouse/MouseRotateControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/freeflight/touch/TouchPanControls.js b/common/webapp/src/js/controls/freeflight/touch/TouchPanControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/freeflight/touch/TouchPanControls.js rename to common/webapp/src/js/controls/freeflight/touch/TouchPanControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/MapControls.js b/common/webapp/src/js/controls/map/MapControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/MapControls.js rename to common/webapp/src/js/controls/map/MapControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/MapHeightControls.js b/common/webapp/src/js/controls/map/MapHeightControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/MapHeightControls.js rename to common/webapp/src/js/controls/map/MapHeightControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyAngleControls.js b/common/webapp/src/js/controls/map/keyboard/KeyAngleControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyAngleControls.js rename to common/webapp/src/js/controls/map/keyboard/KeyAngleControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyMoveControls.js b/common/webapp/src/js/controls/map/keyboard/KeyMoveControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyMoveControls.js rename to common/webapp/src/js/controls/map/keyboard/KeyMoveControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyRotateControls.js b/common/webapp/src/js/controls/map/keyboard/KeyRotateControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyRotateControls.js rename to common/webapp/src/js/controls/map/keyboard/KeyRotateControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyZoomControls.js b/common/webapp/src/js/controls/map/keyboard/KeyZoomControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/keyboard/KeyZoomControls.js rename to common/webapp/src/js/controls/map/keyboard/KeyZoomControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/mouse/MouseAngleControls.js b/common/webapp/src/js/controls/map/mouse/MouseAngleControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/mouse/MouseAngleControls.js rename to common/webapp/src/js/controls/map/mouse/MouseAngleControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/mouse/MouseMoveControls.js b/common/webapp/src/js/controls/map/mouse/MouseMoveControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/mouse/MouseMoveControls.js rename to common/webapp/src/js/controls/map/mouse/MouseMoveControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/mouse/MouseRotateControls.js b/common/webapp/src/js/controls/map/mouse/MouseRotateControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/mouse/MouseRotateControls.js rename to common/webapp/src/js/controls/map/mouse/MouseRotateControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/mouse/MouseZoomControls.js b/common/webapp/src/js/controls/map/mouse/MouseZoomControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/mouse/MouseZoomControls.js rename to common/webapp/src/js/controls/map/mouse/MouseZoomControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/touch/TouchAngleControls.js b/common/webapp/src/js/controls/map/touch/TouchAngleControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/touch/TouchAngleControls.js rename to common/webapp/src/js/controls/map/touch/TouchAngleControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/touch/TouchMoveControls.js b/common/webapp/src/js/controls/map/touch/TouchMoveControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/touch/TouchMoveControls.js rename to common/webapp/src/js/controls/map/touch/TouchMoveControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/touch/TouchRotateControls.js b/common/webapp/src/js/controls/map/touch/TouchRotateControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/touch/TouchRotateControls.js rename to common/webapp/src/js/controls/map/touch/TouchRotateControls.js diff --git a/BlueMapCommon/webapp/src/js/controls/map/touch/TouchZoomControls.js b/common/webapp/src/js/controls/map/touch/TouchZoomControls.js similarity index 100% rename from BlueMapCommon/webapp/src/js/controls/map/touch/TouchZoomControls.js rename to common/webapp/src/js/controls/map/touch/TouchZoomControls.js diff --git a/BlueMapCommon/webapp/src/js/map/LowresTileLoader.js b/common/webapp/src/js/map/LowresTileLoader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/LowresTileLoader.js rename to common/webapp/src/js/map/LowresTileLoader.js diff --git a/BlueMapCommon/webapp/src/js/map/Map.js b/common/webapp/src/js/map/Map.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/Map.js rename to common/webapp/src/js/map/Map.js diff --git a/BlueMapCommon/webapp/src/js/map/TextureAnimation.js b/common/webapp/src/js/map/TextureAnimation.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/TextureAnimation.js rename to common/webapp/src/js/map/TextureAnimation.js diff --git a/BlueMapCommon/webapp/src/js/map/Tile.js b/common/webapp/src/js/map/Tile.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/Tile.js rename to common/webapp/src/js/map/Tile.js diff --git a/BlueMapCommon/webapp/src/js/map/TileLoader.js b/common/webapp/src/js/map/TileLoader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/TileLoader.js rename to common/webapp/src/js/map/TileLoader.js diff --git a/BlueMapCommon/webapp/src/js/map/TileManager.js b/common/webapp/src/js/map/TileManager.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/TileManager.js rename to common/webapp/src/js/map/TileManager.js diff --git a/BlueMapCommon/webapp/src/js/map/TileMap.js b/common/webapp/src/js/map/TileMap.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/TileMap.js rename to common/webapp/src/js/map/TileMap.js diff --git a/BlueMapCommon/webapp/src/js/map/hires/HiresFragmentShader.js b/common/webapp/src/js/map/hires/HiresFragmentShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/hires/HiresFragmentShader.js rename to common/webapp/src/js/map/hires/HiresFragmentShader.js diff --git a/BlueMapCommon/webapp/src/js/map/hires/HiresVertexShader.js b/common/webapp/src/js/map/hires/HiresVertexShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/hires/HiresVertexShader.js rename to common/webapp/src/js/map/hires/HiresVertexShader.js diff --git a/BlueMapCommon/webapp/src/js/map/hires/PRBMLoader.js b/common/webapp/src/js/map/hires/PRBMLoader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/hires/PRBMLoader.js rename to common/webapp/src/js/map/hires/PRBMLoader.js diff --git a/BlueMapCommon/webapp/src/js/map/lowres/LowresFragmentShader.js b/common/webapp/src/js/map/lowres/LowresFragmentShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/lowres/LowresFragmentShader.js rename to common/webapp/src/js/map/lowres/LowresFragmentShader.js diff --git a/BlueMapCommon/webapp/src/js/map/lowres/LowresVertexShader.js b/common/webapp/src/js/map/lowres/LowresVertexShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/map/lowres/LowresVertexShader.js rename to common/webapp/src/js/map/lowres/LowresVertexShader.js diff --git a/BlueMapCommon/webapp/src/js/markers/ExtrudeMarker.js b/common/webapp/src/js/markers/ExtrudeMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/ExtrudeMarker.js rename to common/webapp/src/js/markers/ExtrudeMarker.js diff --git a/BlueMapCommon/webapp/src/js/markers/HtmlMarker.js b/common/webapp/src/js/markers/HtmlMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/HtmlMarker.js rename to common/webapp/src/js/markers/HtmlMarker.js diff --git a/BlueMapCommon/webapp/src/js/markers/LineMarker.js b/common/webapp/src/js/markers/LineMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/LineMarker.js rename to common/webapp/src/js/markers/LineMarker.js diff --git a/BlueMapCommon/webapp/src/js/markers/Marker.js b/common/webapp/src/js/markers/Marker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/Marker.js rename to common/webapp/src/js/markers/Marker.js diff --git a/BlueMapCommon/webapp/src/js/markers/MarkerFillFragmentShader.js b/common/webapp/src/js/markers/MarkerFillFragmentShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/MarkerFillFragmentShader.js rename to common/webapp/src/js/markers/MarkerFillFragmentShader.js diff --git a/BlueMapCommon/webapp/src/js/markers/MarkerFillVertexShader.js b/common/webapp/src/js/markers/MarkerFillVertexShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/MarkerFillVertexShader.js rename to common/webapp/src/js/markers/MarkerFillVertexShader.js diff --git a/BlueMapCommon/webapp/src/js/markers/MarkerManager.js b/common/webapp/src/js/markers/MarkerManager.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/MarkerManager.js rename to common/webapp/src/js/markers/MarkerManager.js diff --git a/BlueMapCommon/webapp/src/js/markers/MarkerSet.js b/common/webapp/src/js/markers/MarkerSet.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/MarkerSet.js rename to common/webapp/src/js/markers/MarkerSet.js diff --git a/BlueMapCommon/webapp/src/js/markers/NormalMarkerManager.js b/common/webapp/src/js/markers/NormalMarkerManager.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/NormalMarkerManager.js rename to common/webapp/src/js/markers/NormalMarkerManager.js diff --git a/BlueMapCommon/webapp/src/js/markers/ObjectMarker.js b/common/webapp/src/js/markers/ObjectMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/ObjectMarker.js rename to common/webapp/src/js/markers/ObjectMarker.js diff --git a/BlueMapCommon/webapp/src/js/markers/PlayerMarker.js b/common/webapp/src/js/markers/PlayerMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/PlayerMarker.js rename to common/webapp/src/js/markers/PlayerMarker.js diff --git a/BlueMapCommon/webapp/src/js/markers/PlayerMarkerManager.js b/common/webapp/src/js/markers/PlayerMarkerManager.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/PlayerMarkerManager.js rename to common/webapp/src/js/markers/PlayerMarkerManager.js diff --git a/BlueMapCommon/webapp/src/js/markers/PlayerMarkerSet.js b/common/webapp/src/js/markers/PlayerMarkerSet.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/PlayerMarkerSet.js rename to common/webapp/src/js/markers/PlayerMarkerSet.js diff --git a/BlueMapCommon/webapp/src/js/markers/PoiMarker.js b/common/webapp/src/js/markers/PoiMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/PoiMarker.js rename to common/webapp/src/js/markers/PoiMarker.js diff --git a/BlueMapCommon/webapp/src/js/markers/ShapeMarker.js b/common/webapp/src/js/markers/ShapeMarker.js similarity index 100% rename from BlueMapCommon/webapp/src/js/markers/ShapeMarker.js rename to common/webapp/src/js/markers/ShapeMarker.js diff --git a/BlueMapCommon/webapp/src/js/skybox/SkyFragmentShader.js b/common/webapp/src/js/skybox/SkyFragmentShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/skybox/SkyFragmentShader.js rename to common/webapp/src/js/skybox/SkyFragmentShader.js diff --git a/BlueMapCommon/webapp/src/js/skybox/SkyVertexShader.js b/common/webapp/src/js/skybox/SkyVertexShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/skybox/SkyVertexShader.js rename to common/webapp/src/js/skybox/SkyVertexShader.js diff --git a/BlueMapCommon/webapp/src/js/skybox/SkyboxScene.js b/common/webapp/src/js/skybox/SkyboxScene.js similarity index 100% rename from BlueMapCommon/webapp/src/js/skybox/SkyboxScene.js rename to common/webapp/src/js/skybox/SkyboxScene.js diff --git a/BlueMapCommon/webapp/src/js/util/CSS2DRenderer.js b/common/webapp/src/js/util/CSS2DRenderer.js similarity index 100% rename from BlueMapCommon/webapp/src/js/util/CSS2DRenderer.js rename to common/webapp/src/js/util/CSS2DRenderer.js diff --git a/BlueMapCommon/webapp/src/js/util/CombinedCamera.js b/common/webapp/src/js/util/CombinedCamera.js similarity index 100% rename from BlueMapCommon/webapp/src/js/util/CombinedCamera.js rename to common/webapp/src/js/util/CombinedCamera.js diff --git a/BlueMapCommon/webapp/src/js/util/LineShader.js b/common/webapp/src/js/util/LineShader.js similarity index 100% rename from BlueMapCommon/webapp/src/js/util/LineShader.js rename to common/webapp/src/js/util/LineShader.js diff --git a/BlueMapCommon/webapp/src/js/util/Stats.js b/common/webapp/src/js/util/Stats.js similarity index 100% rename from BlueMapCommon/webapp/src/js/util/Stats.js rename to common/webapp/src/js/util/Stats.js diff --git a/BlueMapCommon/webapp/src/js/util/Utils.js b/common/webapp/src/js/util/Utils.js similarity index 100% rename from BlueMapCommon/webapp/src/js/util/Utils.js rename to common/webapp/src/js/util/Utils.js diff --git a/BlueMapCommon/webapp/src/main.js b/common/webapp/src/main.js similarity index 100% rename from BlueMapCommon/webapp/src/main.js rename to common/webapp/src/main.js diff --git a/BlueMapCommon/webapp/src/scss/global.scss b/common/webapp/src/scss/global.scss similarity index 100% rename from BlueMapCommon/webapp/src/scss/global.scss rename to common/webapp/src/scss/global.scss diff --git a/BlueMapCommon/webapp/src/scss/markers.scss b/common/webapp/src/scss/markers.scss similarity index 100% rename from BlueMapCommon/webapp/src/scss/markers.scss rename to common/webapp/src/scss/markers.scss diff --git a/BlueMapCommon/webapp/src/scss/variables.scss b/common/webapp/src/scss/variables.scss similarity index 100% rename from BlueMapCommon/webapp/src/scss/variables.scss rename to common/webapp/src/scss/variables.scss diff --git a/BlueMapCommon/webapp/vite.config.js b/common/webapp/vite.config.js similarity index 100% rename from BlueMapCommon/webapp/vite.config.js rename to common/webapp/vite.config.js diff --git a/core/build.gradle.kts b/core/build.gradle.kts new file mode 100644 index 00000000..d525a446 --- /dev/null +++ b/core/build.gradle.kts @@ -0,0 +1,62 @@ +plugins { + bluemap.base +} + +dependencies { + api ( "de.bluecolored:api" ) + + api ( libs.aircompressor ) + api ( libs.bluenbt ) + api ( libs.caffeine ) + api ( libs.commons.dbcp2 ) + api ( libs.configurate.hocon ) + api ( libs.configurate.gson ) + api ( libs.lz4 ) + + compileOnly ( libs.jetbrains.annotations ) + compileOnly ( libs.lombok ) + + annotationProcessor ( libs.lombok ) + + // tests + testImplementation ( libs.junit.core ) + testRuntimeOnly ( libs.junit.engine ) + testRuntimeOnly ( libs.lombok ) + testAnnotationProcessor ( libs.lombok ) +} + +tasks.register("zipResourceExtensions", type = Zip::class) { + from(fileTree("src/main/resourceExtensions")) + archiveFileName = "resourceExtensions.zip" + destinationDirectory = file("src/main/resources/de/bluecolored/bluemap/") +} + +tasks.processResources { + dependsOn("zipResourceExtensions") + + from("src/main/resources") { + include("de/bluecolored/bluemap/version.json") + duplicatesStrategy = DuplicatesStrategy.INCLUDE + + expand ( + "version" to project.version, + "gitHash" to gitHash() + if (gitClean()) "" else " (dirty)", + ) + } +} + +tasks.getByName("sourcesJar") { + dependsOn("zipResourceExtensions") +} + +publishing { + publications { + create("maven") { + groupId = project.group.toString() + artifactId = "bluemap-${project.name}" + version = project.version.toString() + + from(components["java"]) + } + } +} diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java b/core/src/main/java/de/bluecolored/bluemap/core/BlueMap.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/BlueMap.java rename to core/src/main/java/de/bluecolored/bluemap/core/BlueMap.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/AbstractLogger.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/AbstractLogger.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/AbstractLogger.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/AbstractLogger.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/JavaLogger.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/JavaLogger.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/JavaLogger.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/JavaLogger.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/LogFormatter.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/LogFormatter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/LogFormatter.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/LogFormatter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/Logger.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/Logger.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/Logger.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/Logger.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/MultiLogger.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/MultiLogger.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/MultiLogger.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/MultiLogger.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/PrintStreamLogger.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/PrintStreamLogger.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/PrintStreamLogger.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/PrintStreamLogger.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/VoidLogger.java b/core/src/main/java/de/bluecolored/bluemap/core/logger/VoidLogger.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/logger/VoidLogger.java rename to core/src/main/java/de/bluecolored/bluemap/core/logger/VoidLogger.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java b/core/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/BmMap.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/MapSettings.java b/core/src/main/java/de/bluecolored/bluemap/core/map/MapSettings.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/MapSettings.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/MapSettings.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/MapSettingsSerializer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/MapSettingsSerializer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/MapSettingsSerializer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/MapSettingsSerializer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java b/core/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/TextureGallery.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TileMetaConsumer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/TileMetaConsumer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/TileMetaConsumer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/TileMetaConsumer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/BlockModelView.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/BlockModelView.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/BlockModelView.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/BlockModelView.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelManager.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelManager.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelManager.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelManager.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/HiresModelRenderer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/PRBMWriter.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/PRBMWriter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/PRBMWriter.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/PRBMWriter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/RenderSettings.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/RenderSettings.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/RenderSettings.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/RenderSettings.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/TileModel.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/TileModel.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/TileModel.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/TileModel.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelFactory.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelFactory.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelFactory.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/BlockStateModelFactory.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelBuilder.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelBuilder.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelBuilder.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/LiquidModelBuilder.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelBuilder.java b/core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelBuilder.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelBuilder.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/hires/blockmodel/ResourceModelBuilder.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresLayer.java b/core/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresLayer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresLayer.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresLayer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTile.java b/core/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTile.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTile.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTile.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTileManager.java b/core/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTileManager.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTileManager.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/lowres/LowresTileManager.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/CellStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/CellStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/CellStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/CellStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/ChunkInfoRegion.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/ChunkInfoRegion.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/ChunkInfoRegion.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/ChunkInfoRegion.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapChunkState.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapChunkState.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapChunkState.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapChunkState.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapTileState.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapTileState.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapTileState.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/MapTileState.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileActionResolver.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileActionResolver.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileActionResolver.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileActionResolver.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileInfoRegion.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileInfoRegion.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileInfoRegion.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileInfoRegion.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileState.java b/core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileState.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileState.java rename to core/src/main/java/de/bluecolored/bluemap/core/map/renderstate/TileState.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/AbstractTypeAdapterFactory.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/AbstractTypeAdapterFactory.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/AbstractTypeAdapterFactory.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/AbstractTypeAdapterFactory.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/BlockColorCalculatorFactory.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/BlockPropertiesConfig.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockPropertiesConfig.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/BlockPropertiesConfig.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/BlockPropertiesConfig.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/BlockStateMapping.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/BlockStateMapping.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/BlockStateMapping.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/BlockStateMapping.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/MinecraftVersion.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/MinecraftVersion.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/MinecraftVersion.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/MinecraftVersion.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/ResourcePath.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/ResourcePath.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/ResourcePath.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/ResourcePath.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/VersionManifest.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/VersionManifest.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/VersionManifest.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/VersionManifest.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/AxisAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/AxisAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/AxisAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/AxisAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ColorAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ColorAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ColorAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ColorAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/DirectionAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/DirectionAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/DirectionAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/DirectionAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/EnumMapInstanceCreator.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/EnumMapInstanceCreator.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/EnumMapInstanceCreator.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/EnumMapInstanceCreator.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/LocalDateTimeAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/LocalDateTimeAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/LocalDateTimeAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/LocalDateTimeAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/RegistryAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/RegistryAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/RegistryAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/RegistryAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/ResourcesGson.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector2iAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector2iAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector2iAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector2iAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3dAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3dAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3dAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3dAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3fAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3fAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3fAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector3fAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4dAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4dAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4dAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4dAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4fAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4fAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4fAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/adapter/Vector4fAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/Pack.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/Pack.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/Pack.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/Pack.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/PackMeta.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/PackMeta.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/PackMeta.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/PackMeta.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/DataPack.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/DataPack.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/DataPack.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/DataPack.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/biome/DatapackBiome.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/biome/DatapackBiome.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/biome/DatapackBiome.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/biome/DatapackBiome.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/dimension/DimensionTypeData.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/dimension/DimensionTypeData.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/dimension/DimensionTypeData.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/datapack/dimension/DimensionTypeData.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/ResourcePack.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/BlockModel.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Element.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Face.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/Rotation.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockmodel/TextureVariable.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockState.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockState.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockState.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockState.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockStateCondition.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockStateCondition.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockStateCondition.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/BlockStateCondition.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Multipart.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Multipart.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Multipart.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Multipart.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variant.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/VariantSet.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/VariantSet.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/VariantSet.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/VariantSet.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variants.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variants.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variants.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/blockstate/Variants.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/AnimationMeta.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/AnimationMeta.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/AnimationMeta.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/AnimationMeta.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/Texture.java b/core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/Texture.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/Texture.java rename to core/src/main/java/de/bluecolored/bluemap/core/resources/pack/resourcepack/texture/Texture.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/GridStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/GridStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/GridStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/GridStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/ItemStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/ItemStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/ItemStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/ItemStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/KeyedMapStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/KeyedMapStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/KeyedMapStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/KeyedMapStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/MapStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/MapStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/MapStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/MapStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/Storage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/Storage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/Storage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/Storage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/BufferedCompression.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/compression/BufferedCompression.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/BufferedCompression.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/compression/BufferedCompression.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/CompressedInputStream.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/compression/CompressedInputStream.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/CompressedInputStream.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/compression/CompressedInputStream.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/Compression.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/compression/Compression.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/Compression.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/compression/Compression.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/NoCompression.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/compression/NoCompression.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/compression/NoCompression.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/compression/NoCompression.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileGridStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileGridStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileGridStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileGridStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileItemStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileItemStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileItemStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileItemStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileMapStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileMapStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileMapStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileMapStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/file/FileStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/Database.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/Database.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/Database.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/Database.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/PageSpliterator.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/PageSpliterator.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/PageSpliterator.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/PageSpliterator.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLGridStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLGridStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLGridStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLGridStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLItemStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLItemStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLItemStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLItemStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLMapStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLMapStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLMapStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLMapStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLStorage.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLStorage.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLStorage.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/SQLStorage.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/AbstractCommandSet.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/AbstractCommandSet.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/AbstractCommandSet.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/AbstractCommandSet.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/CommandSet.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/CommandSet.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/CommandSet.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/CommandSet.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/MySQLCommandSet.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/MySQLCommandSet.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/MySQLCommandSet.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/MySQLCommandSet.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/PostgreSQLCommandSet.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/PostgreSQLCommandSet.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/PostgreSQLCommandSet.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/PostgreSQLCommandSet.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/SqliteCommandSet.java b/core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/SqliteCommandSet.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/SqliteCommandSet.java rename to core/src/main/java/de/bluecolored/bluemap/core/storage/sql/commandset/SqliteCommandSet.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BiIntConsumer.java b/core/src/main/java/de/bluecolored/bluemap/core/util/BiIntConsumer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BiIntConsumer.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/BiIntConsumer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java b/core/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/BufferedImageUtil.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/CopyingPathVisitor.java b/core/src/main/java/de/bluecolored/bluemap/core/util/CopyingPathVisitor.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/CopyingPathVisitor.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/CopyingPathVisitor.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/DeletingPathVisitor.java b/core/src/main/java/de/bluecolored/bluemap/core/util/DeletingPathVisitor.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/DeletingPathVisitor.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/DeletingPathVisitor.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Direction.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Direction.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Direction.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Direction.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java b/core/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/FileHelper.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Grid.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Grid.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Grid.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Grid.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/InstancePool.java b/core/src/main/java/de/bluecolored/bluemap/core/util/InstancePool.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/InstancePool.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/InstancePool.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/IntComparator.java b/core/src/main/java/de/bluecolored/bluemap/core/util/IntComparator.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/IntComparator.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/IntComparator.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Key.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Key.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Key.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Key.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Keyed.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Keyed.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Keyed.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Keyed.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Lazy.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Lazy.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Lazy.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Lazy.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/MergeSort.java b/core/src/main/java/de/bluecolored/bluemap/core/util/MergeSort.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/MergeSort.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/MergeSort.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/PalettedArrayAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/util/PalettedArrayAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/PalettedArrayAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/PalettedArrayAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Preconditions.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Preconditions.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Preconditions.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Preconditions.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Registry.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Registry.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Registry.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Registry.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/RegistryAdapter.java b/core/src/main/java/de/bluecolored/bluemap/core/util/RegistryAdapter.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/RegistryAdapter.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/RegistryAdapter.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/SizeCollectingPathVisitor.java b/core/src/main/java/de/bluecolored/bluemap/core/util/SizeCollectingPathVisitor.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/SizeCollectingPathVisitor.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/SizeCollectingPathVisitor.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Tristate.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Tristate.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Tristate.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Tristate.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Vector2iCache.java b/core/src/main/java/de/bluecolored/bluemap/core/util/Vector2iCache.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/Vector2iCache.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/Vector2iCache.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/WatchService.java b/core/src/main/java/de/bluecolored/bluemap/core/util/WatchService.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/WatchService.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/WatchService.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Axis.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/Axis.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Axis.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/Axis.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/Color.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM3f.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM3f.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM3f.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM3f.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM4f.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM4f.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM4f.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/MatrixM4f.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2f.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2f.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2f.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2f.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2i.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2i.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2i.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM2i.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM3f.java b/core/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM3f.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM3f.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/math/VectorM3f.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/CountingOutputStream.java b/core/src/main/java/de/bluecolored/bluemap/core/util/stream/CountingOutputStream.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/CountingOutputStream.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/stream/CountingOutputStream.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateInputStream.java b/core/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateInputStream.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateInputStream.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateInputStream.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateOutputStream.java b/core/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateOutputStream.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateOutputStream.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/stream/DelegateOutputStream.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseInputStream.java b/core/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseInputStream.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseInputStream.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseInputStream.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseOutputStream.java b/core/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseOutputStream.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseOutputStream.java rename to core/src/main/java/de/bluecolored/bluemap/core/util/stream/OnCloseOutputStream.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java b/core/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/BlockProperties.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java b/core/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/BlockState.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java b/core/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/Chunk.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/ChunkConsumer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/ChunkConsumer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/ChunkConsumer.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/ChunkConsumer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/DimensionType.java b/core/src/main/java/de/bluecolored/bluemap/core/world/DimensionType.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/DimensionType.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/DimensionType.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/LightData.java b/core/src/main/java/de/bluecolored/bluemap/core/world/LightData.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/LightData.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/LightData.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Region.java b/core/src/main/java/de/bluecolored/bluemap/core/world/Region.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/Region.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/Region.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/World.java b/core/src/main/java/de/bluecolored/bluemap/core/world/World.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/World.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/World.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/biome/Biome.java b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/Biome.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/biome/Biome.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/biome/Biome.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/biome/ColorModifier.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java b/core/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/biome/GrassColorModifier.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/Block.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/BlockNeighborhood.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/ExtendedBlock.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BannerBlockEntity.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntity.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityLoader.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/BlockEntityType.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SignBlockEntity.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java b/core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/block/entity/SkullBlockEntity.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAUtil.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorld.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorldRegionWatchService.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorldRegionWatchService.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorldRegionWatchService.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/MCAWorldRegionWatchService.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/PackedIntArrayAccess.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/PackedIntArrayAccess.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/PackedIntArrayAccess.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/PackedIntArrayAccess.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/ChunkLoader.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/ChunkLoader.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/ChunkLoader.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/ChunkLoader.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_13.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_15.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_15.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_15.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_15.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_16.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/Chunk_1_18.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/LegacyBiomes.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/LegacyBiomes.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/LegacyBiomes.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/LegacyBiomes.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/chunk/MCAChunk.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockStateDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockStateDeserializer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockStateDeserializer.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/BlockStateDeserializer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/DimensionTypeDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/DimensionTypeDeserializer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/DimensionTypeDeserializer.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/DimensionTypeDeserializer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/KeyDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/KeyDeserializer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/KeyDeserializer.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/KeyDeserializer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LenientBlockEntityArrayDeserializer.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LevelData.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LevelData.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LevelData.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/data/LevelData.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/region/LinearRegion.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/LinearRegion.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/region/LinearRegion.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/LinearRegion.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/region/MCARegion.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/MCARegion.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/region/MCARegion.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/MCARegion.java diff --git a/BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java b/core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java similarity index 100% rename from BlueMapCore/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java rename to core/src/main/java/de/bluecolored/bluemap/core/world/mca/region/RegionType.java diff --git a/BlueMapCore/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json b/core/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json rename to core/src/main/resourceExtensions/assets/bluemap/blockstates/missing.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/bluemap/models/block/missing.json b/core/src/main/resourceExtensions/assets/bluemap/models/block/missing.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/bluemap/models/block/missing.json rename to core/src/main/resourceExtensions/assets/bluemap/models/block/missing.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/bluemap/textures/block/missing.png b/core/src/main/resourceExtensions/assets/bluemap/textures/block/missing.png similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/bluemap/textures/block/missing.png rename to core/src/main/resourceExtensions/assets/bluemap/textures/block/missing.png diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockColors.json b/core/src/main/resourceExtensions/assets/minecraft/blockColors.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockColors.json rename to core/src/main/resourceExtensions/assets/minecraft/blockColors.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockProperties.json b/core/src/main/resourceExtensions/assets/minecraft/blockProperties.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockProperties.json rename to core/src/main/resourceExtensions/assets/minecraft/blockProperties.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/acacia_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/bamboo_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/birch_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/black_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/black_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/black_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/black_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/black_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/black_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/blue_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/blue_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/brown_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/brown_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/bubble_column.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/bubble_column.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/bubble_column.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/bubble_column.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/cherry_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/creeper_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/crimson_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/cyan_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/dark_oak_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/decorated_pot.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/decorated_pot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/decorated_pot.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/decorated_pot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/dragon_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/ender_chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/gray_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/gray_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/green_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/green_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/green_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/green_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/green_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/green_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/jungle_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/lava.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_blue_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/light_gray_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/lime_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/lime_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/magenta_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/mangrove_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/oak_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/orange_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/orange_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/piglin_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/pink_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/pink_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/player_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/player_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/player_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/player_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/player_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/player_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/player_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/player_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/purple_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/purple_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/red_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/red_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/red_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/red_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/red_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/red_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_skull.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_wall_skull.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_wall_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_wall_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/skeleton_wall_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/spruce_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/trapped_chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/warped_wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/water.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/water.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/water.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/water.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/white_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/white_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/white_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/white_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/white_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/white_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_skull.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_wall_skull.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_wall_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_wall_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/wither_skeleton_wall_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_bed.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/yellow_wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/blockstates/zombie_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/bed_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/black_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/blue_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/brown_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/cyan_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/gray_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/green_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_blue_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/light_gray_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/lime_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/magenta_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/orange_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/pink_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/purple_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/red_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/white_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_foot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bed/yellow_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_between_walls.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bell_between_walls.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_between_walls.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bell_between_walls.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_ceiling.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bell_ceiling.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_ceiling.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bell_ceiling.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_floor.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bell_floor.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_floor.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bell_floor.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_wall.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bell_wall.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bell_wall.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bell_wall.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bubble_column.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/bubble_column.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/bubble_column.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/bubble_column.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice1.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice1.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice1.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice1.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice2.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice2.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice2.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice2.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice3.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice3.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice3.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice3.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice4.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice4.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice4.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice4.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice5.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice5.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice5.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice5.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice6.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice6.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice6.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/cake_slice6.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest_double.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest_double.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest_double.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/chest_double.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/ender.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/left.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/left.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/left.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/left.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/normal_double.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/chest/trapped_double.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/lava.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/lava.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/lava.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/lava.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/acacia.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/bamboo.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/birch.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/cherry.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/crimson.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/dark_oak.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/jungle.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/mangrove.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/oak.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/spruce.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_acacia.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_bamboo.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_birch.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_cherry.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_crimson.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_dark_oak.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_jungle.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_mangrove.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_oak.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_spruce.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/wall_warped.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/sign/warped.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/water.json b/core/src/main/resourceExtensions/assets/minecraft/models/block/water.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/block/water.json rename to core/src/main/resourceExtensions/assets/minecraft/models/block/water.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/acacia_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/bamboo_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/banner.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/banner.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/birch_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/cherry_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/creeper_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/crimson_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/dark_oak_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/decorated_pot.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/decorated_pot.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/decorated_pot.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/decorated_pot.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/dragon_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dyed_shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/dyed_shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/dyed_shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/dyed_shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/jungle_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/mangrove_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/oak_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/piglin_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/player_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/player_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/player_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/player_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/player_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/player_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/player_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/player_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/shulker_box.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/shulker_box.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/shulker_box.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/shulker_box.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_skull.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_wall_skull.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_wall_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_wall_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/skeleton_wall_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skull_32.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/skull_32.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skull_32.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/skull_32.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skull_64.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/skull_64.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/skull_64.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/skull_64.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/spruce_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_banner.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_banner.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_banner.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_banner.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_32.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_32.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_32.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_32.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_64.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_64.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_64.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/wall_skull_64.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/warped_wall_hanging_sign.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_skull.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_wall_skull.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_wall_skull.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_wall_skull.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/wither_skeleton_wall_skull.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_wall_head.json b/core/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_wall_head.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_wall_head.json rename to core/src/main/resourceExtensions/assets/minecraft/models/entity/zombie_wall_head.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/ender_chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/blockstates/trapped_chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_left.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_left.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_left.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_left.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_right.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_right.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_right.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/chest_double_right.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_left.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/normal_double_right.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_left.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json b/core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json rename to core/src/main/resourceExtensions/mc1_15/assets/minecraft/models/block/chest/trapped_double_right.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_17/assets/minecraft/blockstates/grass_path.json b/core/src/main/resourceExtensions/mc1_17/assets/minecraft/blockstates/grass_path.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_17/assets/minecraft/blockstates/grass_path.json rename to core/src/main/resourceExtensions/mc1_17/assets/minecraft/blockstates/grass_path.json diff --git a/BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/grass.json b/core/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/grass.json similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/grass.json rename to core/src/main/resourceExtensions/mc1_20_3/assets/minecraft/blockstates/grass.json diff --git a/BlueMapCore/src/main/resourceExtensions/pack.mcmeta b/core/src/main/resourceExtensions/pack.mcmeta similarity index 100% rename from BlueMapCore/src/main/resourceExtensions/pack.mcmeta rename to core/src/main/resourceExtensions/pack.mcmeta diff --git a/BlueMapCore/src/main/resources/de/bluecolored/bluemap/version.json b/core/src/main/resources/de/bluecolored/bluemap/version.json similarity index 100% rename from BlueMapCore/src/main/resources/de/bluecolored/bluemap/version.json rename to core/src/main/resources/de/bluecolored/bluemap/version.json diff --git a/BlueMapCore/src/test/java/de/bluecolored/bluemap/core/world/BlockStateTest.java b/core/src/test/java/de/bluecolored/bluemap/core/world/BlockStateTest.java similarity index 100% rename from BlueMapCore/src/test/java/de/bluecolored/bluemap/core/world/BlockStateTest.java rename to core/src/test/java/de/bluecolored/bluemap/core/world/BlockStateTest.java diff --git a/BlueMapCore/src/test/java/de/bluecolored/bluemap/core/world/GridTest.java b/core/src/test/java/de/bluecolored/bluemap/core/world/GridTest.java similarity index 100% rename from BlueMapCore/src/test/java/de/bluecolored/bluemap/core/world/GridTest.java rename to core/src/test/java/de/bluecolored/bluemap/core/world/GridTest.java diff --git a/gradle.properties b/gradle.properties index abb0eb55..95b4763a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1 +1 @@ -org.gradle.jvmargs=-Xmx6G +org.gradle.jvmargs=-Xmx4G diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 00000000..aeedcea8 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,39 @@ +[versions] +bstats = "2.2.1" +configurate = "4.1.2" +junit = "5.8.2" +spongegradle = "2.2.0" + +[libraries] +aircompressor = { module = "io.airlift:aircompressor", version = "0.24" } +bluenbt = { module = "de.bluecolored.bluenbt:BlueNBT", version = "2.3.0" } +brigadier = { module = "com.mojang:brigadier", version = "1.0.17" } +bstats-bukkit = { module = "org.bstats:bstats-bukkit", version.ref = "bstats" } +bstats-sponge = { module = "org.bstats:bstats-sponge", version.ref = "bstats" } +caffeine = { module = "com.github.ben-manes.caffeine:caffeine", version = "3.1.8" } +commons-cli = { module = "commons-cli:commons-cli", version = "1.5.0" } +commons-dbcp2 = { module = "org.apache.commons:commons-dbcp2", version = "2.9.0" } +configurate-hocon = { module = "org.spongepowered:configurate-hocon", version.ref = "configurate" } +configurate-gson = { module = "org.spongepowered:configurate-gson", version.ref = "configurate" } +fabric-permissions = { module = "me.lucko:fabric-permissions-api", version = "0.3.1" } +flow-math = { module = "com.flowpowered:flow-math", version = "1.0.3" } +gson = { module = "com.google.code.gson:gson", version = "2.8.9" } +guava = { module = "com.google.guava:guava", version = "33.3.0-jre" } +jetbrains-annotations = { module = "org.jetbrains:annotations", version = "23.0.0" } +junit-core = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junit" } +junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" } +lombok = { module = "org.projectlombok:lombok", version = "1.18.32" } +lz4 = { module = "org.lz4:lz4-java", version = "1.8.0" } + +[plugins] +cursegradle = { id = "com.matthewprenger.cursegradle", version = "1.4.0" } +forgegradle = { id = "net.minecraftforge.gradle", version = "[6.0.24,6.2)" } +hangar = { id = "io.papermc.hangar-publish-plugin", version = "0.1.2" } +loom = { id = "fabric-loom", version = "1.7.2" } +minotaur = { id = "com.modrinth.minotaur", version = "2.8.7" } +node-gradle = { id = "com.github.node-gradle.node", version = "7.0.2" } +neoforge-gradle = { id = "net.neoforged.moddev", version = "2.0.28-beta" } +shadow = { id = "io.github.goooler.shadow", version = "8.1.8" } +sponge-plugin = { id = "org.spongepowered.gradle.plugin", version.ref = "spongegradle" } +sponge-ore = { id = "org.spongepowered.gradle.ore", version.ref = "spongegradle" } +spotless = { id = "com.diffplug.spotless", version = "6.25.0" } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135c..249e5832 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b82aa23a..d642e7f8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip -networkTimeout=10000 -validateDistributionUrl=true +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 0adc8e1a..1b6c7873 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,11 +80,13 @@ do esac done -# This is normally unused -# shellcheck disable=SC2034 +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" APP_BASE_NAME=${0##*/} -# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -131,29 +133,22 @@ location of your Java installation." fi else JAVACMD=java - if ! command -v java >/dev/null 2>&1 - then - die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." - fi fi # Increase the maximum file descriptors if we can. if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -198,10 +193,6 @@ if "$cygwin" || "$msys" ; then done fi - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in @@ -214,12 +205,6 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index 93e3f59f..107acd32 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%"=="" @echo off +@if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,8 +25,7 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused +if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -41,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -76,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd +if "%ERRORLEVEL%"=="0" goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/implementations/cli/build.gradle.kts b/implementations/cli/build.gradle.kts index 9be58278..fd8ba98d 100644 --- a/implementations/cli/build.gradle.kts +++ b/implementations/cli/build.gradle.kts @@ -1,78 +1,14 @@ plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -val javaTarget = 16 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://repo.bluecolored.de/releases") + bluemap.implementation } dependencies { - api ("de.bluecolored.bluemap:BlueMapCommon") - - implementation ("commons-cli:commons-cli:1.5.0") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") + api ( project( ":common" ) ) + api ( libs.commons.cli ) } -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - - tasks.jar { - manifest { - attributes ( - "Main-Class" to "de.bluecolored.bluemap.cli.BlueMapCLI" - ) - } -} - -tasks.shadowJar { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") -} - -tasks.register("release") { - dependsOn(tasks.shadowJar) -} - -tasks.register("publish") { - + manifest.attributes ( + "Main-Class" to "de.bluecolored.bluemap.cli.BlueMapCLI" + ) } diff --git a/implementations/cli/settings.gradle.kts b/implementations/cli/settings.gradle.kts deleted file mode 100644 index 2055ed8c..00000000 --- a/implementations/cli/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "cli" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/fabric-1.18/build.gradle.kts b/implementations/fabric-1.18/build.gradle.kts deleted file mode 100644 index 1824d640..00000000 --- a/implementations/fabric-1.18/build.gradle.kts +++ /dev/null @@ -1,178 +0,0 @@ -import com.matthewprenger.cursegradle.CurseArtifact -import com.matthewprenger.cursegradle.CurseProject -import com.matthewprenger.cursegradle.CurseRelation -import com.matthewprenger.cursegradle.Options -import net.fabricmc.loom.task.RemapJarTask - -plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("fabric-loom") version "1.6-SNAPSHOT" - id ("com.modrinth.minotaur") version "2.+" - id ("com.matthewprenger.cursegradle") version "1.4.0" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -val javaTarget = 17 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - - withSourcesJar() -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://maven.fabricmc.net/") - maven ("https://repo.bluecolored.de/releases") -} - -val shadowInclude: Configuration by configurations.creating - -configurations { - implementation.get().extendsFrom(shadowInclude) -} - -dependencies { - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by fabric - exclude (group = "com.google.guava", module = "guava") - exclude (group = "com.google.code.gson", module = "gson") - exclude (group = "com.mojang", module = "brigadier") - } - - minecraft ("com.mojang:minecraft:1.18-pre5") - mappings ("net.fabricmc:yarn:1.18-pre5+build.4:v2") - modImplementation ("net.fabricmc:fabric-loader:0.11.3") - modImplementation ("net.fabricmc.fabric-api:fabric-api:0.42.2+1.18") - modImplementation("me.lucko:fabric-permissions-api:0.3.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - inputs.property ("version", project.version) - - filesMatching("fabric.mod.json") { - expand ("version" to project.version) - } -} - -tasks.shadowJar { - configurations = listOf(shadowInclude) - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -tasks.register("remappedShadowJar", type = RemapJarTask::class) { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - dependsOn (tasks.shadowJar) - inputFile.set(tasks.shadowJar.get().archiveFile) - addNestedDependencies.set(true) -} - -tasks.register("release") { - dependsOn("remappedShadowJar") -} - -modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("remappedShadowJar")) - gameVersions.addAll("1.18", "1.18.1", "1.18.2") - dependencies { - required.project("P7dR8mSH") // Fabric API - } -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project(closureOf { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .readText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion("Fabric") - - addGameVersion("Java 18") - addGameVersion("Java 17") - - addGameVersion("1.18") - addGameVersion("1.18.1") - addGameVersion("1.18.2") - - mainArtifact(tasks.findByName("remappedShadowJar"), closureOf { - relations(closureOf { - requiredDependency("fabric-api") - }) - }) - }) - options(closureOf { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - }) -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("curseforge") -} diff --git a/implementations/fabric-1.18/gradle/wrapper/gradle-wrapper.jar b/implementations/fabric-1.18/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 41d9927a..00000000 Binary files a/implementations/fabric-1.18/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/implementations/fabric-1.18/gradle/wrapper/gradle-wrapper.properties b/implementations/fabric-1.18/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 48c0a02c..00000000 --- a/implementations/fabric-1.18/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/implementations/fabric-1.18/gradlew b/implementations/fabric-1.18/gradlew deleted file mode 100644 index 1b6c7873..00000000 --- a/implementations/fabric-1.18/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/implementations/fabric-1.18/gradlew.bat b/implementations/fabric-1.18/gradlew.bat deleted file mode 100644 index 107acd32..00000000 --- a/implementations/fabric-1.18/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/implementations/fabric-1.18/settings.gradle.kts b/implementations/fabric-1.18/settings.gradle.kts deleted file mode 100644 index 5a2d6ee9..00000000 --- a/implementations/fabric-1.18/settings.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -pluginManagement { - repositories { - maven { - name = "Fabric" - url = uri("https://maven.fabricmc.net/") - } - gradlePluginPortal() - } -} - -rootProject.name = "fabric-1.18" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java deleted file mode 100644 index be2e1ae9..00000000 --- a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import me.lucko.fabric.api.permissions.v0.Permissions; -import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.util.math.Vec3d; - -import java.util.Optional; - -public class FabricCommandSource implements CommandSource { - - private final FabricMod mod; - private final Plugin plugin; - private final ServerCommandSource delegate; - - public FabricCommandSource(FabricMod mod, Plugin plugin, ServerCommandSource delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - delegate.sendFeedback(net.minecraft.text.Text.Serializer.fromJson(text.toJSONString()), false); - } - - @Override - public boolean hasPermission(String permission) { - try { - Class.forName("me.lucko.fabric.api.permissions.v0.Permissions"); - return Permissions.check(delegate, permission, 1); - } catch (ClassNotFoundException ex) { - return delegate.hasPermissionLevel(1); - } - } - - @Override - public Optional getPosition() { - Vec3d pos = delegate.getPosition(); - if (pos != null) { - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - return Optional.empty(); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getWorld()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java deleted file mode 100644 index 411e1c34..00000000 --- a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class FabricEventForwarder { - - private final FabricMod mod; - private final Collection eventListeners; - - public FabricEventForwarder(FabricMod mod) { - this.mod = mod; - this.eventListeners = new ArrayList<>(1); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - public synchronized void onPlayerJoin(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - public synchronized void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java deleted file mode 100644 index 1213b877..00000000 --- a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.command.v1.CommandRegistrationCallback; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.SharedConstants; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; -import net.minecraft.util.registry.Registry; -import net.minecraft.util.registry.RegistryKey; -import net.minecraft.world.World; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -public class FabricMod implements ModInitializer, Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final FabricEventForwarder eventForwarder; - - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public FabricMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - pluginInstance = new Plugin("fabric-1.18", this); - - this.eventForwarder = new FabricEventForwarder(this); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(FabricWorld::new); - } - - @Override - public void onInitialize() { - - //register commands - CommandRegistrationCallback.EVENT.register((dispatcher, dedicated) -> - new Commands<>(pluginInstance, dispatcher, fabricSource -> - new FabricCommandSource(this, pluginInstance, fabricSource) - ) - ); - - ServerLifecycleEvents.SERVER_STARTED.register((MinecraftServer server) -> { - this.serverInstance = server; - - new Thread(()->{ - Logger.global.logInfo("Loading BlueMap..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("BlueMap loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - }); - - ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - }); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - - ServerTickEvents.END_SERVER_TICK.register((MinecraftServer server) -> { - if (server == this.serverInstance) this.updateSomePlayers(); - }); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getGameVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (net.minecraft.server.world.ServerWorld serverWorld : serverInstance.getWorlds()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - Identifier identifier = Identifier.tryParse((String) world); - if (identifier != null) world = serverInstance.getWorld(RegistryKey.of(Registry.WORLD_KEY, identifier)); - } - - if (world instanceof RegistryKey) { - try { - world = serverInstance.getWorld((RegistryKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof net.minecraft.server.world.ServerWorld) - return Optional.of(getServerWorld((net.minecraft.server.world.ServerWorld) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(net.minecraft.server.world.ServerWorld serverWorld) { - return worlds.get(serverWorld); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - public void onPlayerJoin(MinecraftServer server, ServerPlayerEntity playerInstance) { - if (this.serverInstance != server) return; - - FabricPlayer player = new FabricPlayer(playerInstance.getUuid(), this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - public void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.serverInstance != server) return; - - UUID playerUUID = player.getUuid(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPluginInstance() { - return pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java deleted file mode 100644 index 5ddf3259..00000000 --- a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.entity.effect.StatusEffectInstance; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.GameMode; -import net.minecraft.world.LightType; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class FabricPlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameMode.class); - static { - GAMEMODE_MAP.put(GameMode.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameMode.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameMode.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameMode.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final FabricMod mod; - - public FabricPlayer(UUID playerUuid, FabricMod mod) { - this.uuid = playerUuid; - this.mod = mod; - - update(); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return this.rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayerEntity player = server.getPlayerManager().getPlayer(uuid); - if (player == null) return; - - this.gamemode = GAMEMODE_MAP.get(player.interactionManager.getGameMode()); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - StatusEffectInstance invis = player.getStatusEffect(StatusEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3d pos = player.getPos(); - this.position = new Vector3d(pos.getX(), pos.getY(), pos.getZ()); - this.rotation = new Vector3d(player.getPitch(), player.getHeadYaw(), 0); - this.sneaking = player.isSneaking(); - - this.skyLight = player.getWorld().getLightingProvider().get(LightType.SKY).getLightLevel(player.getBlockPos()); - this.blockLight = player.getWorld().getLightingProvider().get(LightType.BLOCK).getLightLevel(player.getBlockPos()); - - this.world = mod.getServerWorld(player.getWorld()); - } - -} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java deleted file mode 100644 index ff4468d9..00000000 --- a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Identifier; -import net.minecraft.util.WorldSavePath; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class FabricWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public FabricWorld(net.minecraft.server.world.ServerWorld delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getRunDirectory().toPath() - .resolve(server.getSavePath(WorldSavePath.ROOT)); - - Identifier id = delegate.getRegistryKey().getValue(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - net.minecraft.server.world.ServerWorld world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - FabricWorld that = (FabricWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java b/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java deleted file mode 100644 index 9e60f395..00000000 --- a/implementations/fabric-1.18/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/fabric-1.18/src/main/resources/assets/bluemap/icon.png b/implementations/fabric-1.18/src/main/resources/assets/bluemap/icon.png deleted file mode 100644 index 65d56d7a..00000000 Binary files a/implementations/fabric-1.18/src/main/resources/assets/bluemap/icon.png and /dev/null differ diff --git a/implementations/fabric-1.18/src/main/resources/fabric.mod.json b/implementations/fabric-1.18/src/main/resources/fabric.mod.json deleted file mode 100644 index 3094b41c..00000000 --- a/implementations/fabric-1.18/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schemaVersion": 1, - "id": "bluemap", - "version": "${version}", - - "name": "BlueMap", - "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "authors": [ - "Blue (TBlueF, Lukas Rieger)" - ], - "contact": { - "homepage": "https://github.com/BlueMap-Minecraft", - "sources": "https://github.com/BlueMap-Minecraft/BlueMap" - }, - - "license": "MIT", - "icon": "assets/bluemap/icon.png", - - "environment": "*", - "entrypoints": { - "main": [ - "de.bluecolored.bluemap.fabric.FabricMod" - ] - }, - - "depends": { - "fabricloader": ">=0.11.3", - "fabric": "*", - "fabric-api-base": "*", - "minecraft": ">=1.18-alpha.21.37.a" - }, - "suggests": {} -} diff --git a/implementations/fabric-1.19.4/build.gradle.kts b/implementations/fabric-1.19.4/build.gradle.kts deleted file mode 100644 index d2e7df83..00000000 --- a/implementations/fabric-1.19.4/build.gradle.kts +++ /dev/null @@ -1,176 +0,0 @@ -import com.matthewprenger.cursegradle.CurseArtifact -import com.matthewprenger.cursegradle.CurseProject -import com.matthewprenger.cursegradle.CurseRelation -import com.matthewprenger.cursegradle.Options -import net.fabricmc.loom.task.RemapJarTask - -plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("fabric-loom") version "1.6-SNAPSHOT" - id ("com.modrinth.minotaur") version "2.+" - id ("com.matthewprenger.cursegradle") version "1.4.0" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -val javaTarget = 17 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - - withSourcesJar() -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://maven.fabricmc.net/") - maven ("https://repo.bluecolored.de/releases") -} - -val shadowInclude: Configuration by configurations.creating - -configurations { - implementation.get().extendsFrom(shadowInclude) -} - -dependencies { - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by fabric - exclude (group = "com.google.guava", module = "guava") - exclude (group = "com.google.code.gson", module = "gson") - exclude (group = "com.mojang", module = "brigadier") - } - - minecraft ("com.mojang:minecraft:1.19.4") - mappings ("net.fabricmc:yarn:1.19.4+build.1") - modImplementation ("net.fabricmc:fabric-loader:0.14.17") - modImplementation ("net.fabricmc.fabric-api:fabric-api:0.75.3+1.19.4") - modImplementation("me.lucko:fabric-permissions-api:0.3.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.9.0") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.9.0") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - inputs.property ("version", project.version) - - filesMatching("fabric.mod.json") { - expand ("version" to project.version) - } -} - -tasks.shadowJar { - configurations = listOf(shadowInclude) - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -tasks.register("remappedShadowJar", type = RemapJarTask::class) { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - dependsOn (tasks.shadowJar) - inputFile.set(tasks.shadowJar.get().archiveFile) - addNestedDependencies.set(true) -} - -tasks.register("release") { - dependsOn("remappedShadowJar") -} - -modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("remappedShadowJar")) - gameVersions.addAll("1.19.4") - dependencies { - required.project("P7dR8mSH") // Fabric API - } -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project(closureOf { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .readText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion("Fabric") - - addGameVersion("Java 18") - addGameVersion("Java 17") - - addGameVersion("1.19.4") - - mainArtifact(tasks.findByName("remappedShadowJar"), closureOf { - relations(closureOf { - requiredDependency("fabric-api") - }) - }) - }) - options(closureOf { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - }) -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("curseforge") -} diff --git a/implementations/fabric-1.19.4/settings.gradle.kts b/implementations/fabric-1.19.4/settings.gradle.kts deleted file mode 100644 index fbbfa474..00000000 --- a/implementations/fabric-1.19.4/settings.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -pluginManagement { - repositories { - maven { - name = "Fabric" - url = uri("https://maven.fabricmc.net/") - } - gradlePluginPortal() - } -} - -rootProject.name = "fabric-1.19.4" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java b/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java deleted file mode 100644 index be2e1ae9..00000000 --- a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import me.lucko.fabric.api.permissions.v0.Permissions; -import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.util.math.Vec3d; - -import java.util.Optional; - -public class FabricCommandSource implements CommandSource { - - private final FabricMod mod; - private final Plugin plugin; - private final ServerCommandSource delegate; - - public FabricCommandSource(FabricMod mod, Plugin plugin, ServerCommandSource delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - delegate.sendFeedback(net.minecraft.text.Text.Serializer.fromJson(text.toJSONString()), false); - } - - @Override - public boolean hasPermission(String permission) { - try { - Class.forName("me.lucko.fabric.api.permissions.v0.Permissions"); - return Permissions.check(delegate, permission, 1); - } catch (ClassNotFoundException ex) { - return delegate.hasPermissionLevel(1); - } - } - - @Override - public Optional getPosition() { - Vec3d pos = delegate.getPosition(); - if (pos != null) { - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - return Optional.empty(); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getWorld()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java b/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java deleted file mode 100644 index 411e1c34..00000000 --- a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class FabricEventForwarder { - - private final FabricMod mod; - private final Collection eventListeners; - - public FabricEventForwarder(FabricMod mod) { - this.mod = mod; - this.eventListeners = new ArrayList<>(1); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - public synchronized void onPlayerJoin(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - public synchronized void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java b/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java deleted file mode 100644 index 7a4a8d92..00000000 --- a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.SharedConstants; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; -import net.minecraft.world.World; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -public class FabricMod implements ModInitializer, Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final FabricEventForwarder eventForwarder; - - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public FabricMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - pluginInstance = new Plugin("fabric-1.19.4", this); - - this.eventForwarder = new FabricEventForwarder(this); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(FabricWorld::new); - } - - @Override - public void onInitialize() { - - //register commands - CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> - new Commands<>(pluginInstance, dispatcher, fabricSource -> - new FabricCommandSource(this, pluginInstance, fabricSource) - ) - ); - - ServerLifecycleEvents.SERVER_STARTED.register((MinecraftServer server) -> { - this.serverInstance = server; - - new Thread(()->{ - Logger.global.logInfo("Loading BlueMap..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("BlueMap loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - }); - - ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - }); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - - ServerTickEvents.END_SERVER_TICK.register((MinecraftServer server) -> { - if (server == this.serverInstance) this.updateSomePlayers(); - }); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getGameVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (net.minecraft.server.world.ServerWorld serverWorld : serverInstance.getWorlds()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - Identifier identifier = Identifier.tryParse((String) world); - if (identifier != null) world = serverInstance.getWorld(RegistryKey.of(RegistryKeys.WORLD, identifier)); - } - - if (world instanceof RegistryKey) { - try { - world = serverInstance.getWorld((RegistryKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof net.minecraft.server.world.ServerWorld) - return Optional.of(getServerWorld((net.minecraft.server.world.ServerWorld) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(net.minecraft.server.world.ServerWorld serverWorld) { - return worlds.get(serverWorld); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - public void onPlayerJoin(MinecraftServer server, ServerPlayerEntity playerInstance) { - if (this.serverInstance != server) return; - - FabricPlayer player = new FabricPlayer(playerInstance.getUuid(), this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - public void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.serverInstance != server) return; - - UUID playerUUID = player.getUuid(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPluginInstance() { - return pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java b/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java deleted file mode 100644 index 708a87fa..00000000 --- a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.entity.effect.StatusEffectInstance; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.GameMode; -import net.minecraft.world.LightType; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class FabricPlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameMode.class); - static { - GAMEMODE_MAP.put(GameMode.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameMode.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameMode.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameMode.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final FabricMod mod; - - public FabricPlayer(UUID playerUuid, FabricMod mod) { - this.uuid = playerUuid; - this.mod = mod; - - update(); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayerEntity player = server.getPlayerManager().getPlayer(uuid); - if (player == null) return; - - this.gamemode = GAMEMODE_MAP.get(player.interactionManager.getGameMode()); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - StatusEffectInstance invis = player.getStatusEffect(StatusEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3d pos = player.getPos(); - this.position = new Vector3d(pos.getX(), pos.getY(), pos.getZ()); - this.rotation = new Vector3d(player.getPitch(), player.getHeadYaw(), 0); - this.sneaking = player.isSneaking(); - - this.skyLight = player.getWorld().getLightingProvider().get(LightType.SKY).getLightLevel(player.getBlockPos()); - this.blockLight = player.getWorld().getLightingProvider().get(LightType.BLOCK).getLightLevel(player.getBlockPos()); - - this.world = mod.getServerWorld(player.getWorld()); - } - -} diff --git a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java b/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java deleted file mode 100644 index ff4468d9..00000000 --- a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Identifier; -import net.minecraft.util.WorldSavePath; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class FabricWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public FabricWorld(net.minecraft.server.world.ServerWorld delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getRunDirectory().toPath() - .resolve(server.getSavePath(WorldSavePath.ROOT)); - - Identifier id = delegate.getRegistryKey().getValue(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - net.minecraft.server.world.ServerWorld world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - FabricWorld that = (FabricWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java b/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java deleted file mode 100644 index 9e60f395..00000000 --- a/implementations/fabric-1.19.4/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/fabric-1.19.4/src/main/resources/assets/bluemap/icon.png b/implementations/fabric-1.19.4/src/main/resources/assets/bluemap/icon.png deleted file mode 100644 index 65d56d7a..00000000 Binary files a/implementations/fabric-1.19.4/src/main/resources/assets/bluemap/icon.png and /dev/null differ diff --git a/implementations/fabric-1.19.4/src/main/resources/fabric.mod.json b/implementations/fabric-1.19.4/src/main/resources/fabric.mod.json deleted file mode 100644 index aa928c95..00000000 --- a/implementations/fabric-1.19.4/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schemaVersion": 1, - "id": "bluemap", - "version": "${version}", - - "name": "BlueMap", - "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "authors": [ - "Blue (TBlueF, Lukas Rieger)" - ], - "contact": { - "homepage": "https://github.com/BlueMap-Minecraft", - "sources": "https://github.com/BlueMap-Minecraft/BlueMap" - }, - - "license": "MIT", - "icon": "assets/bluemap/icon.png", - - "environment": "*", - "entrypoints": { - "main": [ - "de.bluecolored.bluemap.fabric.FabricMod" - ] - }, - - "depends": { - "fabricloader": ">=0.14.17", - "fabric": "*", - "fabric-api-base": "*", - "minecraft": "*" - }, - "suggests": {} -} diff --git a/implementations/fabric-1.20.5/build.gradle.kts b/implementations/fabric-1.20.5/build.gradle.kts deleted file mode 100644 index e67caf26..00000000 --- a/implementations/fabric-1.20.5/build.gradle.kts +++ /dev/null @@ -1,176 +0,0 @@ -import com.matthewprenger.cursegradle.CurseArtifact -import com.matthewprenger.cursegradle.CurseProject -import com.matthewprenger.cursegradle.CurseRelation -import com.matthewprenger.cursegradle.Options -import net.fabricmc.loom.task.RemapJarTask - -plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("fabric-loom") version "1.6-SNAPSHOT" - id ("com.modrinth.minotaur") version "2.+" - id ("com.matthewprenger.cursegradle") version "1.4.0" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -val javaTarget = 21 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - - withSourcesJar() -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://maven.fabricmc.net/") - maven ("https://repo.bluecolored.de/releases") -} - -val shadowInclude: Configuration by configurations.creating - -configurations { - implementation.get().extendsFrom(shadowInclude) -} - -dependencies { - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by fabric - exclude (group = "com.google.guava", module = "guava") - exclude (group = "com.google.code.gson", module = "gson") - exclude (group = "com.mojang", module = "brigadier") - } - - minecraft ("com.mojang:minecraft:1.20.5") - mappings ("net.fabricmc:yarn:1.20.5+build.1") - modImplementation ("net.fabricmc:fabric-loader:0.15.10") - modImplementation ("net.fabricmc.fabric-api:fabric-api:0.97.8+1.20.5") - modImplementation("me.lucko:fabric-permissions-api:0.3.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.9.0") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.9.0") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - inputs.property ("version", project.version) - - filesMatching("fabric.mod.json") { - expand ("version" to project.version) - } -} - -tasks.shadowJar { - configurations = listOf(shadowInclude) - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -tasks.register("remappedShadowJar", type = RemapJarTask::class) { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - dependsOn (tasks.shadowJar) - inputFile.set(tasks.shadowJar.get().archiveFile) - addNestedDependencies.set(true) -} - -tasks.register("release") { - dependsOn("remappedShadowJar") -} - -modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("remappedShadowJar")) - gameVersions.addAll("1.20.5", "1.20.6") - dependencies { - required.project("P7dR8mSH") // Fabric API - } -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project(closureOf { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .readText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion("Fabric") - - addGameVersion("Java 21") - - addGameVersion("1.20.5") - addGameVersion("1.20.6") - - mainArtifact(tasks.findByName("remappedShadowJar"), closureOf { - relations(closureOf { - requiredDependency("fabric-api") - }) - }) - }) - options(closureOf { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - }) -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("curseforge") -} diff --git a/implementations/fabric-1.20.5/settings.gradle.kts b/implementations/fabric-1.20.5/settings.gradle.kts deleted file mode 100644 index 99ed8cbd..00000000 --- a/implementations/fabric-1.20.5/settings.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -pluginManagement { - repositories { - maven { - name = "Fabric" - url = uri("https://maven.fabricmc.net/") - } - gradlePluginPortal() - } -} - -rootProject.name = "fabric-1.20.5" - -includeBuild("../../BlueMapCommon") diff --git a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java b/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java deleted file mode 100644 index 2636fe1b..00000000 --- a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import me.lucko.fabric.api.permissions.v0.Permissions; -import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.util.math.Vec3d; - -import java.util.Optional; - -public class FabricCommandSource implements CommandSource { - - private final FabricMod mod; - private final Plugin plugin; - private final ServerCommandSource delegate; - - public FabricCommandSource(FabricMod mod, Plugin plugin, ServerCommandSource delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - delegate.sendFeedback( - () -> net.minecraft.text.Text.Serialization - .fromJson(text.toJSONString(), delegate.getRegistryManager()), - false - ); - } - - @Override - public boolean hasPermission(String permission) { - try { - Class.forName("me.lucko.fabric.api.permissions.v0.Permissions"); - return Permissions.check(delegate, permission, 1); - } catch (ClassNotFoundException ex) { - return delegate.hasPermissionLevel(1); - } - } - - @Override - public Optional getPosition() { - Vec3d pos = delegate.getPosition(); - if (pos != null) { - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - return Optional.empty(); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getWorld()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java b/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java deleted file mode 100644 index 411e1c34..00000000 --- a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class FabricEventForwarder { - - private final FabricMod mod; - private final Collection eventListeners; - - public FabricEventForwarder(FabricMod mod) { - this.mod = mod; - this.eventListeners = new ArrayList<>(1); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - public synchronized void onPlayerJoin(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - public synchronized void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java b/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java deleted file mode 100644 index 2d2c3fa1..00000000 --- a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.SharedConstants; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; -import net.minecraft.world.World; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -public class FabricMod implements ModInitializer, Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final FabricEventForwarder eventForwarder; - - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public FabricMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - pluginInstance = new Plugin("fabric", this); - - this.eventForwarder = new FabricEventForwarder(this); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(FabricWorld::new); - } - - @Override - public void onInitialize() { - - //register commands - CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> - new Commands<>(pluginInstance, dispatcher, fabricSource -> - new FabricCommandSource(this, pluginInstance, fabricSource) - ) - ); - - ServerLifecycleEvents.SERVER_STARTED.register((MinecraftServer server) -> { - this.serverInstance = server; - - new Thread(()->{ - Logger.global.logInfo("Loading BlueMap..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("BlueMap loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - }); - - ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - }); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - - ServerTickEvents.END_SERVER_TICK.register((MinecraftServer server) -> { - if (server == this.serverInstance) this.updateSomePlayers(); - }); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getGameVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (net.minecraft.server.world.ServerWorld serverWorld : serverInstance.getWorlds()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - Identifier identifier = Identifier.tryParse((String) world); - if (identifier != null) world = serverInstance.getWorld(RegistryKey.of(RegistryKeys.WORLD, identifier)); - } - - if (world instanceof RegistryKey) { - try { - world = serverInstance.getWorld((RegistryKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof net.minecraft.server.world.ServerWorld) - return Optional.of(getServerWorld((net.minecraft.server.world.ServerWorld) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(net.minecraft.server.world.ServerWorld serverWorld) { - return worlds.get(serverWorld); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - public void onPlayerJoin(MinecraftServer server, ServerPlayerEntity playerInstance) { - if (this.serverInstance != server) return; - - FabricPlayer player = new FabricPlayer(playerInstance, this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - public void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.serverInstance != server) return; - - UUID playerUUID = player.getUuid(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPluginInstance() { - return pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java b/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java deleted file mode 100644 index 692256dd..00000000 --- a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.entity.effect.StatusEffectInstance; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.GameMode; -import net.minecraft.world.LightType; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class FabricPlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameMode.class); - static { - GAMEMODE_MAP.put(GameMode.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameMode.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameMode.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameMode.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final FabricMod mod; - - public FabricPlayer(ServerPlayerEntity player, FabricMod mod) { - this.uuid = player.getUuid(); - this.mod = mod; - - update(player); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayerEntity player = server.getPlayerManager().getPlayer(uuid); - if (player == null) return; - - update(player); - } - - public void update(ServerPlayerEntity player) { - this.gamemode = GAMEMODE_MAP.get(player.interactionManager.getGameMode()); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - StatusEffectInstance invis = player.getStatusEffect(StatusEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3d pos = player.getPos(); - this.position = new Vector3d(pos.getX(), pos.getY(), pos.getZ()); - this.rotation = new Vector3d(player.getPitch(), player.getHeadYaw(), 0); - this.sneaking = player.isSneaking(); - - this.skyLight = player.getWorld().getLightingProvider().get(LightType.SKY).getLightLevel(player.getBlockPos()); - this.blockLight = player.getWorld().getLightingProvider().get(LightType.BLOCK).getLightLevel(player.getBlockPos()); - - this.world = mod.getServerWorld(player.getServerWorld()); - } - -} diff --git a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java b/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java deleted file mode 100644 index ff4468d9..00000000 --- a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Identifier; -import net.minecraft.util.WorldSavePath; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class FabricWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public FabricWorld(net.minecraft.server.world.ServerWorld delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getRunDirectory().toPath() - .resolve(server.getSavePath(WorldSavePath.ROOT)); - - Identifier id = delegate.getRegistryKey().getValue(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - net.minecraft.server.world.ServerWorld world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - FabricWorld that = (FabricWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java b/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java deleted file mode 100644 index 9e60f395..00000000 --- a/implementations/fabric-1.20.5/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/fabric-1.20.5/src/main/resources/assets/bluemap/icon.png b/implementations/fabric-1.20.5/src/main/resources/assets/bluemap/icon.png deleted file mode 100644 index 65d56d7a..00000000 Binary files a/implementations/fabric-1.20.5/src/main/resources/assets/bluemap/icon.png and /dev/null differ diff --git a/implementations/fabric-1.20.5/src/main/resources/fabric.mod.json b/implementations/fabric-1.20.5/src/main/resources/fabric.mod.json deleted file mode 100644 index 7a3c43c8..00000000 --- a/implementations/fabric-1.20.5/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schemaVersion": 1, - "id": "bluemap", - "version": "${version}", - - "name": "BlueMap", - "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "authors": [ - "Blue (TBlueF, Lukas Rieger)" - ], - "contact": { - "homepage": "https://github.com/BlueMap-Minecraft", - "sources": "https://github.com/BlueMap-Minecraft/BlueMap" - }, - - "license": "MIT", - "icon": "assets/bluemap/icon.png", - - "environment": "*", - "entrypoints": { - "main": [ - "de.bluecolored.bluemap.fabric.FabricMod" - ] - }, - - "depends": { - "fabricloader": ">=0.15.10", - "fabric": "*", - "fabric-api-base": "*", - "minecraft": "*" - }, - "suggests": {} -} diff --git a/implementations/fabric-1.20/build.gradle.kts b/implementations/fabric-1.20/build.gradle.kts deleted file mode 100644 index 94ddf704..00000000 --- a/implementations/fabric-1.20/build.gradle.kts +++ /dev/null @@ -1,180 +0,0 @@ -import com.matthewprenger.cursegradle.CurseArtifact -import com.matthewprenger.cursegradle.CurseProject -import com.matthewprenger.cursegradle.CurseRelation -import com.matthewprenger.cursegradle.Options -import net.fabricmc.loom.task.RemapJarTask - -plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("fabric-loom") version "1.6-SNAPSHOT" - id ("com.modrinth.minotaur") version "2.+" - id ("com.matthewprenger.cursegradle") version "1.4.0" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -val javaTarget = 17 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - - withSourcesJar() -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://maven.fabricmc.net/") - maven ("https://repo.bluecolored.de/releases") -} - -val shadowInclude: Configuration by configurations.creating - -configurations { - implementation.get().extendsFrom(shadowInclude) -} - -dependencies { - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by fabric - exclude (group = "com.google.guava", module = "guava") - exclude (group = "com.google.code.gson", module = "gson") - exclude (group = "com.mojang", module = "brigadier") - } - - minecraft ("com.mojang:minecraft:1.20") - mappings ("net.fabricmc:yarn:1.20+build.1") - modImplementation ("net.fabricmc:fabric-loader:0.14.21") - modImplementation ("net.fabricmc.fabric-api:fabric-api:0.83.0+1.20") - modImplementation("me.lucko:fabric-permissions-api:0.3.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.9.0") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.9.0") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - inputs.property ("version", project.version) - - filesMatching("fabric.mod.json") { - expand ("version" to project.version) - } -} - -tasks.shadowJar { - configurations = listOf(shadowInclude) - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -tasks.register("remappedShadowJar", type = RemapJarTask::class) { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - dependsOn (tasks.shadowJar) - inputFile.set(tasks.shadowJar.get().archiveFile) - addNestedDependencies.set(true) -} - -tasks.register("release") { - dependsOn("remappedShadowJar") -} - -modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("remappedShadowJar")) - gameVersions.addAll("1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4") - dependencies { - required.project("P7dR8mSH") // Fabric API - } -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project(closureOf { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .readText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion("Fabric") - - addGameVersion("Java 18") - addGameVersion("Java 17") - - addGameVersion("1.20") - addGameVersion("1.20.1") - addGameVersion("1.20.2") - addGameVersion("1.20.3") - addGameVersion("1.20.4") - - mainArtifact(tasks.findByName("remappedShadowJar"), closureOf { - relations(closureOf { - requiredDependency("fabric-api") - }) - }) - }) - options(closureOf { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - }) -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("curseforge") -} diff --git a/implementations/fabric-1.20/settings.gradle.kts b/implementations/fabric-1.20/settings.gradle.kts deleted file mode 100644 index abec8204..00000000 --- a/implementations/fabric-1.20/settings.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -pluginManagement { - repositories { - maven { - name = "Fabric" - url = uri("https://maven.fabricmc.net/") - } - gradlePluginPortal() - } -} - -rootProject.name = "fabric-1.20" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java b/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java deleted file mode 100644 index 5c641c7c..00000000 --- a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricCommandSource.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import me.lucko.fabric.api.permissions.v0.Permissions; -import net.minecraft.server.command.ServerCommandSource; -import net.minecraft.util.math.Vec3d; - -import java.util.Optional; - -public class FabricCommandSource implements CommandSource { - - private final FabricMod mod; - private final Plugin plugin; - private final ServerCommandSource delegate; - - public FabricCommandSource(FabricMod mod, Plugin plugin, ServerCommandSource delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - delegate.sendFeedback(() -> net.minecraft.text.Text.Serializer.fromJson(text.toJSONString()), false); - } - - @Override - public boolean hasPermission(String permission) { - try { - Class.forName("me.lucko.fabric.api.permissions.v0.Permissions"); - return Permissions.check(delegate, permission, 1); - } catch (ClassNotFoundException ex) { - return delegate.hasPermissionLevel(1); - } - } - - @Override - public Optional getPosition() { - Vec3d pos = delegate.getPosition(); - if (pos != null) { - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - return Optional.empty(); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getWorld()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java b/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java deleted file mode 100644 index 411e1c34..00000000 --- a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricEventForwarder.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class FabricEventForwarder { - - private final FabricMod mod; - private final Collection eventListeners; - - public FabricEventForwarder(FabricMod mod) { - this.mod = mod; - this.eventListeners = new ArrayList<>(1); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - public synchronized void onPlayerJoin(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - public synchronized void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.mod.getServer() != server) return; - - UUID uuid = player.getUuid(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java b/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java deleted file mode 100644 index c4bc0ad8..00000000 --- a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricMod.java +++ /dev/null @@ -1,241 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.fabricmc.api.ModInitializer; -import net.fabricmc.fabric.api.command.v2.CommandRegistrationCallback; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents; -import net.fabricmc.fabric.api.event.lifecycle.v1.ServerTickEvents; -import net.fabricmc.fabric.api.networking.v1.ServerPlayConnectionEvents; -import net.minecraft.SharedConstants; -import net.minecraft.registry.RegistryKey; -import net.minecraft.registry.RegistryKeys; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.Identifier; -import net.minecraft.world.World; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -public class FabricMod implements ModInitializer, Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final FabricEventForwarder eventForwarder; - - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public FabricMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - pluginInstance = new Plugin("fabric-1.20", this); - - this.eventForwarder = new FabricEventForwarder(this); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(FabricWorld::new); - } - - @Override - public void onInitialize() { - - //register commands - CommandRegistrationCallback.EVENT.register((dispatcher, registryAccess, environment) -> - new Commands<>(pluginInstance, dispatcher, fabricSource -> - new FabricCommandSource(this, pluginInstance, fabricSource) - ) - ); - - ServerLifecycleEvents.SERVER_STARTED.register((MinecraftServer server) -> { - this.serverInstance = server; - - new Thread(()->{ - Logger.global.logInfo("Loading BlueMap..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("BlueMap loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - }); - - ServerLifecycleEvents.SERVER_STOPPING.register((MinecraftServer server) -> { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - }); - - ServerPlayConnectionEvents.JOIN.register((handler, sender, server) -> { - this.onPlayerJoin(server, handler.getPlayer()); - }); - - ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { - this.onPlayerLeave(server, handler.getPlayer()); - }); - - ServerTickEvents.END_SERVER_TICK.register((MinecraftServer server) -> { - if (server == this.serverInstance) this.updateSomePlayers(); - }); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getGameVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (net.minecraft.server.world.ServerWorld serverWorld : serverInstance.getWorlds()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - Identifier identifier = Identifier.tryParse((String) world); - if (identifier != null) world = serverInstance.getWorld(RegistryKey.of(RegistryKeys.WORLD, identifier)); - } - - if (world instanceof RegistryKey) { - try { - world = serverInstance.getWorld((RegistryKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof net.minecraft.server.world.ServerWorld) - return Optional.of(getServerWorld((net.minecraft.server.world.ServerWorld) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(net.minecraft.server.world.ServerWorld serverWorld) { - return worlds.get(serverWorld); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - public void onPlayerJoin(MinecraftServer server, ServerPlayerEntity playerInstance) { - if (this.serverInstance != server) return; - - FabricPlayer player = new FabricPlayer(playerInstance, this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - public void onPlayerLeave(MinecraftServer server, ServerPlayerEntity player) { - if (this.serverInstance != server) return; - - UUID playerUUID = player.getUuid(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPluginInstance() { - return pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java b/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java deleted file mode 100644 index 692256dd..00000000 --- a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricPlayer.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.entity.effect.StatusEffectInstance; -import net.minecraft.entity.effect.StatusEffects; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.network.ServerPlayerEntity; -import net.minecraft.util.math.Vec3d; -import net.minecraft.world.GameMode; -import net.minecraft.world.LightType; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class FabricPlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameMode.class); - static { - GAMEMODE_MAP.put(GameMode.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameMode.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameMode.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameMode.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final FabricMod mod; - - public FabricPlayer(ServerPlayerEntity player, FabricMod mod) { - this.uuid = player.getUuid(); - this.mod = mod; - - update(player); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayerEntity player = server.getPlayerManager().getPlayer(uuid); - if (player == null) return; - - update(player); - } - - public void update(ServerPlayerEntity player) { - this.gamemode = GAMEMODE_MAP.get(player.interactionManager.getGameMode()); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - StatusEffectInstance invis = player.getStatusEffect(StatusEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3d pos = player.getPos(); - this.position = new Vector3d(pos.getX(), pos.getY(), pos.getZ()); - this.rotation = new Vector3d(player.getPitch(), player.getHeadYaw(), 0); - this.sneaking = player.isSneaking(); - - this.skyLight = player.getWorld().getLightingProvider().get(LightType.SKY).getLightLevel(player.getBlockPos()); - this.blockLight = player.getWorld().getLightingProvider().get(LightType.BLOCK).getLightLevel(player.getBlockPos()); - - this.world = mod.getServerWorld(player.getServerWorld()); - } - -} diff --git a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java b/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java deleted file mode 100644 index ff4468d9..00000000 --- a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/FabricWorld.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.server.MinecraftServer; -import net.minecraft.util.Identifier; -import net.minecraft.util.WorldSavePath; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class FabricWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public FabricWorld(net.minecraft.server.world.ServerWorld delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getRunDirectory().toPath() - .resolve(server.getSavePath(WorldSavePath.ROOT)); - - Identifier id = delegate.getRegistryKey().getValue(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - net.minecraft.server.world.ServerWorld world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - FabricWorld that = (FabricWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java b/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java deleted file mode 100644 index 9e60f395..00000000 --- a/implementations/fabric-1.20/src/main/java/de/bluecolored/bluemap/fabric/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.fabric; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/fabric-1.20/src/main/resources/assets/bluemap/icon.png b/implementations/fabric-1.20/src/main/resources/assets/bluemap/icon.png deleted file mode 100644 index 65d56d7a..00000000 Binary files a/implementations/fabric-1.20/src/main/resources/assets/bluemap/icon.png and /dev/null differ diff --git a/implementations/fabric-1.20/src/main/resources/fabric.mod.json b/implementations/fabric-1.20/src/main/resources/fabric.mod.json deleted file mode 100644 index 673dd6bd..00000000 --- a/implementations/fabric-1.20/src/main/resources/fabric.mod.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schemaVersion": 1, - "id": "bluemap", - "version": "${version}", - - "name": "BlueMap", - "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "authors": [ - "Blue (TBlueF, Lukas Rieger)" - ], - "contact": { - "homepage": "https://github.com/BlueMap-Minecraft", - "sources": "https://github.com/BlueMap-Minecraft/BlueMap" - }, - - "license": "MIT", - "icon": "assets/bluemap/icon.png", - - "environment": "*", - "entrypoints": { - "main": [ - "de.bluecolored.bluemap.fabric.FabricMod" - ] - }, - - "depends": { - "fabricloader": ">=0.14.21", - "fabric": "*", - "fabric-api-base": "*", - "minecraft": "*" - }, - "suggests": {} -} diff --git a/implementations/fabric/build.gradle.kts b/implementations/fabric/build.gradle.kts index 7fe4dab3..9da56910 100644 --- a/implementations/fabric/build.gradle.kts +++ b/implementations/fabric/build.gradle.kts @@ -1,175 +1,111 @@ -import com.matthewprenger.cursegradle.CurseArtifact -import com.matthewprenger.cursegradle.CurseProject -import com.matthewprenger.cursegradle.CurseRelation -import com.matthewprenger.cursegradle.Options import net.fabricmc.loom.task.RemapJarTask plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("fabric-loom") version "1.6-SNAPSHOT" - id ("com.modrinth.minotaur") version "2.+" - id ("com.matthewprenger.cursegradle") version "1.4.0" + bluemap.implementation + bluemap.modrinth + bluemap.curseforge + alias ( libs.plugins.loom ) } -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore +val supportedMinecraftVersions = listOf( + "1.21" +) -val javaTarget = 21 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) - - withSourcesJar() -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://maven.fabricmc.net/") - maven ("https://repo.bluecolored.de/releases") -} +val minecraftVersion = supportedMinecraftVersions.first() +val yarnMappings = "${minecraftVersion}+build.1" +val fabricLoaderVersion = "0.15.11" +val fabricApiVersion = "0.100.1+${minecraftVersion}" val shadowInclude: Configuration by configurations.creating - -configurations { - implementation.get().extendsFrom(shadowInclude) -} +configurations.api.get().extendsFrom(shadowInclude) dependencies { - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by fabric - exclude (group = "com.google.guava", module = "guava") - exclude (group = "com.google.code.gson", module = "gson") - exclude (group = "com.mojang", module = "brigadier") - } - minecraft ("com.mojang:minecraft:1.21") - mappings ("net.fabricmc:yarn:1.21+build.1") - modImplementation ("net.fabricmc:fabric-loader:0.15.11") - modImplementation ("net.fabricmc.fabric-api:fabric-api:0.100.1+1.21") - modImplementation("me.lucko:fabric-permissions-api:0.3.1") + shadowInclude ( project( ":common" ) ) { + exclude ( group = "com.google.code.gson", module = "gson" ) + exclude ( group = "com.mojang", module = "brigadier" ) + } - testImplementation ("org.junit.jupiter:junit-jupiter:5.9.0") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.9.0") -} + minecraft ("com.mojang:minecraft:${minecraftVersion}") + mappings ("net.fabricmc:yarn:${yarnMappings}") + modImplementation ("net.fabricmc:fabric-loader:${fabricLoaderVersion}") + modImplementation ("net.fabricmc.fabric-api:fabric-api:${fabricApiVersion}") + modImplementation( libs.fabric.permissions ) -spotless { - java { - target ("src/*/java/**/*.java") + // jarInJar + include ( libs.flow.math ) - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - inputs.property ("version", project.version) - - filesMatching("fabric.mod.json") { - expand ("version" to project.version) - } } tasks.shadowJar { - configurations = listOf(shadowInclude) + configurations = listOf(shadowInclude) - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + // exclude jarInJar + dependencies { + exclude( dependency ( libs.flow.math.get() ) ) + } - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") + // airlift + relocate ("io.airlift", "de.bluecolored.shadow.airlift") + + // bluenbt + relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") + + // caffeine + relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("com.google.errorprone", "de.bluecolored.shadow.errorprone") + + // dbcp2 + relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons") + + // configurate + relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") + relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + + // lz4 + relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + + // bstats + relocate ("org.bstats", "de.bluecolored.shadow.bstats") - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") } -tasks.register("remappedShadowJar", type = RemapJarTask::class) { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - dependsOn (tasks.shadowJar) - inputFile.set(tasks.shadowJar.get().archiveFile) - addNestedDependencies.set(true) +tasks.withType(ProcessResources::class).configureEach { + val replacements = mapOf( + "version" to project.version, + "fabric_loader_version" to fabricLoaderVersion, + "minecraft_version" to minecraftVersion, + "java_version" to java.toolchain.languageVersion.get() + ) + inputs.properties(replacements) + filesMatching(listOf( + "fabric.mod.json", + )) { expand(replacements) } } -tasks.register("release") { - dependsOn("remappedShadowJar") +val remappedShadowJar = tasks.register("remappedShadowJar", type = RemapJarTask::class) { + dependsOn (tasks.shadowJar) + archiveFileName = "${project.name}-${project.version}-shadow-remapped.jar" + inputFile = tasks.shadowJar.flatMap { it.archiveFile } + addNestedDependencies = true +} + +tasks.getByName("release") { + dependsOn(remappedShadowJar) + inputFile = remappedShadowJar.flatMap { it.archiveFile } } modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("remappedShadowJar")) - gameVersions.addAll("1.21") - dependencies { - required.project("P7dR8mSH") // Fabric API - } + gameVersions.addAll(supportedMinecraftVersions) + dependencies { required.project("P7dR8mSH") } // Fabric API } -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project(closureOf { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .readText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion("Fabric") - - addGameVersion("Java 21") - - addGameVersion("1.21") - - mainArtifact(tasks.findByName("remappedShadowJar"), closureOf { - relations(closureOf { - requiredDependency("fabric-api") - }) - }) - }) - options(closureOf { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - }) -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("curseforge") +curseforgeBlueMap { + addGameVersion("Fabric") + addGameVersion("Java ${java.toolchain.languageVersion.get()}") + supportedMinecraftVersions.forEach { + addGameVersion(it) + } } diff --git a/implementations/fabric/settings.gradle.kts b/implementations/fabric/settings.gradle.kts deleted file mode 100644 index 9eb20cab..00000000 --- a/implementations/fabric/settings.gradle.kts +++ /dev/null @@ -1,13 +0,0 @@ -pluginManagement { - repositories { - maven { - name = "Fabric" - url = uri("https://maven.fabricmc.net/") - } - gradlePluginPortal() - } -} - -rootProject.name = "fabric" - -includeBuild("../../BlueMapCommon") diff --git a/implementations/fabric/src/main/resources/fabric.mod.json b/implementations/fabric/src/main/resources/fabric.mod.json index 7a3c43c8..9e8f673f 100644 --- a/implementations/fabric/src/main/resources/fabric.mod.json +++ b/implementations/fabric/src/main/resources/fabric.mod.json @@ -12,7 +12,6 @@ "homepage": "https://github.com/BlueMap-Minecraft", "sources": "https://github.com/BlueMap-Minecraft/BlueMap" }, - "license": "MIT", "icon": "assets/bluemap/icon.png", @@ -24,10 +23,11 @@ }, "depends": { - "fabricloader": ">=0.15.10", - "fabric": "*", - "fabric-api-base": "*", - "minecraft": "*" + "java": ">=${java_version}", + "minecraft": ">=${minecraft_version}", + "fabricloader": ">=${fabric_loader_version}", + "fabric-api-base": "*" }, + "suggests": {} } diff --git a/implementations/forge-1.18.1/build.gradle b/implementations/forge-1.18.1/build.gradle deleted file mode 100644 index 02a5b7a5..00000000 --- a/implementations/forge-1.18.1/build.gradle +++ /dev/null @@ -1,208 +0,0 @@ -buildscript { - repositories { - // These repositories are only for Gradle plugins, put any other repositories in the repository block further below - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true - } -} - -plugins { - id "java" - id "java-library" - id "com.diffplug.spotless" version "6.1.2" - id "com.github.node-gradle.node" version "3.0.1" - id "com.github.johnrengelman.shadow" version "8.1.1" - id "com.modrinth.minotaur" version "2.+" - id "com.matthewprenger.cursegradle" version "1.4.0" -} - -apply plugin: "net.minecraftforge.gradle" - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore -archivesBaseName = 'bluemap' - -def javaTarget = 17 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) -} - -minecraft { - mappings channel: 'official', version: '1.18.1' - - runs { - server { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - mods { - bluemap { - source sourceSets.main - } - } - } - } -} - -sourceSets.main.resources { srcDir 'src/generated/resources' } - -repositories { - mavenCentral() - maven { url = "https://libraries.minecraft.net" } - maven { url = "https://repo.bluecolored.de/releases" } -} - -configurations { - implementation.extendsFrom(shadowInclude) -} - -dependencies { - minecraft 'net.minecraftforge:forge:1.18.1-39.0.19' - - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by forge - exclude (group: "com.google.guava", module: "guava") - exclude (group: "com.google.code.gson", module: "gson") - exclude (group: "com.mojang", module: "brigadier") - } - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -jar { - manifest { - attributes([ - "Specification-Title" : "bluemap", - "Specification-Vendor" : "bluemap", - "Specification-Version" : "1", // We are version 1 of ourselves - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "bluemap", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") - ]) - } -} - -jar.finalizedBy('reobfJar') - -tasks.withType(JavaCompile).configureEach { - options.encoding = "utf-8" -} - -tasks.withType(AbstractArchiveTask).configureEach { - setReproducibleFileOrder(true) - setPreserveFileTimestamps(false) -} - -test { - useJUnitPlatform() -} - -shadowJar { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - - configurations = [project.configurations.shadowInclude] - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -processResources { - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info','META-INF/mods.toml' - duplicatesStrategy = DuplicatesStrategy.WARN - - expand ( - version: project.version - ) - } -} - -afterEvaluate { - reobf { - shadowJar { - mappings = createMcpToSrg.output - } - } -} - -task release { - dependsOn(build) -} - -modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "swbUV1cr" - versionNumber = "${project.version}-${project.name}" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - uploadFile = shadowJar - gameVersions = ["1.18.1", "1.18.2"] -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion "Forge" - - addGameVersion "Java 18" - addGameVersion "Java 17" - - addGameVersion "1.18.1" - addGameVersion "1.18.2" - - mainArtifact shadowJar - } - options { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - } -} - -task publish { - dependsOn(tasks.findByName("modrinth")) - dependsOn(tasks.findByName("curseforge")) -} diff --git a/implementations/forge-1.18.1/settings.gradle.kts b/implementations/forge-1.18.1/settings.gradle.kts deleted file mode 100644 index 86394273..00000000 --- a/implementations/forge-1.18.1/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "forge-1.18.1" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java deleted file mode 100644 index b19ca3af..00000000 --- a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import net.minecraft.commands.CommandSourceStack; -import net.minecraft.network.chat.TextComponent; - -import java.util.Optional; - -public class ForgeCommandSource implements CommandSource { - - private final ForgeMod mod; - private final Plugin plugin; - private final CommandSourceStack delegate; - - public ForgeCommandSource(ForgeMod mod, Plugin plugin, CommandSourceStack delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - var component = TextComponent.Serializer.fromJsonLenient(text.toJSONString()); - if (component != null) - delegate.sendSuccess(component, false); - } - - @Override - public boolean hasPermission(String permission) { - return delegate.hasPermission(1); - } - - @Override - public Optional getPosition() { - var pos = delegate.getPosition(); - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getLevel()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java b/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java deleted file mode 100644 index ff54d23a..00000000 --- a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class ForgeEventForwarder { - - private final Collection eventListeners; - - public ForgeEventForwarder() { - this.eventListeners = new ArrayList<>(1); - - MinecraftForge.EVENT_BUS.register(this); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - @SubscribeEvent - public synchronized void onPlayerJoin(PlayerLoggedInEvent evt) { - UUID uuid = evt.getPlayer().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - @SubscribeEvent - public synchronized void onPlayerLeave(PlayerLoggedOutEvent evt) { - UUID uuid = evt.getPlayer().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java deleted file mode 100644 index 41c0baf8..00000000 --- a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.minecraft.SharedConstants; -import net.minecraft.core.Registry; -import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.RegisterCommandsEvent; -import net.minecraftforge.event.TickEvent.ServerTickEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.event.server.ServerStartedEvent; -import net.minecraftforge.event.server.ServerStartingEvent; -import net.minecraftforge.event.server.ServerStoppingEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.IExtensionPoint; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.network.NetworkConstants; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -@Mod(Plugin.PLUGIN_ID) -public class ForgeMod implements Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final ForgeEventForwarder eventForwarder; - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public ForgeMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - this.pluginInstance = new Plugin("forge-1.18.1", this); - - this.eventForwarder = new ForgeEventForwarder(); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(ForgeWorld::new); - - MinecraftForge.EVENT_BUS.register(this); - - //Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible - ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); - } - - @SubscribeEvent - public void onServerStarting(ServerStartingEvent event) { - this.serverInstance = event.getServer(); - } - - @SubscribeEvent - public void onRegisterCommands(RegisterCommandsEvent event) { - //register commands - new Commands<>(pluginInstance, event.getDispatcher(), forgeSource -> - new ForgeCommandSource(this, pluginInstance, forgeSource) - ); - } - - @SubscribeEvent - public void onServerStarted(ServerStartedEvent event) { - //save worlds to generate level.dat files - serverInstance.saveAllChunks(false, true, true); - - new Thread(() -> { - Logger.global.logInfo("Loading..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - } - - @SubscribeEvent - public void onServerStopping(ServerStoppingEvent event) { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - } - - @SubscribeEvent - public void onTick(ServerTickEvent evt) { - updateSomePlayers(); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getCurrentVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (ServerLevel serverWorld : serverInstance.getAllLevels()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - ResourceLocation resourceLocation = ResourceLocation.tryParse((String) world); - if (resourceLocation != null) world = serverInstance.getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, resourceLocation)); - } - - if (world instanceof ResourceKey) { - try { - world = serverInstance.getLevel((ResourceKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof ServerLevel) - return Optional.of(getServerWorld((ServerLevel) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(ServerLevel world) { - return worlds.get(world); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - @SubscribeEvent - public void onPlayerJoin(PlayerLoggedInEvent evt) { - var playerInstance = evt.getPlayer(); - if (!(playerInstance instanceof ServerPlayer)) return; - - ForgePlayer player = new ForgePlayer(playerInstance.getUUID(), this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - @SubscribeEvent - public void onPlayerLeave(PlayerLoggedOutEvent evt) { - var player = evt.getPlayer(); - if (!(player instanceof ServerPlayer)) return; - - UUID playerUUID = player.getUUID(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPlugin() { - return this.pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java b/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java deleted file mode 100644 index 07d9fdcd..00000000 --- a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.core.BlockPos; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.level.GameType; -import net.minecraft.world.level.LightLayer; -import net.minecraft.world.phys.Vec3; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class ForgePlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameType.class); - static { - GAMEMODE_MAP.put(GameType.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameType.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameType.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameType.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final ForgeMod mod; - - public ForgePlayer(UUID playerUuid, ForgeMod mod) { - this.uuid = playerUuid; - this.mod = mod; - - update(); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayer player = server.getPlayerList().getPlayer(uuid); - if (player == null) return; - - this.gamemode = GAMEMODE_MAP.getOrDefault(player.gameMode.getGameModeForPlayer(), Gamemode.SURVIVAL); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - MobEffectInstance invis = player.getEffect(MobEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3 pos = player.getPosition(1f); - this.position = new Vector3d(pos.x(), pos.y(), pos.z()); - this.rotation = new Vector3d(player.getXRot(), player.getYHeadRot(), 0); - this.sneaking = player.isCrouching(); - - this.skyLight = player.getLevel().getChunkSource().getLightEngine().getLayerListener(LightLayer.SKY).getLightValue(new BlockPos(player.getX(), player.getY(), player.getZ())); - this.blockLight = player.getLevel().getChunkSource().getLightEngine().getLayerListener(LightLayer.BLOCK).getLightValue(new BlockPos(player.getX(), player.getY(), player.getZ())); - - this.world = mod.getServerWorld(player.getLevel()); - } - -} diff --git a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java b/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java deleted file mode 100644 index dc2284be..00000000 --- a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.level.storage.LevelResource; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class ForgeWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public ForgeWorld(ServerLevel delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getServerDirectory().toPath() - .resolve(server.getWorldPath(LevelResource.ROOT)); - - ResourceLocation id = delegate.dimension().location(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - ServerLevel world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ForgeWorld that = (ForgeWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java b/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java deleted file mode 100644 index a77265e0..00000000 --- a/implementations/forge-1.18.1/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/forge-1.18.1/src/main/resources/META-INF/mods.toml b/implementations/forge-1.18.1/src/main/resources/META-INF/mods.toml deleted file mode 100644 index 2ddbaaf1..00000000 --- a/implementations/forge-1.18.1/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,26 +0,0 @@ -modLoader="javafml" -loaderVersion="[39,)" -license="MIT" -issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues" -[[mods]] -modId="bluemap" -version="${version}" -displayName="BlueMap" -displayURL="https://github.com/BlueMap-Minecraft/BlueMap" -authors="Blue (TBlueF, Lukas Rieger)" -description=''' -A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) -''' - -[[dependencies.bluemap]] - modId="forge" - mandatory=true - versionRange="[39,)" - ordering="NONE" - side="SERVER" -[[dependencies.bluemap]] - modId="minecraft" - mandatory=true - versionRange="[1.18.1,)" - ordering="NONE" - side="SERVER" diff --git a/implementations/forge-1.18.1/src/main/resources/pack.mcmeta b/implementations/forge-1.18.1/src/main/resources/pack.mcmeta deleted file mode 100644 index 0f95ce1c..00000000 --- a/implementations/forge-1.18.1/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "description": "BlueMap - A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "pack_format": 8 - } -} diff --git a/implementations/forge-1.19.4/build.gradle b/implementations/forge-1.19.4/build.gradle deleted file mode 100644 index 1b827838..00000000 --- a/implementations/forge-1.19.4/build.gradle +++ /dev/null @@ -1,207 +0,0 @@ -buildscript { - repositories { - // These repositories are only for Gradle plugins, put any other repositories in the repository block further below - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true - } -} - -plugins { - id "java" - id "java-library" - id "com.diffplug.spotless" version "6.1.2" - id "com.github.node-gradle.node" version "3.0.1" - id "com.github.johnrengelman.shadow" version "8.1.1" - id "com.modrinth.minotaur" version "2.+" - id "com.matthewprenger.cursegradle" version "1.4.0" -} - -apply plugin: "net.minecraftforge.gradle" - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore -archivesBaseName = 'bluemap' - -def javaTarget = 17 -java { - toolchain.languageVersion = JavaLanguageVersion.of(javaTarget) -} - -minecraft { - mappings channel: 'official', version: '1.19.4' - - runs { - server { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - mods { - bluemap { - source sourceSets.main - } - } - } - } -} - -sourceSets.main.resources { srcDir 'src/generated/resources' } - -repositories { - mavenCentral() - maven { url = "https://libraries.minecraft.net" } - maven { url = "https://repo.bluecolored.de/releases" } -} - -configurations { - implementation.extendsFrom(shadowInclude) -} - -dependencies { - minecraft 'net.minecraftforge:forge:1.19.4-45.0.1' - - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by forge - exclude (group: "com.google.guava", module: "guava") - exclude (group: "com.google.code.gson", module: "gson") - exclude (group: "com.mojang", module: "brigadier") - } - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -jar { - manifest { - attributes([ - "Specification-Title" : "bluemap", - "Specification-Vendor" : "bluemap", - "Specification-Version" : "1", // We are version 1 of ourselves - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "bluemap", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") - ]) - } -} - -jar.finalizedBy('reobfJar') - -tasks.withType(JavaCompile).configureEach { - options.encoding = "utf-8" -} - -tasks.withType(AbstractArchiveTask).configureEach { - setReproducibleFileOrder(true) - setPreserveFileTimestamps(false) -} - -test { - useJUnitPlatform() -} - -shadowJar { - def version = System.getProperty("bluemap.version") ?: "" // set by BlueMapCore - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - - configurations = [project.configurations.shadowInclude] - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -processResources { - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info','META-INF/mods.toml' - duplicatesStrategy = DuplicatesStrategy.WARN - - expand ( - version: project.version - ) - } -} - -afterEvaluate { - reobf { - shadowJar { - mappings = createMcpToSrg.output - } - } -} - -task release { - dependsOn(build) -} - -modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "swbUV1cr" - versionNumber = "${project.version}-${project.name}" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - uploadFile = shadowJar - gameVersions = ["1.19.4"] -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion "Forge" - - addGameVersion "Java 18" - addGameVersion "Java 17" - - addGameVersion "1.19.4" - - mainArtifact shadowJar - } - options { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - } -} - -task publish { - dependsOn(tasks.findByName("modrinth")) - dependsOn(tasks.findByName("curseforge")) -} diff --git a/implementations/forge-1.19.4/settings.gradle.kts b/implementations/forge-1.19.4/settings.gradle.kts deleted file mode 100644 index 6e12567e..00000000 --- a/implementations/forge-1.19.4/settings.gradle.kts +++ /dev/null @@ -1,4 +0,0 @@ -rootProject.name = "forge-1.19.4" - -includeBuild("../../BlueMapCommon") - diff --git a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java deleted file mode 100644 index 9487201e..00000000 --- a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import net.minecraft.commands.CommandSourceStack; -import net.minecraft.network.chat.Component; - -import java.util.Optional; - -public class ForgeCommandSource implements CommandSource { - - private final ForgeMod mod; - private final Plugin plugin; - private final CommandSourceStack delegate; - - public ForgeCommandSource(ForgeMod mod, Plugin plugin, CommandSourceStack delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - var component = Component.Serializer.fromJsonLenient(text.toJSONString()); - if (component != null) - delegate.sendSuccess(component, false); - } - - @Override - public boolean hasPermission(String permission) { - return delegate.hasPermission(1); - } - - @Override - public Optional getPosition() { - var pos = delegate.getPosition(); - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getLevel()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java b/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java deleted file mode 100644 index f4311881..00000000 --- a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class ForgeEventForwarder { - - private final Collection eventListeners; - - public ForgeEventForwarder() { - this.eventListeners = new ArrayList<>(1); - - MinecraftForge.EVENT_BUS.register(this); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - @SubscribeEvent - public synchronized void onPlayerJoin(PlayerLoggedInEvent evt) { - UUID uuid = evt.getEntity().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - @SubscribeEvent - public synchronized void onPlayerLeave(PlayerLoggedOutEvent evt) { - UUID uuid = evt.getEntity().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java deleted file mode 100644 index c774f3db..00000000 --- a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.minecraft.SharedConstants; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.RegisterCommandsEvent; -import net.minecraftforge.event.TickEvent.ServerTickEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.event.server.ServerStartedEvent; -import net.minecraftforge.event.server.ServerStartingEvent; -import net.minecraftforge.event.server.ServerStoppingEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.IExtensionPoint; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.network.NetworkConstants; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -@Mod(Plugin.PLUGIN_ID) -public class ForgeMod implements Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final ForgeEventForwarder eventForwarder; - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public ForgeMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - this.pluginInstance = new Plugin("forge-1.19.4", this); - - this.eventForwarder = new ForgeEventForwarder(); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(ForgeWorld::new); - - MinecraftForge.EVENT_BUS.register(this); - - //Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible - ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); - } - - @SubscribeEvent - public void onServerStarting(ServerStartingEvent event) { - this.serverInstance = event.getServer(); - } - - @SubscribeEvent - public void onRegisterCommands(RegisterCommandsEvent event) { - //register commands - new Commands<>(pluginInstance, event.getDispatcher(), forgeSource -> - new ForgeCommandSource(this, pluginInstance, forgeSource) - ); - } - - @SubscribeEvent - public void onServerStarted(ServerStartedEvent event) { - //save worlds to generate level.dat files - serverInstance.saveAllChunks(false, true, true); - - new Thread(() -> { - Logger.global.logInfo("Loading..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - } - - @SubscribeEvent - public void onServerStopping(ServerStoppingEvent event) { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - } - - @SubscribeEvent - public void onTick(ServerTickEvent evt) { - updateSomePlayers(); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getCurrentVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (ServerLevel serverWorld : serverInstance.getAllLevels()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - ResourceLocation resourceLocation = ResourceLocation.tryParse((String) world); - if (resourceLocation != null) world = serverInstance.getLevel(ResourceKey.create(Registries.DIMENSION, resourceLocation)); - } - - if (world instanceof ResourceKey) { - try { - world = serverInstance.getLevel((ResourceKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof ServerLevel) - return Optional.of(getServerWorld((ServerLevel) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(ServerLevel world) { - return worlds.get(world); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - @SubscribeEvent - public void onPlayerJoin(PlayerLoggedInEvent evt) { - var playerInstance = evt.getEntity(); - if (!(playerInstance instanceof ServerPlayer)) return; - - ForgePlayer player = new ForgePlayer(playerInstance.getUUID(), this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - @SubscribeEvent - public void onPlayerLeave(PlayerLoggedOutEvent evt) { - var player = evt.getEntity(); - if (!(player instanceof ServerPlayer)) return; - - UUID playerUUID = player.getUUID(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPlugin() { - return this.pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java b/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java deleted file mode 100644 index 64853c62..00000000 --- a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.core.BlockPos; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.level.GameType; -import net.minecraft.world.level.LightLayer; -import net.minecraft.world.phys.Vec3; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class ForgePlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameType.class); - static { - GAMEMODE_MAP.put(GameType.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameType.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameType.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameType.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final ForgeMod mod; - - public ForgePlayer(UUID playerUuid, ForgeMod mod) { - this.uuid = playerUuid; - this.mod = mod; - - update(); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayer player = server.getPlayerList().getPlayer(uuid); - if (player == null) return; - - this.gamemode = GAMEMODE_MAP.getOrDefault(player.gameMode.getGameModeForPlayer(), Gamemode.SURVIVAL); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - MobEffectInstance invis = player.getEffect(MobEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3 pos = player.getPosition(1f); - this.position = new Vector3d(pos.x(), pos.y(), pos.z()); - this.rotation = new Vector3d(player.getXRot(), player.getYHeadRot(), 0); - this.sneaking = player.isCrouching(); - - this.skyLight = player.getLevel().getChunkSource().getLightEngine().getLayerListener(LightLayer.SKY).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); - this.blockLight = player.getLevel().getChunkSource().getLightEngine().getLayerListener(LightLayer.BLOCK).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); - - this.world = mod.getServerWorld(player.getLevel()); - } - -} diff --git a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java b/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java deleted file mode 100644 index dc2284be..00000000 --- a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.level.storage.LevelResource; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class ForgeWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public ForgeWorld(ServerLevel delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getServerDirectory().toPath() - .resolve(server.getWorldPath(LevelResource.ROOT)); - - ResourceLocation id = delegate.dimension().location(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - ServerLevel world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ForgeWorld that = (ForgeWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java b/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java deleted file mode 100644 index a77265e0..00000000 --- a/implementations/forge-1.19.4/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/forge-1.19.4/src/main/resources/META-INF/mods.toml b/implementations/forge-1.19.4/src/main/resources/META-INF/mods.toml deleted file mode 100644 index cf227512..00000000 --- a/implementations/forge-1.19.4/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,26 +0,0 @@ -modLoader="javafml" -loaderVersion="[44,)" -license="MIT" -issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues" -[[mods]] -modId="bluemap" -version="${version}" -displayName="BlueMap" -displayURL="https://github.com/BlueMap-Minecraft/BlueMap" -authors="Blue (TBlueF, Lukas Rieger)" -description=''' -A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) -''' - -[[dependencies.bluemap]] - modId="forge" - mandatory=true - versionRange="[44,)" - ordering="NONE" - side="SERVER" -[[dependencies.bluemap]] - modId="minecraft" - mandatory=true - versionRange="[1.19.3,)" - ordering="NONE" - side="SERVER" diff --git a/implementations/forge-1.19.4/src/main/resources/pack.mcmeta b/implementations/forge-1.19.4/src/main/resources/pack.mcmeta deleted file mode 100644 index 0f95ce1c..00000000 --- a/implementations/forge-1.19.4/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "description": "BlueMap - A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "pack_format": 8 - } -} diff --git a/implementations/forge-1.20.6/build.gradle b/implementations/forge-1.20.6/build.gradle deleted file mode 100644 index bfb6604c..00000000 --- a/implementations/forge-1.20.6/build.gradle +++ /dev/null @@ -1,195 +0,0 @@ -buildscript { - repositories { - // These repositories are only for Gradle plugins, put any other repositories in the repository block further below - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '[6.0.24,6.2)', changing: true - } -} - -plugins { - id "java" - id "java-library" - id "com.diffplug.spotless" version "6.1.2" - id "com.github.node-gradle.node" version "3.0.1" - id "com.github.johnrengelman.shadow" version "8.1.1" - id "com.modrinth.minotaur" version "2.+" - id "com.matthewprenger.cursegradle" version "1.4.0" -} - -apply plugin: "net.minecraftforge.gradle" - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore -archivesBaseName = 'bluemap' - -java.toolchain.languageVersion = JavaLanguageVersion.of(21) - -minecraft { - mappings channel: 'official', version: '1.20.6' - - reobf = false - - runs { - server { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - mods { - bluemap { - source sourceSets.main - } - } - } - } -} - -sourceSets.main.resources { srcDir 'src/generated/resources' } - -repositories { - mavenCentral() - maven { url = "https://libraries.minecraft.net" } - maven { url = "https://repo.bluecolored.de/releases" } -} - -configurations { - implementation.extendsFrom(shadowInclude) -} - -dependencies { - minecraft 'net.minecraftforge:forge:1.20.6-50.0.13' - - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by forge - exclude (group: "com.google.guava", module: "guava") - exclude (group: "com.google.code.gson", module: "gson") - exclude (group: "com.mojang", module: "brigadier") - } - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -jar { - manifest { - attributes([ - "Specification-Title" : "bluemap", - "Specification-Vendor" : "bluemap", - "Specification-Version" : "1", // We are version 1 of ourselves - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "bluemap", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") - ]) - } -} - -tasks.withType(JavaCompile).configureEach { - options.encoding = "utf-8" -} - -tasks.withType(AbstractArchiveTask).configureEach { - setReproducibleFileOrder(true) - setPreserveFileTimestamps(false) -} - -test { - useJUnitPlatform() -} - -shadowJar { - def version = System.getProperty("bluemap.version") ?: "" // set by BlueMapCore - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - - configurations = [project.configurations.shadowInclude] - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -processResources { - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info','META-INF/mods.toml' - duplicatesStrategy = DuplicatesStrategy.WARN - - expand ( - version: project.version - ) - } -} - -task release { - dependsOn(shadowJar) -} - -modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "swbUV1cr" - versionNumber = "${project.version}-${project.name}" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - uploadFile = shadowJar - gameVersions = ["1.20.6"] -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion "Forge" - - addGameVersion "Java 21" - - addGameVersion "1.20.6" - - mainArtifact shadowJar - } - options { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - } -} - -task publish { - dependsOn(tasks.findByName("modrinth")) - dependsOn(tasks.findByName("curseforge")) -} diff --git a/implementations/forge-1.20.6/settings.gradle.kts b/implementations/forge-1.20.6/settings.gradle.kts deleted file mode 100644 index 7425b900..00000000 --- a/implementations/forge-1.20.6/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "forge-1.20.6" - -includeBuild("../../BlueMapCommon") diff --git a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java deleted file mode 100644 index 6c4cce31..00000000 --- a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import net.minecraft.commands.CommandSourceStack; -import net.minecraft.network.chat.Component; - -import java.util.Optional; - -public class ForgeCommandSource implements CommandSource { - - private final ForgeMod mod; - private final Plugin plugin; - private final CommandSourceStack delegate; - - public ForgeCommandSource(ForgeMod mod, Plugin plugin, CommandSourceStack delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - var component = Component.Serializer.fromJsonLenient(text.toJSONString(), delegate.registryAccess()); - if (component != null) - delegate.sendSuccess(() -> component, false); - } - - @Override - public boolean hasPermission(String permission) { - return delegate.hasPermission(1); - } - - @Override - public Optional getPosition() { - var pos = delegate.getPosition(); - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getLevel()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java b/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java deleted file mode 100644 index f4311881..00000000 --- a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class ForgeEventForwarder { - - private final Collection eventListeners; - - public ForgeEventForwarder() { - this.eventListeners = new ArrayList<>(1); - - MinecraftForge.EVENT_BUS.register(this); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - @SubscribeEvent - public synchronized void onPlayerJoin(PlayerLoggedInEvent evt) { - UUID uuid = evt.getEntity().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - @SubscribeEvent - public synchronized void onPlayerLeave(PlayerLoggedOutEvent evt) { - UUID uuid = evt.getEntity().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java deleted file mode 100644 index 2a3277f1..00000000 --- a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.minecraft.SharedConstants; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.RegisterCommandsEvent; -import net.minecraftforge.event.TickEvent.ServerTickEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.event.server.ServerStartedEvent; -import net.minecraftforge.event.server.ServerStartingEvent; -import net.minecraftforge.event.server.ServerStoppingEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.IExtensionPoint; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -@Mod(Plugin.PLUGIN_ID) -public class ForgeMod implements Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final ForgeEventForwarder eventForwarder; - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public ForgeMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - this.pluginInstance = new Plugin("forge", this); - - this.eventForwarder = new ForgeEventForwarder(); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(ForgeWorld::new); - - MinecraftForge.EVENT_BUS.register(this); - - //Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible - ModLoadingContext.get().registerExtensionPoint( - IExtensionPoint.DisplayTest.class, - () -> new IExtensionPoint.DisplayTest( - () -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, - (a, b) -> true - ) - ); - } - - @SubscribeEvent - public void onServerStarting(ServerStartingEvent event) { - this.serverInstance = event.getServer(); - } - - @SubscribeEvent - public void onRegisterCommands(RegisterCommandsEvent event) { - //register commands - new Commands<>(pluginInstance, event.getDispatcher(), forgeSource -> - new ForgeCommandSource(this, pluginInstance, forgeSource) - ); - } - - @SubscribeEvent - public void onServerStarted(ServerStartedEvent event) { - //save worlds to generate level.dat files - serverInstance.saveAllChunks(false, true, true); - - new Thread(() -> { - Logger.global.logInfo("Loading..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - } - - @SubscribeEvent - public void onServerStopping(ServerStoppingEvent event) { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - } - - @SubscribeEvent - public void onTick(ServerTickEvent evt) { - updateSomePlayers(); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getCurrentVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (ServerLevel serverWorld : serverInstance.getAllLevels()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - ResourceLocation resourceLocation = ResourceLocation.tryParse((String) world); - if (resourceLocation != null) world = serverInstance.getLevel(ResourceKey.create(Registries.DIMENSION, resourceLocation)); - } - - if (world instanceof ResourceKey) { - try { - world = serverInstance.getLevel((ResourceKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof ServerLevel) - return Optional.of(getServerWorld((ServerLevel) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(ServerLevel world) { - return worlds.get(world); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - @SubscribeEvent - public void onPlayerJoin(PlayerLoggedInEvent evt) { - var playerInstance = evt.getEntity(); - if (!(playerInstance instanceof ServerPlayer)) return; - - ForgePlayer player = new ForgePlayer(playerInstance.getUUID(), this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - @SubscribeEvent - public void onPlayerLeave(PlayerLoggedOutEvent evt) { - var player = evt.getEntity(); - if (!(player instanceof ServerPlayer)) return; - - UUID playerUUID = player.getUUID(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPlugin() { - return this.pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java b/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java deleted file mode 100644 index e90501b3..00000000 --- a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.core.BlockPos; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.level.GameType; -import net.minecraft.world.level.LightLayer; -import net.minecraft.world.phys.Vec3; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class ForgePlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameType.class); - static { - GAMEMODE_MAP.put(GameType.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameType.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameType.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameType.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final ForgeMod mod; - - public ForgePlayer(UUID playerUuid, ForgeMod mod) { - this.uuid = playerUuid; - this.mod = mod; - - update(); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayer player = server.getPlayerList().getPlayer(uuid); - if (player == null) return; - - this.gamemode = GAMEMODE_MAP.getOrDefault(player.gameMode.getGameModeForPlayer(), Gamemode.SURVIVAL); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - MobEffectInstance invis = player.getEffect(MobEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3 pos = player.getPosition(1f); - this.position = new Vector3d(pos.x(), pos.y(), pos.z()); - this.rotation = new Vector3d(player.getXRot(), player.getYHeadRot(), 0); - this.sneaking = player.isCrouching(); - - this.skyLight = player.level().getChunkSource().getLightEngine().getLayerListener(LightLayer.SKY).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); - this.blockLight = player.level().getChunkSource().getLightEngine().getLayerListener(LightLayer.BLOCK).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); - - this.world = mod.getServerWorld(player.serverLevel()); - } - -} diff --git a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java b/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java deleted file mode 100644 index dc2284be..00000000 --- a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.level.storage.LevelResource; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class ForgeWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public ForgeWorld(ServerLevel delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getServerDirectory().toPath() - .resolve(server.getWorldPath(LevelResource.ROOT)); - - ResourceLocation id = delegate.dimension().location(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - ServerLevel world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ForgeWorld that = (ForgeWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java b/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java deleted file mode 100644 index a77265e0..00000000 --- a/implementations/forge-1.20.6/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/forge-1.20.6/src/main/resources/META-INF/mods.toml b/implementations/forge-1.20.6/src/main/resources/META-INF/mods.toml deleted file mode 100644 index e5f5a4cb..00000000 --- a/implementations/forge-1.20.6/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,26 +0,0 @@ -modLoader="javafml" -loaderVersion="[44,)" -license="MIT" -issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues" -[[mods]] -modId="bluemap" -version="${version}" -displayName="BlueMap" -displayURL="https://github.com/BlueMap-Minecraft/BlueMap" -authors="Blue (TBlueF, Lukas Rieger)" -description=''' -A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) -''' - -[[dependencies.bluemap]] - modId="forge" - mandatory=true - versionRange="[50,)" - ordering="NONE" - side="SERVER" -[[dependencies.bluemap]] - modId="minecraft" - mandatory=true - versionRange="[1.20.6,)" - ordering="NONE" - side="SERVER" diff --git a/implementations/forge-1.20.6/src/main/resources/pack.mcmeta b/implementations/forge-1.20.6/src/main/resources/pack.mcmeta deleted file mode 100644 index 0f95ce1c..00000000 --- a/implementations/forge-1.20.6/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "description": "BlueMap - A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "pack_format": 8 - } -} diff --git a/implementations/forge-1.20/build.gradle b/implementations/forge-1.20/build.gradle deleted file mode 100644 index d538fcbd..00000000 --- a/implementations/forge-1.20/build.gradle +++ /dev/null @@ -1,211 +0,0 @@ -buildscript { - repositories { - // These repositories are only for Gradle plugins, put any other repositories in the repository block further below - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '6.0.+', changing: true - } -} - -plugins { - id "java" - id "java-library" - id "com.diffplug.spotless" version "6.1.2" - id "com.github.node-gradle.node" version "3.0.1" - id "com.github.johnrengelman.shadow" version "8.1.1" - id "com.modrinth.minotaur" version "2.+" - id "com.matthewprenger.cursegradle" version "1.4.0" -} - -apply plugin: "net.minecraftforge.gradle" - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore -archivesBaseName = 'bluemap' - -def javaTarget = 17 -java { - toolchain.languageVersion = JavaLanguageVersion.of(javaTarget) -} - -minecraft { - mappings channel: 'official', version: '1.20' - - runs { - server { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - mods { - bluemap { - source sourceSets.main - } - } - } - } -} - -sourceSets.main.resources { srcDir 'src/generated/resources' } - -repositories { - mavenCentral() - maven { url = "https://libraries.minecraft.net" } - maven { url = "https://repo.bluecolored.de/releases" } -} - -configurations { - implementation.extendsFrom(shadowInclude) -} - -dependencies { - minecraft 'net.minecraftforge:forge:1.20-46.0.1' - - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by forge - exclude (group: "com.google.guava", module: "guava") - exclude (group: "com.google.code.gson", module: "gson") - exclude (group: "com.mojang", module: "brigadier") - } - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -jar { - manifest { - attributes([ - "Specification-Title" : "bluemap", - "Specification-Vendor" : "bluemap", - "Specification-Version" : "1", // We are version 1 of ourselves - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "bluemap", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") - ]) - } -} - -jar.finalizedBy('reobfJar') - -tasks.withType(JavaCompile).configureEach { - options.encoding = "utf-8" -} - -tasks.withType(AbstractArchiveTask).configureEach { - setReproducibleFileOrder(true) - setPreserveFileTimestamps(false) -} - -test { - useJUnitPlatform() -} - -shadowJar { - def version = System.getProperty("bluemap.version") ?: "" // set by BlueMapCore - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - - configurations = [project.configurations.shadowInclude] - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -processResources { - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info','META-INF/mods.toml' - duplicatesStrategy = DuplicatesStrategy.WARN - - expand ( - version: project.version - ) - } -} - -afterEvaluate { - reobf { - shadowJar { - mappings = createMcpToSrg.output - } - } -} - -task release { - dependsOn(build) -} - -modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "swbUV1cr" - versionNumber = "${project.version}-${project.name}" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - uploadFile = shadowJar - gameVersions = ["1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4"] -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion "Forge" - - addGameVersion "Java 18" - addGameVersion "Java 17" - - addGameVersion "1.20" - addGameVersion "1.20.1" - addGameVersion "1.20.2" - addGameVersion "1.20.3" - addGameVersion "1.20.4" - - mainArtifact shadowJar - } - options { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - } -} - -task publish { - dependsOn(tasks.findByName("modrinth")) - dependsOn(tasks.findByName("curseforge")) -} diff --git a/implementations/forge-1.20/settings.gradle.kts b/implementations/forge-1.20/settings.gradle.kts deleted file mode 100644 index 117c36b5..00000000 --- a/implementations/forge-1.20/settings.gradle.kts +++ /dev/null @@ -1,4 +0,0 @@ -rootProject.name = "forge-1.20" - -includeBuild("../../BlueMapCommon") - diff --git a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java deleted file mode 100644 index 64428e6f..00000000 --- a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.CommandSource; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.world.World; -import net.minecraft.commands.CommandSourceStack; -import net.minecraft.network.chat.Component; - -import java.util.Optional; - -public class ForgeCommandSource implements CommandSource { - - private final ForgeMod mod; - private final Plugin plugin; - private final CommandSourceStack delegate; - - public ForgeCommandSource(ForgeMod mod, Plugin plugin, CommandSourceStack delegate) { - this.mod = mod; - this.plugin = plugin; - this.delegate = delegate; - } - - @Override - public void sendMessage(Text text) { - var component = Component.Serializer.fromJsonLenient(text.toJSONString()); - if (component != null) - delegate.sendSuccess(() -> component, false); - } - - @Override - public boolean hasPermission(String permission) { - return delegate.hasPermission(1); - } - - @Override - public Optional getPosition() { - var pos = delegate.getPosition(); - return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); - } - - @Override - public Optional getWorld() { - ServerWorld serverWorld = mod.getServerWorld(delegate.getLevel()); - return Optional.ofNullable(plugin.getWorld(serverWorld)); - } - -} diff --git a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java b/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java deleted file mode 100644 index f4311881..00000000 --- a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeEventForwarder.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.UUID; - -public class ForgeEventForwarder { - - private final Collection eventListeners; - - public ForgeEventForwarder() { - this.eventListeners = new ArrayList<>(1); - - MinecraftForge.EVENT_BUS.register(this); - } - - public synchronized void addEventListener(ServerEventListener listener) { - this.eventListeners.add(listener); - } - - public synchronized void removeAllListeners() { - this.eventListeners.clear(); - } - - @SubscribeEvent - public synchronized void onPlayerJoin(PlayerLoggedInEvent evt) { - UUID uuid = evt.getEntity().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerJoin(uuid); - } - - @SubscribeEvent - public synchronized void onPlayerLeave(PlayerLoggedOutEvent evt) { - UUID uuid = evt.getEntity().getUUID(); - for (ServerEventListener listener : eventListeners) listener.onPlayerLeave(uuid); - } - -} diff --git a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java deleted file mode 100644 index 77ed826e..00000000 --- a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.github.benmanes.caffeine.cache.Caffeine; -import com.github.benmanes.caffeine.cache.LoadingCache; -import de.bluecolored.bluemap.common.plugin.Plugin; -import de.bluecolored.bluemap.common.plugin.commands.Commands; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.Server; -import de.bluecolored.bluemap.common.serverinterface.ServerEventListener; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.BlueMap; -import de.bluecolored.bluemap.core.logger.Logger; -import net.minecraft.SharedConstants; -import net.minecraft.core.registries.Registries; -import net.minecraft.resources.ResourceKey; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.level.Level; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.RegisterCommandsEvent; -import net.minecraftforge.event.TickEvent.ServerTickEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent; -import net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent; -import net.minecraftforge.event.server.ServerStartedEvent; -import net.minecraftforge.event.server.ServerStartingEvent; -import net.minecraftforge.event.server.ServerStoppingEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import net.minecraftforge.fml.IExtensionPoint; -import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.network.NetworkConstants; -import org.apache.logging.log4j.LogManager; - -import java.io.IOException; -import java.nio.file.Path; -import java.util.*; -import java.util.concurrent.ConcurrentHashMap; - -@Mod(Plugin.PLUGIN_ID) -public class ForgeMod implements Server { - - private final Plugin pluginInstance; - private MinecraftServer serverInstance = null; - - private final ForgeEventForwarder eventForwarder; - private final LoadingCache worlds; - - private int playerUpdateIndex = 0; - private final Map onlinePlayerMap; - private final List onlinePlayerList; - - public ForgeMod() { - Logger.global.clear(); - Logger.global.put(new Log4jLogger(LogManager.getLogger(Plugin.PLUGIN_NAME))); - - this.onlinePlayerMap = new ConcurrentHashMap<>(); - this.onlinePlayerList = Collections.synchronizedList(new ArrayList<>()); - - this.pluginInstance = new Plugin("forge-1.20", this); - - this.eventForwarder = new ForgeEventForwarder(); - this.worlds = Caffeine.newBuilder() - .executor(BlueMap.THREAD_POOL) - .weakKeys() - .maximumSize(1000) - .build(ForgeWorld::new); - - MinecraftForge.EVENT_BUS.register(this); - - //Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible - ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); - } - - @SubscribeEvent - public void onServerStarting(ServerStartingEvent event) { - this.serverInstance = event.getServer(); - } - - @SubscribeEvent - public void onRegisterCommands(RegisterCommandsEvent event) { - //register commands - new Commands<>(pluginInstance, event.getDispatcher(), forgeSource -> - new ForgeCommandSource(this, pluginInstance, forgeSource) - ); - } - - @SubscribeEvent - public void onServerStarted(ServerStartedEvent event) { - //save worlds to generate level.dat files - serverInstance.saveAllChunks(false, true, true); - - new Thread(() -> { - Logger.global.logInfo("Loading..."); - - try { - pluginInstance.load(); - if (pluginInstance.isLoaded()) Logger.global.logInfo("Loaded!"); - } catch (IOException e) { - Logger.global.logError("Failed to load bluemap!", e); - pluginInstance.unload(); - } - }, "BlueMap-Plugin-Loading").start(); - } - - @SubscribeEvent - public void onServerStopping(ServerStoppingEvent event) { - pluginInstance.unload(); - Logger.global.logInfo("BlueMap unloaded!"); - } - - @SubscribeEvent - public void onTick(ServerTickEvent evt) { - updateSomePlayers(); - } - - @Override - public String getMinecraftVersion() { - return SharedConstants.getCurrentVersion().getId(); - } - - @Override - public void registerListener(ServerEventListener listener) { - eventForwarder.addEventListener(listener); - } - - @Override - public void unregisterAllListeners() { - eventForwarder.removeAllListeners(); - } - - @Override - public Collection getLoadedServerWorlds() { - Collection loadedWorlds = new ArrayList<>(3); - for (ServerLevel serverWorld : serverInstance.getAllLevels()) { - loadedWorlds.add(worlds.get(serverWorld)); - } - return loadedWorlds; - } - - @SuppressWarnings("unchecked") - @Override - public Optional getServerWorld(Object world) { - - if (world instanceof String) { - ResourceLocation resourceLocation = ResourceLocation.tryParse((String) world); - if (resourceLocation != null) world = serverInstance.getLevel(ResourceKey.create(Registries.DIMENSION, resourceLocation)); - } - - if (world instanceof ResourceKey) { - try { - world = serverInstance.getLevel((ResourceKey) world); - } catch (ClassCastException ignored) {} - } - - if (world instanceof ServerLevel) - return Optional.of(getServerWorld((ServerLevel) world)); - - return Optional.empty(); - } - - public ServerWorld getServerWorld(ServerLevel world) { - return worlds.get(world); - } - - @Override - public Path getConfigFolder() { - return Path.of("config", "bluemap"); - } - - @Override - public Optional getModsFolder() { - return Optional.of(Path.of("mods")); - } - - @SubscribeEvent - public void onPlayerJoin(PlayerLoggedInEvent evt) { - var playerInstance = evt.getEntity(); - if (!(playerInstance instanceof ServerPlayer)) return; - - ForgePlayer player = new ForgePlayer(playerInstance.getUUID(), this); - onlinePlayerMap.put(player.getUuid(), player); - onlinePlayerList.add(player); - } - - @SubscribeEvent - public void onPlayerLeave(PlayerLoggedOutEvent evt) { - var player = evt.getEntity(); - if (!(player instanceof ServerPlayer)) return; - - UUID playerUUID = player.getUUID(); - onlinePlayerMap.remove(playerUUID); - synchronized (onlinePlayerList) { - onlinePlayerList.removeIf(p -> p.getUuid().equals(playerUUID)); - } - } - - public MinecraftServer getServer() { - return this.serverInstance; - } - - public Plugin getPlugin() { - return this.pluginInstance; - } - - @Override - public Collection getOnlinePlayers() { - return onlinePlayerMap.values(); - } - - /** - * Only update some of the online players each tick to minimize performance impact on the server-thread. - * Only call this method on the server-thread. - */ - private void updateSomePlayers() { - int onlinePlayerCount = onlinePlayerList.size(); - if (onlinePlayerCount == 0) return; - - int playersToBeUpdated = onlinePlayerCount / 20; //with 20 tps, each player is updated once a second - if (playersToBeUpdated == 0) playersToBeUpdated = 1; - - for (int i = 0; i < playersToBeUpdated; i++) { - playerUpdateIndex++; - if (playerUpdateIndex >= 20 && playerUpdateIndex >= onlinePlayerCount) playerUpdateIndex = 0; - - if (playerUpdateIndex < onlinePlayerCount) { - onlinePlayerList.get(playerUpdateIndex).update(); - } - } - } - -} diff --git a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java b/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java deleted file mode 100644 index e90501b3..00000000 --- a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgePlayer.java +++ /dev/null @@ -1,154 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import com.flowpowered.math.vector.Vector3d; -import de.bluecolored.bluemap.common.plugin.text.Text; -import de.bluecolored.bluemap.common.serverinterface.Gamemode; -import de.bluecolored.bluemap.common.serverinterface.Player; -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import net.minecraft.core.BlockPos; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerPlayer; -import net.minecraft.world.effect.MobEffectInstance; -import net.minecraft.world.effect.MobEffects; -import net.minecraft.world.level.GameType; -import net.minecraft.world.level.LightLayer; -import net.minecraft.world.phys.Vec3; - -import java.util.EnumMap; -import java.util.Map; -import java.util.UUID; - -public class ForgePlayer implements Player { - - private static final Map GAMEMODE_MAP = new EnumMap<>(GameType.class); - static { - GAMEMODE_MAP.put(GameType.ADVENTURE, Gamemode.ADVENTURE); - GAMEMODE_MAP.put(GameType.SURVIVAL, Gamemode.SURVIVAL); - GAMEMODE_MAP.put(GameType.CREATIVE, Gamemode.CREATIVE); - GAMEMODE_MAP.put(GameType.SPECTATOR, Gamemode.SPECTATOR); - } - - private final UUID uuid; - private Text name; - private ServerWorld world; - private Vector3d position; - private Vector3d rotation; - private int skyLight; - private int blockLight; - private boolean sneaking; - private boolean invisible; - private Gamemode gamemode; - - private final ForgeMod mod; - - public ForgePlayer(UUID playerUuid, ForgeMod mod) { - this.uuid = playerUuid; - this.mod = mod; - - update(); - } - - @Override - public UUID getUuid() { - return this.uuid; - } - - @Override - public Text getName() { - return this.name; - } - - @Override - public ServerWorld getWorld() { - return this.world; - } - - @Override - public Vector3d getPosition() { - return this.position; - } - - @Override - public Vector3d getRotation() { - return rotation; - } - - @Override - public int getSkyLight() { - return skyLight; - } - - @Override - public int getBlockLight() { - return blockLight; - } - - @Override - public boolean isSneaking() { - return this.sneaking; - } - - @Override - public boolean isInvisible() { - return this.invisible; - } - - @Override - public Gamemode getGamemode() { - return this.gamemode; - } - - /** - * Only call on server thread! - */ - public void update() { - MinecraftServer server = mod.getServer(); - if (server == null) return; - - ServerPlayer player = server.getPlayerList().getPlayer(uuid); - if (player == null) return; - - this.gamemode = GAMEMODE_MAP.getOrDefault(player.gameMode.getGameModeForPlayer(), Gamemode.SURVIVAL); - if (this.gamemode == null) this.gamemode = Gamemode.SURVIVAL; - - MobEffectInstance invis = player.getEffect(MobEffects.INVISIBILITY); - this.invisible = invis != null && invis.getDuration() > 0; - - this.name = Text.of(player.getName().getString()); - - Vec3 pos = player.getPosition(1f); - this.position = new Vector3d(pos.x(), pos.y(), pos.z()); - this.rotation = new Vector3d(player.getXRot(), player.getYHeadRot(), 0); - this.sneaking = player.isCrouching(); - - this.skyLight = player.level().getChunkSource().getLightEngine().getLayerListener(LightLayer.SKY).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); - this.blockLight = player.level().getChunkSource().getLightEngine().getLayerListener(LightLayer.BLOCK).getLightValue(new BlockPos(player.getBlockX(), player.getBlockY(), player.getBlockZ())); - - this.world = mod.getServerWorld(player.serverLevel()); - } - -} diff --git a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java b/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java deleted file mode 100644 index dc2284be..00000000 --- a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/ForgeWorld.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import de.bluecolored.bluemap.common.serverinterface.ServerWorld; -import de.bluecolored.bluemap.core.util.Key; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.level.storage.LevelResource; - -import java.io.IOException; -import java.lang.ref.WeakReference; -import java.nio.file.Path; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionException; -import java.util.concurrent.ExecutionException; - -public class ForgeWorld implements ServerWorld { - - private final WeakReference delegate; - private final Path worldFolder; - private final Key dimension; - - public ForgeWorld(ServerLevel delegate) { - this.delegate = new WeakReference<>(delegate); - - MinecraftServer server = delegate.getServer(); - this.worldFolder = delegate.getServer().getServerDirectory().toPath() - .resolve(server.getWorldPath(LevelResource.ROOT)); - - ResourceLocation id = delegate.dimension().location(); - this.dimension = new Key(id.getNamespace(), id.getPath()); - } - - @Override - public boolean persistWorldChanges() throws IOException { - ServerLevel world = delegate.get(); - if (world == null) return false; - - var taskResult = CompletableFuture.supplyAsync(() -> { - try { - world.save(null, true, false); - return true; - } catch (Exception e) { - throw new CompletionException(e); - } - }, world.getServer()); - - try { - return taskResult.get(); - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); - throw new IOException(e); - } catch (ExecutionException e) { - Throwable t = e.getCause(); - if (t instanceof IOException) throw (IOException) t; - if (t instanceof IllegalArgumentException) throw (IllegalArgumentException) t; - throw new IOException(t); - } - } - - @Override - public Path getWorldFolder() { - return worldFolder; - } - - @Override - public Key getDimension() { - return dimension; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - - ForgeWorld that = (ForgeWorld) o; - Object world = delegate.get(); - return world != null && world.equals(that.delegate.get()); - } - - @Override - public int hashCode() { - Object world = delegate.get(); - return world != null ? world.hashCode() : 0; - } - -} diff --git a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java b/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java deleted file mode 100644 index a77265e0..00000000 --- a/implementations/forge-1.20/src/main/java/de/bluecolored/bluemap/forge/Log4jLogger.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * This file is part of BlueMap, licensed under the MIT License (MIT). - * - * Copyright (c) Blue (Lukas Rieger) - * Copyright (c) contributors - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ -package de.bluecolored.bluemap.forge; - -import org.apache.logging.log4j.Logger; - -import de.bluecolored.bluemap.core.logger.AbstractLogger; - -public class Log4jLogger extends AbstractLogger { - - private final Logger out; - - public Log4jLogger(Logger out) { - this.out = out; - } - - @Override - public void logError(String message, Throwable throwable) { - out.error(message, throwable); - } - - @Override - public void logWarning(String message) { - out.warn(message); - } - - @Override - public void logInfo(String message) { - out.info(message); - } - - @Override - public void logDebug(String message) { - if (out.isDebugEnabled()) out.debug(message); - } - - @Override - public void noFloodDebug(String message) { - if (out.isDebugEnabled()) super.noFloodDebug(message); - } - - @Override - public void noFloodDebug(String key, String message) { - if (out.isDebugEnabled()) super.noFloodDebug(key, message); - } - -} diff --git a/implementations/forge-1.20/src/main/resources/META-INF/mods.toml b/implementations/forge-1.20/src/main/resources/META-INF/mods.toml deleted file mode 100644 index cf227512..00000000 --- a/implementations/forge-1.20/src/main/resources/META-INF/mods.toml +++ /dev/null @@ -1,26 +0,0 @@ -modLoader="javafml" -loaderVersion="[44,)" -license="MIT" -issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues" -[[mods]] -modId="bluemap" -version="${version}" -displayName="BlueMap" -displayURL="https://github.com/BlueMap-Minecraft/BlueMap" -authors="Blue (TBlueF, Lukas Rieger)" -description=''' -A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) -''' - -[[dependencies.bluemap]] - modId="forge" - mandatory=true - versionRange="[44,)" - ordering="NONE" - side="SERVER" -[[dependencies.bluemap]] - modId="minecraft" - mandatory=true - versionRange="[1.19.3,)" - ordering="NONE" - side="SERVER" diff --git a/implementations/forge-1.20/src/main/resources/pack.mcmeta b/implementations/forge-1.20/src/main/resources/pack.mcmeta deleted file mode 100644 index 0f95ce1c..00000000 --- a/implementations/forge-1.20/src/main/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "description": "BlueMap - A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "pack_format": 8 - } -} diff --git a/implementations/forge/build.gradle b/implementations/forge/build.gradle deleted file mode 100644 index 9b020e78..00000000 --- a/implementations/forge/build.gradle +++ /dev/null @@ -1,195 +0,0 @@ -buildscript { - repositories { - // These repositories are only for Gradle plugins, put any other repositories in the repository block further below - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '[6.0.24,6.2)', changing: true - } -} - -plugins { - id "java" - id "java-library" - id "com.diffplug.spotless" version "6.1.2" - id "com.github.node-gradle.node" version "3.0.1" - id "com.github.johnrengelman.shadow" version "8.1.1" - id "com.modrinth.minotaur" version "2.+" - id "com.matthewprenger.cursegradle" version "1.4.0" -} - -apply plugin: "net.minecraftforge.gradle" - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore -archivesBaseName = 'bluemap' - -java.toolchain.languageVersion = JavaLanguageVersion.of(21) - -minecraft { - mappings channel: 'official', version: '1.21' - - reobf = false - - runs { - server { - workingDirectory project.file('run') - property 'forge.logging.markers', 'REGISTRIES' - property 'forge.logging.console.level', 'debug' - - mods { - bluemap { - source sourceSets.main - } - } - } - } -} - -sourceSets.main.resources { srcDir 'src/generated/resources' } - -repositories { - mavenCentral() - maven { url = "https://libraries.minecraft.net" } - maven { url = "https://repo.bluecolored.de/releases" } -} - -configurations { - implementation.extendsFrom(shadowInclude) -} - -dependencies { - minecraft 'net.minecraftforge:forge:1.21-51.0.1' - - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by forge - exclude (group: "com.google.guava", module: "guava") - exclude (group: "com.google.code.gson", module: "gson") - exclude (group: "com.mojang", module: "brigadier") - } - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -jar { - manifest { - attributes([ - "Specification-Title" : "bluemap", - "Specification-Vendor" : "bluemap", - "Specification-Version" : "1", // We are version 1 of ourselves - "Implementation-Title" : project.name, - "Implementation-Version" : project.jar.archiveVersion, - "Implementation-Vendor" : "bluemap", - "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") - ]) - } -} - -tasks.withType(JavaCompile).configureEach { - options.encoding = "utf-8" -} - -tasks.withType(AbstractArchiveTask).configureEach { - setReproducibleFileOrder(true) - setPreserveFileTimestamps(false) -} - -test { - useJUnitPlatform() -} - -shadowJar { - def version = System.getProperty("bluemap.version") ?: "" // set by BlueMapCore - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - - configurations = [project.configurations.shadowInclude] - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -processResources { - from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info','META-INF/mods.toml' - duplicatesStrategy = DuplicatesStrategy.WARN - - expand ( - version: project.version - ) - } -} - -task release { - dependsOn(shadowJar) -} - -modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "swbUV1cr" - versionNumber = "${project.version}-${project.name}" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - uploadFile = shadowJar - gameVersions = ["1.21"] -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion "Forge" - - addGameVersion "Java 21" - - addGameVersion "1.21" - - mainArtifact shadowJar - } - options { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - } -} - -task publish { - dependsOn(tasks.findByName("modrinth")) - dependsOn(tasks.findByName("curseforge")) -} diff --git a/implementations/forge/build.gradle.kts b/implementations/forge/build.gradle.kts new file mode 100644 index 00000000..50d02a50 --- /dev/null +++ b/implementations/forge/build.gradle.kts @@ -0,0 +1,115 @@ +plugins { + bluemap.implementation + bluemap.modrinth + bluemap.curseforge + alias ( libs.plugins.forgegradle ) +} + +val supportedMinecraftVersions = listOf( + "1.21" +) + +val minecraftVersion = supportedMinecraftVersions.first() +val forgeVersion = "51.0.1" + +val shadowInclude: Configuration by configurations.creating +configurations.api.get().extendsFrom(shadowInclude) +jarJar.enable() + +dependencies { + + shadowInclude ( project( ":common" ) ) { + exclude ( group = "com.google.code.gson", module = "gson" ) + exclude ( group = "com.mojang", module = "brigadier" ) + } + + minecraft ( "net.minecraftforge", "forge", "$minecraftVersion-$forgeVersion" ) + + jarJar ( libs.flow.math.get().group, libs.flow.math.get().name , "[${libs.flow.math.get().version},)" ) + +} + +minecraft { + mappings( "official", minecraftVersion ) + reobf = false +} + +tasks.shadowJar { + configurations = listOf(shadowInclude) + + // exclude jarInJar + dependencies { + exclude( dependency ( libs.flow.math.get() ) ) + } + + // airlift + relocate ("io.airlift", "de.bluecolored.shadow.airlift") + + // bluenbt + relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") + + // caffeine + relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("com.google.errorprone", "de.bluecolored.shadow.errorprone") + + // dbcp2 + relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons") + + // configurate + relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") + relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + + // lz4 + relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + + // bstats + relocate ("org.bstats", "de.bluecolored.shadow.bstats") + +} + +tasks.jarJar.configure { + archiveFileName = "${project.name}-${project.version}-jarjar.jar" +} + +tasks.withType(ProcessResources::class).configureEach { + val replacements = mapOf( + "version" to project.version, + "minecraft_version" to minecraftVersion, + "forge_version" to forgeVersion, + ) + inputs.properties(replacements) + filesMatching(listOf( + "META-INF/mods.toml", + "pack.mcmeta" + )) { expand(replacements) } +} + +val mergeShadowAndJarJar = tasks.create("mergeShadowAndJarJar") { + dependsOn( tasks.shadowJar, tasks.jarJar ) + from ( + zipTree( tasks.shadowJar.map { it.outputs.files.singleFile } ), + zipTree( tasks.jarJar.map { it.outputs.files.singleFile } ).matching { + include("META-INF/jarjar/**") + } + ) + archiveFileName = "${project.name}-${project.version}-merged.jar" +} + +tasks.getByName("release") { + dependsOn( mergeShadowAndJarJar ) + inputFile = mergeShadowAndJarJar.outputs.files.singleFile +} + +modrinth { + gameVersions.addAll(supportedMinecraftVersions) +} + +curseforgeBlueMap { + addGameVersion("Forge") + addGameVersion("Java ${java.toolchain.languageVersion.get()}") + supportedMinecraftVersions.forEach { + addGameVersion(it) + } +} diff --git a/implementations/forge/settings.gradle.kts b/implementations/forge/settings.gradle.kts deleted file mode 100644 index 768bb058..00000000 --- a/implementations/forge/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "forge" - -includeBuild("../../BlueMapCommon") diff --git a/implementations/forge/src/main/resources/META-INF/mods.toml b/implementations/forge/src/main/resources/META-INF/mods.toml index e5f5a4cb..d511ce52 100644 --- a/implementations/forge/src/main/resources/META-INF/mods.toml +++ b/implementations/forge/src/main/resources/META-INF/mods.toml @@ -1,26 +1,25 @@ modLoader="javafml" -loaderVersion="[44,)" +loaderVersion="[0,)" license="MIT" issueTrackerURL="https://github.com/BlueMap-Minecraft/BlueMap/issues" + [[mods]] modId="bluemap" version="${version}" displayName="BlueMap" displayURL="https://github.com/BlueMap-Minecraft/BlueMap" authors="Blue (TBlueF, Lukas Rieger)" -description=''' -A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) -''' +description="A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)" [[dependencies.bluemap]] modId="forge" mandatory=true - versionRange="[50,)" + versionRange="[${forge_version},)" ordering="NONE" side="SERVER" [[dependencies.bluemap]] modId="minecraft" mandatory=true - versionRange="[1.20.6,)" + versionRange="[${minecraft_version},)" ordering="NONE" side="SERVER" diff --git a/implementations/neoforge/build.gradle b/implementations/neoforge/build.gradle deleted file mode 100644 index e8fd2e96..00000000 --- a/implementations/neoforge/build.gradle +++ /dev/null @@ -1,161 +0,0 @@ -plugins { - id "java" - id "java-library" - id "net.neoforged.gradle.userdev" version '7.0.142' - id "com.diffplug.spotless" version "6.1.2" - id "com.github.node-gradle.node" version "3.0.1" - id "com.modrinth.minotaur" version "2.+" - id "com.matthewprenger.cursegradle" version "1.4.0" - id "com.github.johnrengelman.shadow" version "8.1.1" -} - -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -repositories { - mavenCentral() - maven { url = "https://libraries.minecraft.net" } - maven { url = "https://repo.bluecolored.de/releases" } -} - -base { - archivesName = "bluemap" -} - -java.toolchain.languageVersion = JavaLanguageVersion.of(21) -sourceSets.main.resources { srcDir 'src/generated/resources' } - -configurations { - implementation.extendsFrom(shadowInclude) -} - -dependencies { - implementation "net.neoforged:neoforge:${neo_version}" - - shadowInclude ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by forge - exclude (group: "com.google.guava", module: "guava") - exclude (group: "com.google.code.gson", module: "gson") - exclude (group: "com.mojang", module: "brigadier") - } - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -tasks.withType(ProcessResources).configureEach { - var replaceProperties = [ - minecraft_version: minecraft_version, - minecraft_version_range: minecraft_version_range, - neo_version: neo_version, - neo_version_range: neo_version_range, - loader_version_range: loader_version_range, - mod_id: mod_id, - mod_name: mod_name, - mod_license: mod_license, - mod_version: version, - mod_description: mod_description, - pack_format_number: pack_format_number, - ] - inputs.properties replaceProperties - - filesMatching(['META-INF/neoforge.mods.toml', 'pack.mcmeta']) { - expand replaceProperties + [project: project] - } -} - -tasks.withType(JavaCompile).configureEach { - options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation -} - -tasks.withType(AbstractArchiveTask).configureEach { - setReproducibleFileOrder(true) - setPreserveFileTimestamps(false) -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -test { - useJUnitPlatform() -} - -shadowJar { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - - configurations = [project.configurations.shadowInclude] - - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") - - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") - - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} - -task release { - dependsOn(shadowJar) -} - -modrinth { - token = System.getenv("MODRINTH_TOKEN") - projectId = "swbUV1cr" - versionNumber = "${project.version}-${project.name}" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - uploadFile = shadowJar - loaders = ["neoforge"] - gameVersions = ["1.21"] -} - -curseforge { - apiKey = System.getenv("CURSEFORGE_TOKEN") ?: "" - project { - id = "406463" - changelogType = "markdown" - changelog = file("../../release.md") - .getText() - .replace("{version}", project.version.toString()) - releaseType = "release" - - addGameVersion "NeoForge" - - addGameVersion "Java 21" - - addGameVersion "1.21" - - mainArtifact shadowJar - } - options { - javaVersionAutoDetect = false - javaIntegration = false - forgeGradleIntegration = false - } -} - -task publish { - dependsOn(tasks.findByName("modrinth")) - dependsOn(tasks.findByName("curseforge")) -} diff --git a/implementations/neoforge/build.gradle.kts b/implementations/neoforge/build.gradle.kts new file mode 100644 index 00000000..bcfbcb02 --- /dev/null +++ b/implementations/neoforge/build.gradle.kts @@ -0,0 +1,106 @@ +plugins { + bluemap.implementation + bluemap.modrinth + bluemap.curseforge + alias ( libs.plugins.neoforge.gradle ) +} + +val supportedMinecraftVersions = listOf( + "1.21" +) + +val minecraftVersion = supportedMinecraftVersions.first() +val neoVersion = "21.0.0-beta" +val loaderVersion = "4" + +val shadowInclude: Configuration by configurations.creating +configurations.api.get().extendsFrom(shadowInclude) + +neoForge { + version = neoVersion +} + +dependencies { + shadowInclude ( project( ":common" ) ) { + exclude ( group = "com.google.code.gson", module = "gson" ) + exclude ( group = "com.mojang", module = "brigadier" ) + } + + jarJar ( libs.flow.math.get().group, libs.flow.math.get().name , "[${libs.flow.math.get().version},)" ) +} + +tasks.shadowJar { + configurations = listOf(shadowInclude) + + // exclude jarInJar + dependencies { + exclude( dependency ( libs.flow.math.get() ) ) + } + + // airlift + relocate ("io.airlift", "de.bluecolored.shadow.airlift") + + // bluenbt + relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") + + // caffeine + relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("com.google.errorprone", "de.bluecolored.shadow.errorprone") + + // dbcp2 + relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons") + + // configurate + relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") + relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + + // lz4 + relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + + // bstats + relocate ("org.bstats", "de.bluecolored.shadow.bstats") + +} + +tasks.withType(ProcessResources::class).configureEach { + val replacements = mapOf( + "version" to project.version, + "minecraft_version" to minecraftVersion, + "neo_version" to neoVersion, + "loader_version" to loaderVersion, + ) + inputs.properties(replacements) + filesMatching(listOf( + "META-INF/neoforge.mods.toml", + "pack.mcmeta" + )) { expand(replacements) } +} + +val mergeShadowAndJarJar = tasks.create("mergeShadowAndJarJar") { + dependsOn( tasks.shadowJar, tasks.jarJar ) + from ( + zipTree( tasks.shadowJar.map { it.outputs.files.singleFile } ), + tasks.jarJar.map { it.outputs.files } + ) + archiveFileName = "${project.name}-${project.version}-merged.jar" +} + +tasks.getByName("release") { + dependsOn( mergeShadowAndJarJar ) + inputFile = mergeShadowAndJarJar.outputs.files.singleFile +} + +modrinth { + loaders.addAll("neoforge") + gameVersions.addAll(supportedMinecraftVersions) +} + +curseforgeBlueMap { + addGameVersion("NeoForge") + addGameVersion("Java ${java.toolchain.languageVersion.get()}") + supportedMinecraftVersions.forEach { + addGameVersion(it) + } +} diff --git a/implementations/neoforge/gradle.properties b/implementations/neoforge/gradle.properties deleted file mode 100644 index 07c1fb5d..00000000 --- a/implementations/neoforge/gradle.properties +++ /dev/null @@ -1,17 +0,0 @@ -org.gradle.daemon=false -org.gradle.debug=false - -neogradle.subsystems.parchment.minecraftVersion=1.20.6 -neogradle.subsystems.parchment.mappingsVersion=2024.05.01 - -minecraft_version=1.21 -minecraft_version_range=[1.21,) -neo_version=21.0.0-beta -neo_version_range=[21.0.0-beta,) -loader_version_range=[4,) - -mod_id=bluemap -mod_name=BlueMap -mod_description=A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL) -mod_license=MIT -pack_format_number=18 diff --git a/implementations/neoforge/settings.gradle b/implementations/neoforge/settings.gradle deleted file mode 100644 index 8a668861..00000000 --- a/implementations/neoforge/settings.gradle +++ /dev/null @@ -1,15 +0,0 @@ -pluginManagement { - repositories { - mavenLocal() - gradlePluginPortal() - maven { url = 'https://maven.neoforged.net/releases' } - } -} - -plugins { - id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' -} - -rootProject.name = "neoforge" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/implementations/neoforge/src/main/resources/META-INF/neoforge.mods.toml index f8f61f84..019a2026 100644 --- a/implementations/neoforge/src/main/resources/META-INF/neoforge.mods.toml +++ b/implementations/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -1,23 +1,23 @@ modLoader="javafml" -loaderVersion="${loader_version_range}" -license="${mod_license}" +loaderVersion="[${loader_version},)" +license="MIT" [[mods]] -modId="${mod_id}" -version="${mod_version}" -displayName="${mod_name}" -description='''${mod_description}''' +modId="bluemap" +version="${version}" +displayName="BlueMap" +description='''A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)''' displayTest="IGNORE_SERVER_VERSION" -[[dependencies.${mod_id}]] #optional +[[dependencies.bluemap]] modId="neoforge" mandatory=true - versionRange="${neo_version_range}" + versionRange="[${neo_version},)" ordering="NONE" side="BOTH" -[[dependencies.${mod_id}]] +[[dependencies.bluemap]] modId="minecraft" mandatory=true - versionRange="${minecraft_version_range}" + versionRange="[${minecraft_version},)" ordering="NONE" side="BOTH" diff --git a/implementations/neoforge/src/main/resources/pack.mcmeta b/implementations/neoforge/src/main/resources/pack.mcmeta index 59c52402..666ca24e 100644 --- a/implementations/neoforge/src/main/resources/pack.mcmeta +++ b/implementations/neoforge/src/main/resources/pack.mcmeta @@ -1,8 +1,8 @@ { "pack": { "description": { - "text": "${mod_id} resources" + "text": "bluemap resources" }, - "pack_format": ${pack_format_number} + "pack_format": 18 } } diff --git a/implementations/paper/build.gradle.kts b/implementations/paper/build.gradle.kts index 849c876c..0285a004 100644 --- a/implementations/paper/build.gradle.kts +++ b/implementations/paper/build.gradle.kts @@ -1,150 +1,85 @@ plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("com.modrinth.minotaur") version "2.+" - id ("io.papermc.hangar-publish-plugin") version "0.1.2" + bluemap.implementation + bluemap.modrinth + bluemap.hangar } -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore +val supportedMinecraftVersions = listOf( + "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", + "1.21" +) -val javaTarget = 17 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://repo.papermc.io/repository/maven-public/") - maven ("https://repo.bluecolored.de/releases") -} +val minecraftVersion = supportedMinecraftVersions.first() +val paperVersion = "${minecraftVersion}-R0.1-SNAPSHOT" dependencies { - api ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by bukkit - exclude( group = "com.google.guava", module = "guava" ) - exclude( group = "com.google.code.gson", module = "gson" ) - } + api ( project( ":common" ) ) { + exclude( group = "com.google.code.gson", module = "gson" ) + } - shadow ("io.papermc.paper:paper-api:1.20.1-R0.1-SNAPSHOT") - implementation ("org.bstats:bstats-bukkit:2.2.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - from("src/main/resources") { - include("plugin.yml") - duplicatesStrategy = DuplicatesStrategy.INCLUDE - - expand ( - "version" to project.version - ) - } + shadow ( "io.papermc.paper", "paper-api", paperVersion ) + api ( libs.bstats.bukkit ) } tasks.shadowJar { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("org.bstats", "de.bluecolored.shadow.bstats") - relocate ("com.mojang.brigadier", "de.bluecolored.shadow.mojang.brigadier") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + // exclude libraries added via plugin.yml + dependencies { + exclude( dependency ( libs.flow.math.get() ) ) + } - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") + // airlift + relocate ("io.airlift", "de.bluecolored.shadow.airlift") + + // bluenbt + relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") + + // brigadier + relocate ("com.mojang.brigadier", "de.bluecolored.shadow.brigadier") + + // caffeine + relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("com.google.errorprone", "de.bluecolored.shadow.errorprone") + + // dbcp2 + relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons") + + // configurate + relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") + relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + + // lz4 + relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + + // bstats + relocate ("org.bstats", "de.bluecolored.shadow.bstats") - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") } -tasks.register("release") { - dependsOn(tasks.shadowJar) +tasks.processResources { + from("src/main/resources") { + include("plugin.yml") + duplicatesStrategy = DuplicatesStrategy.INCLUDE + + expand ( + "version" to project.version, + "api_version" to minecraftVersion, + "flow_math_version" to libs.flow.math.get().version + ) + } } modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("shadowJar")) - loaders.addAll("paper","purpur","folia") - gameVersions.addAll( - "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", - "1.21" - ) + loaders.addAll("paper", "purpur", "folia") + gameVersions.addAll(supportedMinecraftVersions) } hangarPublish { - publications.register("plugin") { - version.set(project.version as String) - id.set("BlueMap") - channel.set("Release") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - - apiKey.set(System.getenv("HANGAR_TOKEN")) - - // register platforms - platforms { - register(io.papermc.hangarpublishplugin.model.Platforms.PAPER) { - jar.set(tasks.shadowJar.flatMap { it.archiveFile }) - platformVersions.set(listOf( - "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", - "1.21" - )) - } - } - } -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("publishPluginPublicationToHangar") + publications.named("bluemap") { + platforms.paper { + platformVersions = supportedMinecraftVersions + } + } } diff --git a/implementations/paper/settings.gradle.kts b/implementations/paper/settings.gradle.kts deleted file mode 100644 index 0f0bc513..00000000 --- a/implementations/paper/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "paper" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/paper/src/main/resources/plugin.yml b/implementations/paper/src/main/resources/plugin.yml index 1c060336..41a7a2fb 100644 --- a/implementations/paper/src/main/resources/plugin.yml +++ b/implementations/paper/src/main/resources/plugin.yml @@ -2,46 +2,10 @@ name: BlueMap description: "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)" main: de.bluecolored.bluemap.bukkit.BukkitPlugin version: "${version}" -api-version: 1.19 +api-version: "${api_version}" folia-supported: true author: "Blue (TBlueF / Lukas Rieger)" website: "https://github.com/BlueMap-Minecraft" -commands: -permissions: - bluemap.*: - children: - bluemap.status: true - bluemap.version: true - bluemap.help: true - bluemap.reload: true - bluemap.stop: true - bluemap.start: true - bluemap.freeze: true - bluemap.purge: true - bluemap.marker: true - bluemap.update: true - bluemap.debug: true - default: op - bluemap.status: - default: op - bluemap.version: - default: op - bluemap.help: - default: op - bluemap.reload: - default: op - bluemap.stop: - default: op - bluemap.start: - default: op - bluemap.freeze: - default: op - bluemap.purge: - default: op - bluemap.marker: - default: op - bluemap.update: - default: op - bluemap.debug: - default: op \ No newline at end of file +libraries: + - "com.flowpowered:flow-math:${flow_math_version}" diff --git a/implementations/spigot/build.gradle.kts b/implementations/spigot/build.gradle.kts index f98b7123..89cf2f53 100644 --- a/implementations/spigot/build.gradle.kts +++ b/implementations/spigot/build.gradle.kts @@ -1,132 +1,74 @@ plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("com.modrinth.minotaur") version "2.+" + bluemap.implementation + bluemap.modrinth } -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore +val supportedMinecraftVersions = listOf( + "1.16.5", + "1.17", "1.17.1", + "1.18", "1.18.1", "1.18.2", + "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", + "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", + "1.21" +) -val javaTarget = 16 -java { - sourceCompatibility = JavaVersion.toVersion(javaTarget) - targetCompatibility = JavaVersion.toVersion(javaTarget) -} - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") { - content { - includeGroup ("org.spigotmc") - } - } - maven ("https://repo.bluecolored.de/releases") -} +val apiVersion = "1.16" +val spigotVersion = "1.16.5-R0.1-SNAPSHOT" dependencies { - api ("de.bluecolored.bluemap:BlueMapCommon") { - //exclude dependencies provided by bukkit - exclude( group = "com.google.guava", module = "guava" ) - exclude( group = "com.google.code.gson", module = "gson" ) - } + api ( project( ":common" ) ) { + exclude( group = "com.google.code.gson", module = "gson" ) + } - shadow ("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT") - implementation ("org.bstats:bstats-bukkit:2.2.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - from("src/main/resources") { - include("plugin.yml") - duplicatesStrategy = DuplicatesStrategy.INCLUDE - - expand ( - "version" to project.version - ) - } + shadow ( "org.spigotmc", "spigot-api", spigotVersion ) + api ( libs.bstats.bukkit ) } tasks.shadowJar { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("org.bstats", "de.bluecolored.shadow.bstats") - relocate ("com.mojang.brigadier", "de.bluecolored.shadow.mojang.brigadier") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("javax.inject", "de.bluecolored.shadow.javax.inject") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + // airlift + relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("com.google.inject", "de.bluecolored.shadow.google.inject") + // brigadier + relocate ("com.mojang.brigadier", "de.bluecolored.shadow.brigadier") + + // bluenbt + relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") + + // caffeine + relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("com.google.errorprone", "de.bluecolored.shadow.errorprone") + + // dbcp2 + relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons") + + // configurate + relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") + relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + + // lz4 + relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + + // bstats + relocate ("org.bstats", "de.bluecolored.shadow.bstats") - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") } -tasks.register("release") { - dependsOn(tasks.shadowJar) +tasks.processResources { + from("src/main/resources") { + include("plugin.yml") + duplicatesStrategy = DuplicatesStrategy.INCLUDE + + expand ( + "version" to project.version, + "api_version" to apiVersion, + ) + } } modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("shadowJar")) - loaders.addAll("spigot", "paper", "purpur") - gameVersions.addAll( - "1.16.5", - "1.17", "1.17.1", - "1.18", "1.18.1", "1.18.2", - "1.19", "1.19.1", "1.19.2", "1.19.3", "1.19.4", - "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6", - "1.21" - ) -} - -tasks.register("publish") { - dependsOn("modrinth") + loaders.addAll("spigot", "paper", "purpur") + gameVersions.addAll(supportedMinecraftVersions) } diff --git a/implementations/spigot/settings.gradle.kts b/implementations/spigot/settings.gradle.kts deleted file mode 100644 index 72805d80..00000000 --- a/implementations/spigot/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "spigot" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/implementations/spigot/src/main/resources/plugin.yml b/implementations/spigot/src/main/resources/plugin.yml index 0111dc31..35aeb026 100644 --- a/implementations/spigot/src/main/resources/plugin.yml +++ b/implementations/spigot/src/main/resources/plugin.yml @@ -2,45 +2,6 @@ name: BlueMap description: "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)" main: de.bluecolored.bluemap.bukkit.BukkitPlugin version: "${version}" -api-version: 1.16 +api-version: "${api_version}" author: "Blue (TBlueF / Lukas Rieger)" website: "https://github.com/BlueMap-Minecraft" -commands: - -permissions: - bluemap.*: - children: - bluemap.status: true - bluemap.version: true - bluemap.help: true - bluemap.reload: true - bluemap.stop: true - bluemap.start: true - bluemap.freeze: true - bluemap.purge: true - bluemap.marker: true - bluemap.update: true - bluemap.debug: true - default: op - bluemap.status: - default: op - bluemap.version: - default: op - bluemap.help: - default: op - bluemap.reload: - default: op - bluemap.stop: - default: op - bluemap.start: - default: op - bluemap.freeze: - default: op - bluemap.purge: - default: op - bluemap.marker: - default: op - bluemap.update: - default: op - bluemap.debug: - default: op \ No newline at end of file diff --git a/implementations/sponge/build.gradle.kts b/implementations/sponge/build.gradle.kts index 38473a12..cd6d60f6 100644 --- a/implementations/sponge/build.gradle.kts +++ b/implementations/sponge/build.gradle.kts @@ -1,153 +1,76 @@ import org.spongepowered.gradle.plugin.config.PluginLoaders plugins { - java - `java-library` - id("com.diffplug.spotless") version "6.1.2" - id ("com.github.node-gradle.node") version "3.0.1" - id ("com.github.johnrengelman.shadow") version "8.1.1" - id ("org.spongepowered.gradle.plugin") version "2.2.0" - id ("com.modrinth.minotaur") version "2.+" - id("org.spongepowered.gradle.ore") version "2.2.0" + bluemap.implementation + bluemap.modrinth + bluemap.ore + id ( libs.plugins.sponge.plugin.get().pluginId ) } -group = "de.bluecolored.bluemap" -version = System.getProperty("bluemap.version") ?: "?" // set by BlueMapCore - -java.toolchain.languageVersion = JavaLanguageVersion.of(21) - -repositories { - mavenCentral() - maven ("https://libraries.minecraft.net") - maven ("https://repo.bluecolored.de/releases") -} +val supportedMinecraftVersions = listOf( + "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6" +) dependencies { - api ("de.bluecolored.bluemap:BlueMapCommon"){ - //exclude dependencies provided by sponge - exclude( group = "com.google.guava", module = "guava" ) - exclude( group = "com.google.code.gson", module = "gson" ) - exclude( group = "javax.inject" ) - exclude( group = "com.google.inject" ) - } + api ( project( ":common" ) ) { + exclude( group = "com.google.code.gson", module = "gson" ) + } - implementation ("org.bstats:bstats-sponge:2.2.1") - - testImplementation ("org.junit.jupiter:junit-jupiter:5.8.2") - testRuntimeOnly ("org.junit.jupiter:junit-jupiter-engine:5.8.2") + api ( libs.bstats.sponge ) } sponge { - apiVersion("11.0.0") - license("MIT") - loader { - name(PluginLoaders.JAVA_PLAIN) - version("1.0") - } - plugin("bluemap") { - displayName("bluemap") - entrypoint("de.bluecolored.bluemap.sponge.SpongePlugin") - description("A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)") - contributor("Blue (TBlueF, Lukas Rieger)") { - description("Lead Developer") - } - dependency("spongeapi") { - optional(false) - } - } -} - -spotless { - java { - target ("src/*/java/**/*.java") - - licenseHeaderFile("../../HEADER") - indentWithSpaces() - trimTrailingWhitespace() - } -} - -tasks.withType(JavaCompile::class).configureEach { - options.apply { - encoding = "utf-8" - } -} - -tasks.withType(AbstractArchiveTask::class).configureEach { - isReproducibleFileOrder = true - isPreserveFileTimestamps = false -} - -tasks.test { - useJUnitPlatform() -} - -tasks.processResources { - from("src/main/resources") { - include("META-INF/plugins.json") - duplicatesStrategy = DuplicatesStrategy.INCLUDE - - expand ( - "version" to project.version - ) - } + apiVersion("11.0.0") + license("MIT") + loader { + name(PluginLoaders.JAVA_PLAIN) + version("1.0") + } + plugin("bluemap") { + displayName("bluemap") + entrypoint("de.bluecolored.bluemap.sponge.SpongePlugin") + description("A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)") + contributor("Blue (TBlueF, Lukas Rieger)") { + description("Lead Developer") + } + dependency("spongeapi") { + optional(false) + } + } } tasks.shadowJar { - destinationDirectory.set(file("../../build/release")) - archiveFileName.set("BlueMap-${project.version}-${project.name}.jar") - //relocate ("com.flowpowered.math", "de.bluecolored.shadow.flowpowered.math") //DON"T relocate this, because the API depends on it - relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") - relocate ("com.mojang.brigadier", "de.bluecolored.shadow.mojang.brigadier") - relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.benmanes.caffeine") - relocate ("com.google.errorprone", "de.bluecolored.shadow.google.errorprone") - relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") - relocate ("org.aopalliance", "de.bluecolored.shadow.aopalliance") - relocate ("org.bstats", "de.bluecolored.shadow.bstats") - relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") - relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") - relocate ("org.codehaus", "de.bluecolored.shadow.codehaus") - relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") - relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + // airlift + relocate ("io.airlift", "de.bluecolored.shadow.airlift") - relocate ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2") - relocate ("org.apache.commons.logging", "de.bluecolored.shadow.apache.commons.logging") - relocate ("org.apache.commons.pool2", "de.bluecolored.shadow.apache.commons.pool2") -} + // brigadier + relocate ("com.mojang.brigadier", "de.bluecolored.shadow.brigadier") + + // bluenbt + relocate ("de.bluecolored.bluenbt", "de.bluecolored.shadow.bluenbt") + + // caffeine + relocate ("com.github.benmanes.caffeine", "de.bluecolored.shadow.caffeine") + relocate ("org.checkerframework", "de.bluecolored.shadow.checkerframework") + relocate ("com.google.errorprone", "de.bluecolored.shadow.errorprone") + + // dbcp2 + relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons") + + // configurate + relocate ("org.spongepowered.configurate", "de.bluecolored.shadow.configurate") + relocate ("com.typesafe.config", "de.bluecolored.shadow.typesafe.config") + relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref") + + // lz4 + relocate ("net.jpountz", "de.bluecolored.shadow.jpountz") + + // bstats + relocate ("org.bstats", "de.bluecolored.shadow.bstats") -tasks.register("release") { - dependsOn(tasks.shadowJar) } modrinth { - token.set(System.getenv("MODRINTH_TOKEN")) - projectId.set("swbUV1cr") - versionNumber.set("${project.version}-${project.name}") - changelog.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - uploadFile.set(tasks.findByName("shadowJar")) - loaders.addAll("sponge") - gameVersions.addAll( - "1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4", "1.20.5", "1.20.6" - ) -} - -tasks.register("publish") { - dependsOn("modrinth") - dependsOn("publishToOre") -} - -oreDeployment { - apiKey(System.getenv("ORE_TOKEN")) - defaultPublication { - projectId.set("bluemap") - createForumPost.set(true) - versionBody.set(file("../../release.md") - .readText() - .replace("{version}", project.version.toString())) - publishArtifacts.setFrom(tasks.findByName("shadowJar")) - } + gameVersions.addAll(supportedMinecraftVersions) } diff --git a/implementations/sponge/settings.gradle.kts b/implementations/sponge/settings.gradle.kts deleted file mode 100644 index add6a72b..00000000 --- a/implementations/sponge/settings.gradle.kts +++ /dev/null @@ -1,3 +0,0 @@ -rootProject.name = "sponge" - -includeBuild("../../BlueMapCommon") \ No newline at end of file diff --git a/jitpack.yml b/jitpack.yml deleted file mode 100644 index 46c85291..00000000 --- a/jitpack.yml +++ /dev/null @@ -1,2 +0,0 @@ -jdk: - - openjdk11 \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 52e023eb..cd2481e7 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,29 +1,37 @@ -rootProject.name = "BlueMap" +logger.lifecycle(""" +## Building BlueMap ... +Java: ${System.getProperty("java.version")} +JVM: ${System.getProperty("java.vm.version")} (${System.getProperty("java.vendor")}) +Arch: ${System.getProperty("os.arch")} +""") -// setup workspace -val releaseNotesFile = file("release.md") -if (!releaseNotesFile.exists()) releaseNotesFile.createNewFile(); +pluginManagement { + repositories { + gradlePluginPortal() + mavenCentral() + maven ("https://maven.minecraftforge.net" ) + maven ("https://maven.fabricmc.net/" ) + maven ("https://maven.neoforged.net/releases" ) + } +} -// bluemap -includeBuild("BlueMapCore") -includeBuild("BlueMapCommon") +rootProject.name = "bluemap" -// implementations -includeBuild("implementations/cli") -includeBuild("implementations/fabric") -includeBuild("implementations/forge") -includeBuild("implementations/neoforge") -includeBuild("implementations/spigot") -includeBuild("implementations/paper") -includeBuild("implementations/sponge") +includeBuild("api") -// legacy support -includeBuild("implementations/forge-1.18.1") -includeBuild("implementations/forge-1.19.4") -includeBuild("implementations/forge-1.20") -includeBuild("implementations/forge-1.20.6") +include(":core") +include(":common") -includeBuild("implementations/fabric-1.18") -includeBuild("implementations/fabric-1.19.4") -includeBuild("implementations/fabric-1.20") -includeBuild("implementations/fabric-1.20.5") +implementation("cli") +implementation("fabric") +implementation("forge") +implementation("neoforge") +implementation("paper") +implementation("spigot") +implementation("sponge") + +fun implementation(name: String) { + val project = ":$name" + include(project) + project(project).projectDir = file("implementations/$name") +}