Load custom worlds from correct location

This commit is contained in:
md_5 2019-05-12 16:59:21 +10:00
parent 21dbe8ab2a
commit a46ef53b75
2 changed files with 3 additions and 11 deletions

View File

@ -14,8 +14,9 @@
+ // CraftBukkit end + // CraftBukkit end
private final int d; private final int d;
private final String e; private final String e;
private final String f; - private final String f;
- private final BiFunction<World, DimensionManager, ? extends WorldProvider> g; - private final BiFunction<World, DimensionManager, ? extends WorldProvider> g;
+ public final String f;
+ public final BiFunction<World, DimensionManager, ? extends WorldProvider> g; + public final BiFunction<World, DimensionManager, ? extends WorldProvider> g;
private final boolean h; private final boolean h;
@ -36,15 +37,6 @@
} }
public static DimensionManager a(Dynamic<?> dynamic) { public static DimensionManager a(Dynamic<?> dynamic) {
@@ -54,7 +58,7 @@
}
public String toString() {
- return a(this).toString();
+ return this.e + "(" + a(getType()) + ")"; // CraftBukkit
}
@Nullable
@@ -80,4 +84,12 @@ @@ -80,4 +84,12 @@
public <T> T a(DynamicOps<T> dynamicops) { public <T> T a(DynamicOps<T> dynamicops) {
return dynamicops.createString(IRegistry.DIMENSION_TYPE.getKey(this).toString()); return dynamicops.createString(IRegistry.DIMENSION_TYPE.getKey(this).toString());

View File

@ -923,7 +923,7 @@ public final class CraftServer implements Server {
} }
DimensionManager actualDimension = DimensionManager.a(creator.environment().getId()); DimensionManager actualDimension = DimensionManager.a(creator.environment().getId());
DimensionManager internalDimension = DimensionManager.a(name, new DimensionManager(dimension, name, name, (w, manager) -> actualDimension.g.apply(w, manager), actualDimension.hasSkyLight(), actualDimension)); DimensionManager internalDimension = DimensionManager.a(name, new DimensionManager(dimension, actualDimension.c(), actualDimension.f, (w, manager) -> actualDimension.g.apply(w, manager), actualDimension.hasSkyLight(), actualDimension));
WorldServer internal = (WorldServer) new WorldServer(console, console.executorService, sdm, worlddata, internalDimension, console.getMethodProfiler(), getServer().worldLoadListenerFactory.create(11), creator.environment(), generator); WorldServer internal = (WorldServer) new WorldServer(console, console.executorService, sdm, worlddata, internalDimension, console.getMethodProfiler(), getServer().worldLoadListenerFactory.create(11), creator.environment(), generator);
if (!(worlds.containsKey(name.toLowerCase(java.util.Locale.ENGLISH)))) { if (!(worlds.containsKey(name.toLowerCase(java.util.Locale.ENGLISH)))) {