Skip to content

Commit

Permalink
fix BaseTag constructor (#5095)
Browse files Browse the repository at this point in the history
  • Loading branch information
Machine-Maker committed Jan 21, 2021
1 parent 8fa1538 commit e9a87b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Spigot-API-Patches/0153-Add-Material-Tags.patch
Original file line number Diff line number Diff line change
Expand Up @@ -675,10 +675,10 @@ index 0000000000000000000000000000000000000000..3f36165d89ae4aaa153dcb9ddbb8c58a
+}
diff --git a/src/main/java/io/papermc/paper/tag/BaseTag.java b/src/main/java/io/papermc/paper/tag/BaseTag.java
new file mode 100644
index 0000000000000000000000000000000000000000..c8777d2298c80c9579635000044e2d0a987cc15b
index 0000000000000000000000000000000000000000..4b8552e4e4c07b197fa9431fa911535b0222561e
--- /dev/null
+++ b/src/main/java/io/papermc/paper/tag/BaseTag.java
@@ -0,0 +1,159 @@
@@ -0,0 +1,160 @@
+package io.papermc.paper.tag;
+
+import com.google.common.collect.Lists;
Expand Down Expand Up @@ -717,6 +717,7 @@ index 0000000000000000000000000000000000000000..c8777d2298c80c9579635000044e2d0a
+ public BaseTag(@NotNull Class<T> clazz, @NotNull NamespacedKey key, @NotNull Collection<T> values, @NotNull Predicate<T>... globalPredicates) {
+ this.key = key != null ? key : NamespacedKey.randomKey();
+ this.tagged = clazz.isEnum() ? createEnumSet(clazz) : new HashSet<>();
+ this.tagged.addAll(values);
+ this.globalPredicates = Lists.newArrayList(globalPredicates);
+ }
+
Expand Down

0 comments on commit e9a87b7

Please sign in to comment.