Archiviert
13
0
Dieses Repository wurde am 2021-12-14 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
SteamSpigot/Spigot/SteamWar-Patches/Load_DispenserRegistry_async_spigot.patch
2021-04-12 19:54:42 +02:00

67 Zeilen
3.4 KiB
Diff

Index: src/main/java/net/minecraft/server/CommandDispatcher.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java (revision 2092b553cf3dbfc5fbe5534ac1bfd42e2c90a9fc)
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java (date 1609100118789)
@@ -35,7 +35,6 @@
// CraftBukkit start
public final CommandDispatcher init(boolean flag) {
CommandAdvancement.a(this.b);
- CommandExecute.a(this.b);
CommandBossBar.a(this.b);
CommandClear.a(this.b);
CommandClone.a(this.b);
@@ -48,7 +47,6 @@
CommandMe.a(this.b);
CommandEnchant.a(this.b);
CommandXp.a(this.b);
- CommandFill.a(this.b);
CommandForceload.a(this.b);
CommandFunction.a(this.b);
CommandGamemode.a(this.b);
Index: src/main/java/net/minecraft/server/MinecraftServer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
--- a/src/main/java/net/minecraft/server/MinecraftServer.java (revision 2092b553cf3dbfc5fbe5534ac1bfd42e2c90a9fc)
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java (date 1609100120517)
@@ -175,11 +175,18 @@
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
// Spigot end
+ protected static Thread dispenserRegistryInit;
+
public MinecraftServer(OptionSet options, Proxy proxy, DataFixer datafixer, CommandDispatcher commanddispatcher, YggdrasilAuthenticationService yggdrasilauthenticationservice, MinecraftSessionService minecraftsessionservice, GameProfileRepository gameprofilerepository, UserCache usercache, WorldLoadListenerFactory worldloadlistenerfactory, String s) {
super("Server");
this.ae = new ResourceManager(EnumResourcePackType.SERVER_DATA, this.serverThread);
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
this.craftingManager = new CraftingManager();
+ try {
+ dispenserRegistryInit.join();
+ } catch (InterruptedException e) {
+ Thread.currentThread().interrupt();
+ }
this.tagRegistry = new TagRegistry();
this.scoreboardServer = new ScoreboardServer(this);
this.bossBattleCustomData = new BossBattleCustomData(this);
@@ -1185,8 +1192,12 @@
}
CrashReport.h();
- DispenserRegistry.init();
- DispenserRegistry.c();
+ dispenserRegistryInit = new Thread(() -> {
+ DispenserRegistry.init();
+ DispenserRegistry.c();
+ });
+ dispenserRegistryInit.start();
+
File s = (File) optionset.valueOf("universe"); // CraftBukkit
YggdrasilAuthenticationService yggdrasilauthenticationservice = new YggdrasilAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString());
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();