mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-30 19:40:37 +01:00
Fix CraftMagicNumbers#getTag (#11484)
This commit is contained in:
parent
43ee3e4a1e
commit
7c831941e2
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue