Update to Minecraft 1.21.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-12-04 03:20:00 +11:00
parent 267ae64dd6
commit 5381ea78f7
125 changed files with 1383 additions and 1093 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/server/Main.java
+++ b/net/minecraft/server/Main.java
@@ -60,6 +60,17 @@
@@ -61,16 +61,28 @@
import net.minecraft.world.level.storage.WorldInfo;
import org.slf4j.Logger;
@@ -18,9 +18,11 @@
public class Main {
private static final Logger LOGGER = LogUtils.getLogger();
@@ -67,8 +78,9 @@
public Main() {}
- @SuppressForbidden(a = "System.out needed before bootstrap")
+ @SuppressForbidden(reason = "System.out needed before bootstrap") // CraftBukkit - decompile error
@DontObfuscate
- public static void main(String[] astring) {
+ public static void main(final OptionSet optionset) { // CraftBukkit - replaces main(String[] astring)
@@ -29,7 +31,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");
@@ -94,15 +106,18 @@
@@ -96,15 +108,18 @@
optionparser.printHelpOn(System.err);
return;
}
@@ -50,7 +52,7 @@
JvmProfiler.INSTANCE.start(Environment.SERVER);
}
@@ -110,14 +125,27 @@
@@ -112,14 +127,27 @@
DispenserRegistry.validate();
SystemUtils.startTimerHackThread();
Path path1 = Paths.get("server.properties");
@@ -80,7 +82,7 @@
Main.LOGGER.info("Initialized '{}' and '{}'", path1.toAbsolutePath(), path2.toAbsolutePath());
return;
}
@@ -127,11 +155,13 @@
@@ -129,11 +157,13 @@
return;
}
@@ -97,7 +99,7 @@
Dynamic dynamic;
if (convertable_conversionsession.hasWorldData()) {
@@ -172,13 +202,31 @@
@@ -174,13 +204,31 @@
}
Dynamic<?> dynamic1 = dynamic;
@@ -130,7 +132,7 @@
WorldStem worldstem;
@@ -187,6 +235,7 @@
@@ -189,6 +237,7 @@
worldstem = (WorldStem) SystemUtils.blockUntilDone((executor) -> {
return WorldLoader.load(worldloader_c, (worldloader_a) -> {
@@ -138,7 +140,7 @@
IRegistry<WorldDimension> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
if (dynamic1 != null) {
@@ -199,7 +248,7 @@
@@ -201,7 +250,7 @@
WorldOptions worldoptions;
WorldDimensions worlddimensions;
@@ -147,7 +149,7 @@
worldsettings = MinecraftServer.DEMO_SETTINGS;
worldoptions = WorldOptions.DEMO_OPTIONS;
worlddimensions = WorldPresets.createNormalWorldDimensions(worldloader_a.datapackWorldgen());
@@ -207,7 +256,7 @@
@@ -209,7 +258,7 @@
DedicatedServerProperties dedicatedserverproperties = dedicatedserversettings.getProperties();
worldsettings = new WorldSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
@@ -156,7 +158,7 @@
worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
}
@@ -223,6 +272,7 @@
@@ -225,6 +274,7 @@
return;
}
@@ -164,7 +166,7 @@
IRegistryCustom.Dimension iregistrycustom_dimension = worldstem.registries().compositeAccess();
boolean flag1 = optionset.has(optionspec6);
@@ -235,20 +285,31 @@
@@ -237,20 +287,31 @@
SaveData savedata = worldstem.worldData();
convertable_conversionsession.saveDataTag(iregistrycustom_dimension, savedata);
@@ -198,7 +200,7 @@
Thread thread = new Thread("Server Shutdown Thread") {
public void run() {
dedicatedserver.halt(true);
@@ -257,6 +318,7 @@
@@ -259,6 +320,7 @@
thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
Runtime.getRuntime().addShutdownHook(thread);
@@ -206,7 +208,7 @@
} catch (Exception exception1) {
Main.LOGGER.error(LogUtils.FATAL_MARKER, "Failed to start the minecraft server", exception1);
}
@@ -293,7 +355,7 @@
@@ -295,7 +357,7 @@
}
public static void forceUpgrade(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, boolean flag, BooleanSupplier booleansupplier, IRegistryCustom iregistrycustom, boolean flag1) {