Brigadier: fix simpleUnwrap not keeping redirect modifier and forks properties from original node (#11654)
This commit is contained in:
@ -10,6 +10,7 @@ public net.minecraft.server.ReloadableServerResources registryLookup
|
|||||||
public net.minecraft.server.ReloadableServerResources
|
public net.minecraft.server.ReloadableServerResources
|
||||||
|
|
||||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||||
|
Co-authored-by: Marc Baloup <marc.baloup@laposte.net>
|
||||||
|
|
||||||
diff --git a/src/main/java/com/mojang/brigadier/CommandDispatcher.java b/src/main/java/com/mojang/brigadier/CommandDispatcher.java
|
diff --git a/src/main/java/com/mojang/brigadier/CommandDispatcher.java b/src/main/java/com/mojang/brigadier/CommandDispatcher.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
@ -505,7 +506,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+
|
+
|
||||||
+ private CommandNode<CommandSourceStack> simpleUnwrap(final CommandNode<CommandSourceStack> node) {
|
+ private CommandNode<CommandSourceStack> simpleUnwrap(final CommandNode<CommandSourceStack> node) {
|
||||||
+ return node.createBuilder()
|
+ 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();
|
+ .build();
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user