Fixup NamespacedKey handling

This commit is contained in:
Nassim Jahnke
2024-01-06 14:31:00 +01:00
parent 21837e419b
commit 898bf90054
9 changed files with 26 additions and 6 deletions

View File

@@ -16,7 +16,7 @@ public class CraftPainting extends CraftHanging implements Painting {
@Override
public Art getArt() {
return CraftArt.minecraftHolderToBukkit(this.getHandle().getVariant());
return org.bukkit.craftbukkit.CraftRegistry.unwrapAndConvertHolder(org.bukkit.Registry.ART, this.getHandle().getVariant()).orElseThrow(() -> new IllegalStateException("Inlined painting variants are not supported yet in the API!")); // Paper
}
@Override