diff --git a/patches/server/Brigadier-based-command-API.patch b/patches/server/Brigadier-based-command-API.patch index 9c92e5d324..006d5b07dc 100644 --- a/patches/server/Brigadier-based-command-API.patch +++ b/patches/server/Brigadier-based-command-API.patch @@ -401,6 +401,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + throw new IllegalArgumentException("Unknown command node passed. Don't know how to unwrap this."); + } + ++ // Store unwrapped node before unwrapping children to avoid infinite recursion in cyclic redirects. ++ converted.wrappedCached = pureNode; ++ pureNode.unwrappedCached = converted; ++ + /* + Add the children to the node, unwrapping each child in the process. + */ @@ -408,9 +412,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + converted.addChild(this.unwrapNode(child)); + } + -+ converted.wrappedCached = pureNode; -+ pureNode.unwrappedCached = converted; -+ + return converted; + } +