73 Zeilen
3.8 KiB
Diff
73 Zeilen
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Zeanon <thezeanon@gmail.com>
|
|
Date: Wed, 14 Apr 2021 16:27:59 +0200
|
|
Subject: [PATCH] Load DispenserRegistry async paper
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/CommandDispatcher.java b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
index 7c988a12d6dc40f21c02cb47928253a4434876e7..90b20db687583e49747ea3159add1baa61280a31 100644
|
|
--- a/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
+++ b/src/main/java/net/minecraft/server/CommandDispatcher.java
|
|
@@ -35,7 +35,7 @@ public class CommandDispatcher {
|
|
// CraftBukkit start
|
|
public final CommandDispatcher init(boolean flag) {
|
|
CommandAdvancement.a(this.b);
|
|
- CommandExecute.a(this.b);
|
|
+ //CommandExecute.a(this.b); //Steamwar
|
|
CommandBossBar.a(this.b);
|
|
CommandClear.a(this.b);
|
|
CommandClone.a(this.b);
|
|
@@ -48,7 +48,7 @@ public class CommandDispatcher {
|
|
CommandMe.a(this.b);
|
|
CommandEnchant.a(this.b);
|
|
CommandXp.a(this.b);
|
|
- CommandFill.a(this.b);
|
|
+ //CommandFill.a(this.b); //Steamwar
|
|
CommandForceload.a(this.b);
|
|
CommandFunction.a(this.b);
|
|
CommandGamemode.a(this.b);
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 5c71efe494faaf7427f82036d60cc81447e4b12c..098b2ef32823c45983c0639393d76868f1e4d949 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -187,12 +187,21 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
|
// Spigot end
|
|
|
|
+ protected static Thread dispenserRegistryInit; //Steamwar
|
|
+
|
|
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);
|
|
SERVER = this; // Paper - better singleton
|
|
this.resourcePackRepository = new ResourcePackRepository<>(ResourcePackLoader::new);
|
|
this.craftingManager = new CraftingManager();
|
|
+ //Steamwar Start
|
|
+ try {
|
|
+ dispenserRegistryInit.join();
|
|
+ } catch (InterruptedException e) {
|
|
+ Thread.currentThread().interrupt();
|
|
+ }
|
|
+ //Steamwar End
|
|
this.tagRegistry = new TagRegistry();
|
|
this.scoreboardServer = new ScoreboardServer(this);
|
|
this.bossBattleCustomData = new BossBattleCustomData(this);
|
|
@@ -1434,8 +1443,15 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
|
}
|
|
|
|
CrashReport.h();
|
|
- DispenserRegistry.init();
|
|
- DispenserRegistry.c();
|
|
+ //Steamwar Start
|
|
+ //DispenserRegistry.init();
|
|
+ //DispenserRegistry.c();
|
|
+ dispenserRegistryInit = new Thread(() -> {
|
|
+ DispenserRegistry.init();
|
|
+ DispenserRegistry.c();
|
|
+ });
|
|
+ dispenserRegistryInit.start();
|
|
+ //Steamwar End
|
|
File s = (File) optionset.valueOf("universe"); // CraftBukkit
|
|
YggdrasilAuthenticationService yggdrasilauthenticationservice = new com.destroystokyo.paper.profile.PaperAuthenticationService(Proxy.NO_PROXY, UUID.randomUUID().toString()); // Paper
|
|
MinecraftSessionService minecraftsessionservice = yggdrasilauthenticationservice.createMinecraftSessionService();
|