2024-11-23 23:10:54 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: kokiriglade <60290002+celerry@users.noreply.github.com>
|
|
|
|
Date: Sat, 23 Nov 2024 18:58:49 +0000
|
|
|
|
Subject: [PATCH] Expanded Art API
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftArt.java b/src/main/java/org/bukkit/craftbukkit/CraftArt.java
|
2024-11-24 20:12:08 +01:00
|
|
|
index 40af940193d0df66bbcdcf5f46132e304016a4d7..9d73954282104a6e315c1840feb7d6034d27cfbe 100644
|
2024-11-23 23:10:54 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftArt.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftArt.java
|
2024-11-24 20:12:08 +01:00
|
|
|
@@ -75,6 +75,22 @@ public class CraftArt implements Art, Handleable<PaintingVariant> {
|
2024-11-23 23:10:54 +01:00
|
|
|
return this.paintingVariant.height();
|
|
|
|
}
|
|
|
|
|
2024-11-24 20:12:08 +01:00
|
|
|
+ // Paper start - Expand Art API
|
2024-11-23 23:10:54 +01:00
|
|
|
+ @Override
|
2024-11-24 20:12:08 +01:00
|
|
|
+ public net.kyori.adventure.text.Component title() {
|
|
|
|
+ return this.paintingVariant.title().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null);
|
2024-11-23 23:10:54 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
2024-11-24 20:12:08 +01:00
|
|
|
+ public net.kyori.adventure.text.Component author() {
|
|
|
|
+ return this.paintingVariant.author().map(io.papermc.paper.adventure.PaperAdventure::asAdventure).orElse(null);
|
2024-11-23 23:10:54 +01:00
|
|
|
+ }
|
|
|
|
+
|
2024-11-24 20:12:08 +01:00
|
|
|
+ public net.kyori.adventure.key.Key assetId() {
|
|
|
|
+ return io.papermc.paper.adventure.PaperAdventure.asAdventure(this.paintingVariant.assetId());
|
2024-11-23 23:10:54 +01:00
|
|
|
+ }
|
2024-11-24 20:12:08 +01:00
|
|
|
+ // Paper end - Expand Art API
|
2024-11-23 23:10:54 +01:00
|
|
|
+
|
|
|
|
@Override
|
|
|
|
public int getId() {
|
|
|
|
return CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT).getId(this.paintingVariant);
|