From 7c831941e2a492f63f31ddaa5b91eb024637c408 Mon Sep 17 00:00:00 2001 From: TonytheMacaroni <tonythemacaroni123@gmail.com> Date: Wed, 9 Oct 2024 16:58:13 -0400 Subject: [PATCH] Fix CraftMagicNumbers#getTag (#11484) --- patches/server/Registry-Modification-API.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patches/server/Registry-Modification-API.patch b/patches/server/Registry-Modification-API.patch index de743d23fe..8d5a26c33e 100644 --- a/patches/server/Registry-Modification-API.patch +++ b/patches/server/Registry-Modification-API.patch @@ -1367,7 +1367,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // Paper start - hack to get tags for non server-backed registries + @Override + public <A extends Keyed, M> io.papermc.paper.registry.tag.Tag<A> getTag(final io.papermc.paper.registry.tag.TagKey<A> tagKey) { // TODO remove Keyed -+ if (tagKey.registryKey() != io.papermc.paper.registry.RegistryKey.ENTITY_TYPE || tagKey.registryKey() != io.papermc.paper.registry.RegistryKey.FLUID) { ++ if (tagKey.registryKey() != io.papermc.paper.registry.RegistryKey.ENTITY_TYPE && tagKey.registryKey() != io.papermc.paper.registry.RegistryKey.FLUID) { + throw new UnsupportedOperationException(tagKey.registryKey() + " doesn't have tags"); + } + final net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<M>> nmsKey = io.papermc.paper.registry.PaperRegistries.registryToNms(tagKey.registryKey());