Skip to content

Commit

Permalink
Merge branch 'kettingpowered:1.20.1' into 1.20.1
Browse files Browse the repository at this point in the history
  • Loading branch information
C0D3-M4513R authored Jun 28, 2024
2 parents 4cb9e0a + 120b353 commit 9c56b51
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions build_forge.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion patches/minecraft/net/minecraft/commands/Commands.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,19 @@
if (commandnode.canUse(p_82115_)) {
ArgumentBuilder<SharedSuggestionProvider, ?> argumentbuilder = (ArgumentBuilder)commandnode.createBuilder();
argumentbuilder.requires((p_82126_) -> {
@@ -358,7 +_,48 @@
@@ -357,8 +_,55 @@
};
}

+ //Ketting start - dispatcher redirection
+ public CommandDispatcher<CommandSourceStack> getDirectDispatcher() {
+ return this.dispatcher;
+ }
+
public CommandDispatcher<CommandSourceStack> getDispatcher() {
+ if (org.kettingpowered.ketting.common.utils.DispatcherRedirector.needsRedirect())
+ return getForgeDispatcher().unwrap();
+ //Ketting end
return this.dispatcher;
+ }
+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

public CommandDispatcher<CommandSourceStack> 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() {

0 comments on commit 9c56b51

Please sign in to comment.