diff --git a/build_forge.gradle b/build_forge.gradle index 5a22bc9e94..52a87faf67 100644 --- a/build_forge.gradle +++ b/build_forge.gradle @@ -1009,6 +1009,7 @@ tasks.register('kettingJar', Jar) { manifest{ attributes 'Main-Class': 'org.kettingpowered.launcher.Main' attributes 'Launcher-Agent-Class': 'org.kettingpowered.launcher.Main' + attributes 'Premain-Class': 'org.kettingpowered.launcher.Main' attributes 'Automatic-Module-Name': 'org.kettingpowered.kettinglauncher' attributes 'Bundled': 'true' attributes 'MinecraftVersion': MC_VERSION diff --git a/gradle.properties b/gradle.properties index adba5e2826..45e3151ddd 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ org.gradle.daemon=false JAVA_VERSION=17 MC_VERSION=1.20.1 FORGE_VERSION=47.3.1 -KETTING_VERSION=0.2.31 +KETTING_VERSION=0.2.32 MC_NEXT_VERSION=1.21 MCP_VERSION=20230612.114412 MAPPING_CHANNEL=official diff --git a/patches/minecraft/net/minecraft/commands/Commands.java.patch b/patches/minecraft/net/minecraft/commands/Commands.java.patch index 266da11418..8074ef7401 100644 --- a/patches/minecraft/net/minecraft/commands/Commands.java.patch +++ b/patches/minecraft/net/minecraft/commands/Commands.java.patch @@ -218,12 +218,19 @@ if (commandnode.canUse(p_82115_)) { ArgumentBuilder argumentbuilder = (ArgumentBuilder)commandnode.createBuilder(); argumentbuilder.requires((p_82126_) -> { -@@ -358,7 +_,48 @@ +@@ -357,8 +_,55 @@ + }; } ++ //Ketting start - dispatcher redirection ++ public CommandDispatcher getDirectDispatcher() { ++ return this.dispatcher; ++ } ++ public CommandDispatcher getDispatcher() { + if (org.kettingpowered.ketting.common.utils.DispatcherRedirector.needsRedirect()) + return getForgeDispatcher().unwrap(); ++ //Ketting end return this.dispatcher; + } + diff --git a/patches/minecraft/net/minecraft/server/ServerFunctionManager.java.patch b/patches/minecraft/net/minecraft/server/ServerFunctionManager.java.patch index 82de7cedd7..4e776dcf04 100644 --- a/patches/minecraft/net/minecraft/server/ServerFunctionManager.java.patch +++ b/patches/minecraft/net/minecraft/server/ServerFunctionManager.java.patch @@ -5,7 +5,7 @@ public CommandDispatcher getDispatcher() { - return this.server.getCommands().getDispatcher(); -+ return this.server.vanillaCommandDispatcher.getDispatcher(); // CraftBukkit ++ return this.server.vanillaCommandDispatcher.getDirectDispatcher(); // CraftBukkit //Ketting - no need for redirecting } public void tick() {