From ba939d13914e8f67b80faefc7ee43710cb84b2bd Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sun, 8 Dec 2024 22:23:55 +0100 Subject: [PATCH] Brigadier: fix simpleUnwrap not keeping redirect modifier and forks properties from original node (#11654) --- patches/server/Brigadier-based-command-API.patch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/patches/server/Brigadier-based-command-API.patch b/patches/server/Brigadier-based-command-API.patch index a4b25ba490..7dbcdcf1a6 100644 --- a/patches/server/Brigadier-based-command-API.patch +++ b/patches/server/Brigadier-based-command-API.patch @@ -10,6 +10,7 @@ public net.minecraft.server.ReloadableServerResources registryLookup public net.minecraft.server.ReloadableServerResources Co-authored-by: Jake Potrebic +Co-authored-by: Marc Baloup diff --git a/src/main/java/com/mojang/brigadier/CommandDispatcher.java b/src/main/java/com/mojang/brigadier/CommandDispatcher.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 @@ -505,7 +506,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + private CommandNode simpleUnwrap(final CommandNode node) { + return node.createBuilder() -+ .redirect(node.getRedirect() == null ? null : this.unwrapNode(node.getRedirect())) ++ .forward(node.getRedirect() == null ? null : this.unwrapNode(node.getRedirect()), node.getRedirectModifier(), node.isFork()) + .build(); + } +