Directly build Art (#11813)
This commit is contained in:
@@ -41,7 +41,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
return CraftRegistry.registry;
|
||||
}
|
||||
|
||||
public static <E> net.minecraft.core.Registry<E> getMinecraftRegistry(ResourceKey<net.minecraft.core.Registry<E>> key) {
|
||||
public static <E> net.minecraft.core.Registry<E> getMinecraftRegistry(ResourceKey<? extends net.minecraft.core.Registry<E>> key) {
|
||||
return CraftRegistry.getMinecraftRegistry().lookupOrThrow(key);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public class CraftPainting extends CraftHanging implements Painting {
|
||||
|
||||
@Override
|
||||
public Art getArt() {
|
||||
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
|
||||
return CraftArt.minecraftHolderToBukkit(this.getHandle().getVariant());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user