From e9a87b72be44783eca7bfc0eba9fad61d70f0f90 Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Thu, 21 Jan 2021 10:57:13 -0800 Subject: [PATCH] fix BaseTag constructor (#5095) --- Spigot-API-Patches/0153-Add-Material-Tags.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Spigot-API-Patches/0153-Add-Material-Tags.patch b/Spigot-API-Patches/0153-Add-Material-Tags.patch index 7fa147f735..39ae867301 100644 --- a/Spigot-API-Patches/0153-Add-Material-Tags.patch +++ b/Spigot-API-Patches/0153-Add-Material-Tags.patch @@ -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; @@ -717,6 +717,7 @@ index 0000000000000000000000000000000000000000..c8777d2298c80c9579635000044e2d0a + public BaseTag(@NotNull Class clazz, @NotNull NamespacedKey key, @NotNull Collection values, @NotNull Predicate... 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); + } +