aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments')
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/EntityArgument.java.patch24
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch11
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelector.java.patch11
-rw-r--r--patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch37
4 files changed, 83 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/EntityArgument.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/EntityArgument.java.patch
new file mode 100644
index 0000000000..ed40be16ac
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/EntityArgument.java.patch
@@ -0,0 +1,24 @@
+--- a/net/minecraft/commands/arguments/EntityArgument.java
++++ b/net/minecraft/commands/arguments/EntityArgument.java
+@@ -96,10 +94,17 @@
+
+ @Override
+ public EntitySelector parse(StringReader reader) throws CommandSyntaxException {
+- int i = 0;
+- EntitySelectorParser entitySelectorParser = new EntitySelectorParser(reader);
+- EntitySelector entitySelector = entitySelectorParser.parse();
+- if (entitySelector.getMaxResults() > 1 && this.single) {
++ // CraftBukkit start
++ return parse(reader, false);
++ }
++
++ public EntitySelector parse(StringReader stringreader, boolean overridePermissions) throws CommandSyntaxException {
++ // CraftBukkit end
++ boolean flag = false;
++ EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader);
++ EntitySelector entityselector = argumentparserselector.parse(overridePermissions); // CraftBukkit
++
++ if (entityselector.getMaxResults() > 1 && this.single) {
+ if (this.playersOnly) {
+ reader.setCursor(0);
+ throw ERROR_NOT_SINGLE_PLAYER.createWithContext(reader);
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch
new file mode 100644
index 0000000000..480d8c4475
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/commands/arguments/blocks/BlockStateParser.java
++++ b/net/minecraft/commands/arguments/blocks/BlockStateParser.java
+@@ -69,7 +68,7 @@
+ private final StringReader reader;
+ private final boolean forTesting;
+ private final boolean allowNbt;
+- private final Map<Property<?>, Comparable<?>> properties = Maps.newHashMap();
++ private final Map<Property<?>, Comparable<?>> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable
+ private final Map<String, String> vagueProperties = Maps.newHashMap();
+ private ResourceLocation id = new ResourceLocation("");
+ @Nullable
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelector.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelector.java.patch
new file mode 100644
index 0000000000..ca6a686ad3
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelector.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/commands/arguments/selector/EntitySelector.java
++++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
+@@ -105,7 +92,7 @@
+ }
+
+ private void checkPermissions(CommandSourceStack source) throws CommandSyntaxException {
+- if (this.usesSelector && !source.hasPermission(2)) {
++ if (this.usesSelector && !source.hasPermission(2, "minecraft.command.selector")) { // CraftBukkit
+ throw EntityArgument.ERROR_SELECTORS_NOT_ALLOWED.create();
+ }
+ }
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch
new file mode 100644
index 0000000000..39f5ad0c5f
--- /dev/null
+++ b/patch-remap/mache-vineflower-stripped/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
++++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
+@@ -197,8 +204,10 @@
+ };
+ }
+
+- protected void parseSelector() throws CommandSyntaxException {
+- this.usesSelectors = true;
++ // CraftBukkit start
++ protected void parseSelector(boolean overridePermissions) throws CommandSyntaxException {
++ this.usesSelectors = !overridePermissions;
++ // CraftBukkit end
+ this.suggestions = this::suggestSelector;
+ if (!this.reader.canRead()) {
+ throw ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
+@@ -448,6 +465,12 @@
+ }
+
+ public EntitySelector parse() throws CommandSyntaxException {
++ // CraftBukkit start
++ return parse(false);
++ }
++
++ public EntitySelector parse(boolean overridePermissions) throws CommandSyntaxException {
++ // CraftBukkit end
+ this.startPosition = this.reader.getCursor();
+ this.suggestions = this::suggestNameOrSelector;
+ if (this.reader.canRead() && this.reader.peek() == '@') {
+@@ -456,7 +479,7 @@
+ }
+
+ this.reader.skip();
+- this.parseSelector();
++ this.parseSelector(overridePermissions); // CraftBukkit
+ } else {
+ this.parseNameOrUUID();
+ }