Update to Minecraft 1.16.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-11-03 07:00:00 +11:00
parent 964cc7554a
commit 6450eb0ab7
34 changed files with 374 additions and 330 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -28,7 +28,8 @@
@@ -27,7 +27,8 @@
public Main() {}
@@ -10,7 +10,7 @@
OptionParser optionparser = new OptionParser();
OptionSpec<Void> optionspec = optionparser.accepts("nogui");
OptionSpec<Void> optionspec1 = optionparser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits");
@@ -52,20 +53,22 @@
@@ -51,20 +52,22 @@
optionparser.printHelpOn(System.err);
return;
}
@@ -35,13 +35,13 @@
Main.LOGGER.info("Initialized '{}' and '{}'", java_nio_file_path.toAbsolutePath(), java_nio_file_path1.toAbsolutePath());
return;
}
@@ -75,24 +78,42 @@
@@ -74,24 +77,42 @@
return;
}
- File file = new File((String) optionset.valueOf(optionspec9));
+ File file = (File) optionset.valueOf("universe"); // CraftBukkit
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString());
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY);
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(file, MinecraftServer.b.getName()));
@@ -82,7 +82,7 @@
DataPackConfiguration datapackconfiguration1 = MinecraftServer.a(resourcepackrepository, datapackconfiguration == null ? DataPackConfiguration.a : datapackconfiguration, flag);
CompletableFuture completablefuture = DataPackResources.a(resourcepackrepository.f(), CommandDispatcher.ServerType.DEDICATED, dedicatedserversettings.getProperties().functionPermissionLevel, SystemUtils.f(), Runnable::run);
@@ -107,6 +128,7 @@
@@ -106,6 +127,7 @@
}
datapackresources.i();
@@ -90,7 +90,7 @@
RegistryReadOps<NBTBase> registryreadops = RegistryReadOps.a((DynamicOps) DynamicOpsNBT.a, datapackresources.h(), iregistrycustom_dimension);
Object object = convertable_conversionsession.a((DynamicOps) registryreadops, datapackconfiguration1);
@@ -134,21 +156,32 @@
@@ -133,21 +155,32 @@
}
convertable_conversionsession.a((IRegistryCustom) iregistrycustom_dimension, (SaveData) object);
@@ -109,7 +109,7 @@
+ boolean flag1 = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui");
if (flag1 && !GraphicsEnvironment.isHeadless()) {
dedicatedserver1.bc();
dedicatedserver1.bd();
}
+ if (optionset.has("port")) {
@@ -125,7 +125,7 @@
Thread thread = new Thread("Server Shutdown Thread") {
public void run() {
dedicatedserver.safeShutdown(true);
@@ -157,14 +190,15 @@
@@ -156,14 +189,15 @@
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
Runtime.getRuntime().addShutdownHook(thread);