forked from mirror/BlueMap
Tidy up buildscript and dependencies, fix spongeworld world-folder being wrong
This commit is contained in:
parent
74c68c3428
commit
e02a43a521
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
@ -88,6 +88,7 @@ tasks.shadowJar {
|
||||
relocate ("io.leangen.geantyref", "de.bluecolored.shadow.geantyref")
|
||||
relocate ("io.airlift", "de.bluecolored.shadow.airlift")
|
||||
relocate ("org.apache.commons", "de.bluecolored.shadow.apache.commons")
|
||||
relocate ("net.jpountz", "de.bluecolored.shadow.jpountz")
|
||||
}
|
||||
|
||||
tasks.register("release") {
|
||||
|
@ -115,6 +115,7 @@ tasks.shadowJar {
|
||||
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")
|
||||
|
@ -115,6 +115,7 @@ tasks.shadowJar {
|
||||
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")
|
||||
|
@ -10,7 +10,7 @@ plugins {
|
||||
id("com.diffplug.spotless") version "6.1.2"
|
||||
id ("com.github.node-gradle.node") version "3.0.1"
|
||||
id ("com.github.johnrengelman.shadow") version "7.1.2"
|
||||
id ("fabric-loom") version "1.3-SNAPSHOT"
|
||||
id ("fabric-loom") version "1.5-SNAPSHOT"
|
||||
id ("com.modrinth.minotaur") version "2.+"
|
||||
id ("com.matthewprenger.cursegradle") version "1.4.0"
|
||||
}
|
||||
@ -115,6 +115,7 @@ tasks.shadowJar {
|
||||
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")
|
||||
|
@ -137,6 +137,7 @@ shadowJar {
|
||||
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")
|
||||
|
@ -137,6 +137,7 @@ shadowJar {
|
||||
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")
|
||||
|
@ -137,6 +137,7 @@ shadowJar {
|
||||
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")
|
||||
|
@ -111,6 +111,7 @@ shadowJar {
|
||||
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")
|
||||
|
@ -100,6 +100,7 @@ tasks.shadowJar {
|
||||
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")
|
||||
|
@ -102,6 +102,7 @@ tasks.shadowJar {
|
||||
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")
|
||||
|
@ -120,6 +120,7 @@ tasks.shadowJar {
|
||||
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 ("org.apache.commons.dbcp2", "de.bluecolored.shadow.apache.commons.dbcp2")
|
||||
relocate ("org.apache.commons.io", "de.bluecolored.shadow.apache.commons.io")
|
||||
|
@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
@ -44,10 +44,19 @@ public class SpongeWorld implements ServerWorld {
|
||||
|
||||
public SpongeWorld(org.spongepowered.api.world.server.ServerWorld delegate) {
|
||||
this.delegate = new WeakReference<>(delegate);
|
||||
this.worldFolder = delegate.directory();
|
||||
|
||||
Path dimensionFolder = delegate.directory().normalize();
|
||||
this.dimension = WorldTypes.registry().findValueKey(delegate.worldType())
|
||||
.map(k -> new Key(k.namespace(), k.value()))
|
||||
.orElse(DataPack.DIMENSION_OVERWORLD);
|
||||
|
||||
// resolve root world-folder from dimension-folder
|
||||
if (DataPack.DIMENSION_OVERWORLD.equals(dimension))
|
||||
this.worldFolder = dimensionFolder;
|
||||
else if (DataPack.DIMENSION_THE_NETHER.equals(dimension) || DataPack.DIMENSION_THE_END.equals(dimension))
|
||||
this.worldFolder = dimensionFolder.getParent();
|
||||
else
|
||||
this.worldFolder = dimensionFolder.getParent().getParent().getParent();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user