Commits

md_5 authored b95736b13f7
Update to Minecraft 1.21.1
No tags

nms-patches/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch

Modified
1 1 --- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
2 2 +++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
3 -@@ -147,7 +147,7 @@
3 +@@ -158,7 +158,7 @@
4 4 axisalignedbb = this.createAabb(this.deltaX == null ? 0.0D : this.deltaX, this.deltaY == null ? 0.0D : this.deltaY, this.deltaZ == null ? 0.0D : this.deltaZ);
5 5 }
6 6
7 7 - Function function;
8 8 + Function<Vec3D, Vec3D> function; // CraftBukkit - decompile error
9 9
10 10 if (this.x == null && this.y == null && this.z == null) {
11 11 function = (vec3d) -> {
12 -@@ -204,8 +204,10 @@
12 +@@ -215,8 +215,10 @@
13 13 };
14 14 }
15 15
16 16 - protected void parseSelector() throws CommandSyntaxException {
17 17 - this.usesSelectors = true;
18 18 + // CraftBukkit start
19 19 + protected void parseSelector(boolean overridePermissions) throws CommandSyntaxException {
20 20 + this.usesSelectors = !overridePermissions;
21 21 + // CraftBukkit end
22 22 this.suggestions = this::suggestSelector;
23 23 if (!this.reader.canRead()) {
24 24 throw ArgumentParserSelector.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
25 -@@ -494,6 +496,12 @@
25 +@@ -505,6 +507,12 @@
26 26 }
27 27
28 28 public EntitySelector parse() throws CommandSyntaxException {
29 29 + // CraftBukkit start
30 30 + return parse(false);
31 31 + }
32 32 +
33 33 + public EntitySelector parse(boolean overridePermissions) throws CommandSyntaxException {
34 34 + // CraftBukkit end
35 35 this.startPosition = this.reader.getCursor();
36 36 this.suggestions = this::suggestNameOrSelector;
37 37 if (this.reader.canRead() && this.reader.peek() == '@') {
38 -@@ -502,7 +510,7 @@
38 +@@ -513,7 +521,7 @@
39 39 }
40 40
41 41 this.reader.skip();
42 42 - this.parseSelector();
43 43 + this.parseSelector(overridePermissions); // CraftBukkit
44 44 } else {
45 45 this.parseNameOrUUID();
46 46 }

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut