From 69e66a69c40c892212d1992d387935d60df62557 Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Fri, 28 Nov 2014 23:51:17 +0000 Subject: Don't default the universe to the current directory --- nms-patches/MinecraftServer.patch | 44 +++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'nms-patches') diff --git a/nms-patches/MinecraftServer.patch b/nms-patches/MinecraftServer.patch index e54cde82..16c86c8d 100644 --- a/nms-patches/MinecraftServer.patch +++ b/nms-patches/MinecraftServer.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/MinecraftServer.java 2014-11-28 17:43:43.257707431 +0000 -+++ src/main/java/net/minecraft/server/MinecraftServer.java 2014-11-28 17:38:22.000000000 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/MinecraftServer.java 2014-11-28 23:52:53.297215828 +0000 ++++ src/main/java/net/minecraft/server/MinecraftServer.java 2014-11-28 23:52:44.593216021 +0000 @@ -37,6 +37,18 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -196,13 +196,13 @@ + worlddata = new WorldData(worldsettings, name); + } + world = (WorldServer) new SecondaryWorldServer(this, idatamanager, dimension, this.worlds.get(0), this.methodProfiler, worlddata, org.bukkit.World.Environment.getEnvironment(dimension), gen).b(); ++ } ++ ++ if (gen != null) { ++ world.getWorld().getPopulators().addAll(gen.getDefaultPopulators(world.getWorld())); } - this.worldServer[j].addIWorldAccess(new WorldManager(this, this.worldServer[j])); -+ if (gen != null) { -+ world.getWorld().getPopulators().addAll(gen.getDefaultPopulators(world.getWorld())); -+ } -+ + this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldInitEvent(world.getWorld())); + + world.addIWorldAccess(new WorldManager(this, world)); @@ -465,7 +465,7 @@ boolean flag = true; String s = null; String s1 = "."; -@@ -636,6 +815,29 @@ +@@ -636,6 +815,27 @@ dedicatedserver.B(); Runtime.getRuntime().addShutdownHook(new ThreadShutdown("Server Shutdown Thread", dedicatedserver)); @@ -482,8 +482,6 @@ + + if (options.has("universe")) { + dedicatedserver.universe = (File) options.valueOf("universe"); -+ } else { -+ dedicatedserver.universe = new File("."); + } + + if (options.has("world")) { @@ -495,7 +493,7 @@ } catch (Exception exception) { MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception); } -@@ -643,8 +845,10 @@ +@@ -643,8 +843,10 @@ } public void B() { @@ -506,7 +504,7 @@ } public File d(String s) { -@@ -660,7 +864,14 @@ +@@ -660,7 +862,14 @@ } public WorldServer getWorldServer(int i) { @@ -522,7 +520,7 @@ } public String C() { -@@ -696,17 +907,62 @@ +@@ -696,17 +905,62 @@ } public String getPlugins() { @@ -592,7 +590,7 @@ } public void h(String s) { -@@ -721,7 +977,7 @@ +@@ -721,7 +975,7 @@ } public String getServerModName() { @@ -601,7 +599,7 @@ } public CrashReport b(CrashReport crashreport) { -@@ -734,6 +990,7 @@ +@@ -734,6 +988,7 @@ } public List tabCompleteCommand(ICommandListener icommandlistener, String s, BlockPosition blockposition) { @@ -609,7 +607,7 @@ ArrayList arraylist = Lists.newArrayList(); if (s.startsWith("/")) { -@@ -772,6 +1029,9 @@ +@@ -772,6 +1027,9 @@ return arraylist; } @@ -619,7 +617,7 @@ } public static MinecraftServer getServer() { -@@ -835,8 +1095,10 @@ +@@ -835,8 +1093,10 @@ } public void a(EnumDifficulty enumdifficulty) { @@ -632,7 +630,7 @@ if (worldserver != null) { if (worldserver.getWorldData().isHardcore()) { -@@ -878,15 +1140,17 @@ +@@ -878,15 +1138,17 @@ this.N = true; this.getConvertable().d(); @@ -653,7 +651,7 @@ this.safeShutdown(); } -@@ -919,9 +1183,11 @@ +@@ -919,9 +1181,11 @@ int i = 0; if (this.worldServer != null) { @@ -668,7 +666,7 @@ WorldData worlddata = worldserver.getWorldData(); mojangstatisticsgenerator.a("world[" + i + "][dimension]", Integer.valueOf(worldserver.worldProvider.getDimension())); -@@ -954,7 +1220,7 @@ +@@ -954,7 +1218,7 @@ public abstract boolean ad(); public boolean getOnlineMode() { @@ -677,7 +675,7 @@ } public void setOnlineMode(boolean flag) { -@@ -1024,8 +1290,10 @@ +@@ -1024,8 +1288,10 @@ } public void setGamemode(EnumGamemode enumgamemode) { @@ -690,7 +688,7 @@ } } -@@ -1057,7 +1325,7 @@ +@@ -1057,7 +1323,7 @@ } public World getWorld() { @@ -699,7 +697,7 @@ } public Entity f() { -@@ -1125,11 +1393,10 @@ +@@ -1125,11 +1391,10 @@ } public Entity a(UUID uuid) { @@ -715,7 +713,7 @@ if (worldserver != null) { Entity entity = worldserver.getEntity(uuid); -@@ -1144,7 +1411,7 @@ +@@ -1144,7 +1409,7 @@ } public boolean getSendCommandFeedback() { -- cgit v1.2.3