Update to Minecraft 1.15.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2020-01-22 08:00:00 +11:00
parent 09a2fa4d96
commit 77b64e0c78
50 changed files with 293 additions and 421 deletions

View File

@@ -134,9 +134,9 @@
WorldNBTStorage worldnbtstorage = this.getConvertable().a(s, this);
this.a(this.getWorld(), worldnbtstorage);
@@ -282,27 +329,137 @@
}
@@ -283,27 +330,137 @@
worlddata.a(this.getServerModName(), this.q().isPresent());
this.a(worldnbtstorage.getDirectory(), worlddata);
- WorldLoadListener worldloadlistener = this.worldLoadListenerFactory.create(11);
+ */
@@ -287,7 +287,7 @@
if (!worlddata.u()) {
try {
@@ -326,23 +483,8 @@
@@ -327,23 +484,8 @@
worlddata.d(true);
}
@@ -312,7 +312,7 @@
private void a(WorldData worlddata) {
worlddata.f(false);
@@ -361,6 +503,23 @@
@@ -362,6 +504,23 @@
protected void a(File file, WorldData worlddata) {
this.resourcePackRepository.a((ResourcePackSource) (new ResourcePackSourceVanilla()));
this.resourcePackFolder = new ResourcePackSourceFolder(new File(file, "datapacks"));
@@ -336,8 +336,8 @@
this.resourcePackRepository.a((ResourcePackSource) this.resourcePackFolder);
this.resourcePackRepository.a();
List<ResourcePackLoader> list = Lists.newArrayList();
@@ -382,11 +541,18 @@
this.ba();
@@ -383,11 +542,18 @@
this.bb();
}
- public void loadSpawn(WorldLoadListener worldloadlistener) {
@@ -358,7 +358,7 @@
BlockPosition blockposition = worldserver.getSpawn();
worldloadlistener.a(new ChunkCoordIntPair(blockposition));
@@ -397,17 +563,21 @@
@@ -398,17 +564,21 @@
chunkproviderserver.addTicket(TicketType.START, new ChunkCoordIntPair(blockposition), 11, Unit.INSTANCE);
while (chunkproviderserver.b() != 441) {
@@ -389,7 +389,7 @@
if (forcedchunk != null) {
WorldServer worldserver1 = this.getWorldServer(dimensionmanager);
@@ -422,10 +592,16 @@
@@ -423,10 +593,16 @@
}
}
@@ -408,7 +408,7 @@
}
protected void a(String s, WorldNBTStorage worldnbtstorage) {
@@ -472,12 +648,16 @@
@@ -473,12 +649,16 @@
}
}
@@ -425,7 +425,7 @@
return flag3;
}
@@ -486,8 +666,29 @@
@@ -487,8 +667,29 @@
this.stop();
}
@@ -455,7 +455,7 @@
if (this.getServerConnection() != null) {
this.getServerConnection().b();
}
@@ -496,6 +697,7 @@
@@ -497,6 +698,7 @@
MinecraftServer.LOGGER.info("Saving players");
this.playerList.savePlayers();
this.playerList.shutdown();
@@ -463,7 +463,7 @@
}
MinecraftServer.LOGGER.info("Saving worlds");
@@ -565,14 +767,16 @@
@@ -566,14 +768,16 @@
while (this.isRunning) {
long i = SystemUtils.getMonotonicMillis() - this.nextTick;
@@ -481,7 +481,7 @@
this.nextTick += 50L;
if (this.T) {
this.T = false;
@@ -619,6 +823,12 @@
@@ -620,6 +824,12 @@
} catch (Throwable throwable1) {
MinecraftServer.LOGGER.error("Exception stopping the server", throwable1);
} finally {
@@ -494,7 +494,7 @@
this.exit();
}
@@ -627,8 +837,15 @@
@@ -628,8 +838,15 @@
}
private boolean canSleepForTick() {
@@ -511,7 +511,7 @@
protected void sleepForTick() {
this.executeAll();
@@ -729,7 +946,7 @@
@@ -735,7 +952,7 @@
this.serverPing.b().a(agameprofile);
}
@@ -520,7 +520,7 @@
MinecraftServer.LOGGER.debug("Autosave started");
this.methodProfiler.enter("save");
this.playerList.savePlayers();
@@ -759,23 +976,40 @@
@@ -765,23 +982,40 @@
}
protected void b(BooleanSupplier booleansupplier) {
@@ -562,7 +562,7 @@
this.methodProfiler.enter("tick");
@@ -818,7 +1052,8 @@
@@ -824,7 +1058,8 @@
this.tickables.add(runnable);
}
@@ -572,7 +572,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");
@@ -841,15 +1076,17 @@
@@ -847,15 +1082,17 @@
optionparser.printHelpOn(System.err);
return;
}
@@ -592,26 +592,43 @@
MinecraftServer.LOGGER.info("Initialized '" + java_nio_file_path.toAbsolutePath().toString() + "' and '" + java_nio_file_path1.toAbsolutePath().toString() + "'");
return;
}
@@ -861,14 +1098,15 @@
@@ -868,14 +1105,16 @@
CrashReport.h();
DispenserRegistry.init();
DispenserRegistry.c();
- String s = (String) optionset.valueOf(optionspec8);
+ String s = "."; // PAIL?
+ String s = (String) optionset.valueOf("universe"); // CraftBukkit
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString());
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
GameProfileRepository gameprofilerepository = yggdrasilauthenticationservice.createProfileRepository();
UserCache usercache = new UserCache(gameprofilerepository, new File(s, MinecraftServer.b.getName()));
- String s1 = (String) Optional.ofNullable(optionset.valueOf(optionspec9)).orElse(dedicatedserversettings.getProperties().levelName);
- final DedicatedServer dedicatedserver = new DedicatedServer(new File(s), dedicatedserversettings, DataConverterRegistry.a(), yggdrasilauthenticationservice, minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new, s1);
+ // CraftBukkit start
+ String s1 = (String) Optional.ofNullable(optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
+ final DedicatedServer dedicatedserver = new DedicatedServer(optionset, dedicatedserversettings, DataConverterRegistry.a(), yggdrasilauthenticationservice, minecraftsessionservice, gameprofilerepository, usercache, WorldLoadListenerLogger::new, s1);
+ /* CraftBukkit start
+ /*
dedicatedserver.i((String) optionset.valueOf(optionspec7));
dedicatedserver.setPort((Integer) optionset.valueOf(optionspec10));
dedicatedserver.e(optionset.has(optionspec2));
@@ -891,6 +1129,29 @@
@@ -883,12 +1122,14 @@
dedicatedserver.setForceUpgrade(optionset.has(optionspec4));
dedicatedserver.setEraseCache(optionset.has(optionspec5));
dedicatedserver.c((String) optionset.valueOf(optionspec11));
- boolean flag = !optionset.has(optionspec) && !optionset.valuesOf(nonoptionargumentspec).contains("nogui");
+ */
+ boolean flag = !optionset.has("nogui") && !optionset.nonOptionArguments().contains("nogui");
if (flag && !GraphicsEnvironment.isHeadless()) {
dedicatedserver.bc();
}
+ /*
dedicatedserver.startServerThread();
Thread thread = new Thread("Server Shutdown Thread") {
public void run() {
@@ -898,6 +1139,29 @@
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(MinecraftServer.LOGGER));
Runtime.getRuntime().addShutdownHook(thread);
@@ -641,7 +658,7 @@
} catch (Exception exception) {
MinecraftServer.LOGGER.fatal("Failed to start the minecraft server", exception);
}
@@ -910,7 +1171,9 @@
@@ -917,7 +1181,9 @@
}
public void startServerThread() {
@@ -651,7 +668,7 @@
}
public File d(String s) {
@@ -965,7 +1228,7 @@
@@ -972,7 +1238,7 @@
}
public String getServerModName() {
@@ -660,17 +677,17 @@
}
public CrashReport b(CrashReport crashreport) {
@@ -1004,7 +1267,7 @@
}
@@ -1013,7 +1279,7 @@
public abstract Optional<String> q();
public boolean J() {
public boolean K() {
- return this.universe != null;
+ return true; // CraftBukkit
}
@Override
@@ -1720,4 +1983,16 @@
private void ba() {
@@ -1729,4 +1995,16 @@
private void bb() {
Block.REGISTRY_ID.forEach(IBlockData::c);
}
+