Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8092)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: d41796de SPIGOT-7071: Add Player#stopSound(SoundCategory category) 61dae5b2 SPIGOT-7011, SPIGOT-7065: Overhaul of structures CraftBukkit Changes: 991aeda12 SPIGOT-1729, SPIGOT-7090: Keep precision in teleportation between worlds 5c9a5f628 SPIGOT-7071: Add Player#stopSound(SoundCategory category) 68f888ded SPIGOT-7011, SPIGOT-7065: Overhaul of structures 0231a3746 Remove outdated build delay. Spigot Changes: 475f6008 Rebuild patches 8ce1761f Rebuild patches
This commit is contained in:
parent
1e5d1db2b7
commit
385f313a8b
271 changed files with 640 additions and 748 deletions
|
@ -20,10 +20,10 @@ index ee5e59c37301d9a806e2f696d52d9d217b232833..bb5d22125b6cd4e60d2b7e2e00af158c
|
|||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 9dad601fd1c5e45ce374c9411324b1402eb4e906..280edb675f19be2b88c2b8075c3d865726ce9f7f 100644
|
||||
index 0afcf909d93973061c4b0735cba3e091fa79833b..34b365ce84439958eeba04fa50a13e02ddbd9412 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1139,9 +1139,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1141,9 +1141,15 @@ public final class CraftServer implements Server {
|
||||
File folder = new File(this.getWorldContainer(), name);
|
||||
World world = this.getWorld(name);
|
||||
|
||||
|
@ -41,23 +41,23 @@ index 9dad601fd1c5e45ce374c9411324b1402eb4e906..280edb675f19be2b88c2b8075c3d8657
|
|||
|
||||
if ((folder.exists()) && (!folder.isDirectory())) {
|
||||
throw new IllegalArgumentException("File exists with the name '" + name + "' and isn't a folder");
|
||||
@@ -1216,7 +1222,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1218,7 +1224,7 @@ public final class CraftServer implements Server {
|
||||
} else if (name.equals(levelName + "_the_end")) {
|
||||
worldKey = net.minecraft.world.level.Level.END;
|
||||
} else {
|
||||
- worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(name.toLowerCase(java.util.Locale.ENGLISH)));
|
||||
+ worldKey = ResourceKey.create(Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper
|
||||
- worldKey = ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, new ResourceLocation(name.toLowerCase(java.util.Locale.ENGLISH)));
|
||||
+ worldKey = ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper
|
||||
}
|
||||
|
||||
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
|
||||
@@ -1308,6 +1314,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1310,6 +1316,15 @@ public final class CraftServer implements Server {
|
||||
return null;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ @Override
|
||||
+ public World getWorld(NamespacedKey worldKey) {
|
||||
+ ServerLevel worldServer = console.getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, CraftNamespacedKey.toMinecraft(worldKey)));
|
||||
+ ServerLevel worldServer = console.getLevel(ResourceKey.create(net.minecraft.core.Registry.DIMENSION_REGISTRY, CraftNamespacedKey.toMinecraft(worldKey)));
|
||||
+ if (worldServer == null) return null;
|
||||
+ return worldServer.getWorld();
|
||||
+ }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue