Updated Upstream (CraftBukkit) (#10646)

Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
66fd94322 SPIGOT-7652: Remove remap for SPELL_MOB_AMBIENT which no longer exists
ecfa4f973 SPIGOT-7654: ItemStack#isSimilar does not work with empty BlockStateMeta
4460ecc49 SPIGOT-7655: ItemMeta#addItemFlags(ItemFlag.HIDE_ATTRIBUTES) not working when no attribute modifiers set
5d84f48a4 SPIGOT-7653: Update ApiVersion.CURRENT with latest version and include tests
This commit is contained in:
Jake Potrebic 2024-05-05 09:08:55 -07:00 committed by GitHub
parent b13c7dbe36
commit 9d8d38d137
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 85 additions and 74 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 9a22459f15cff45a234c1d497aca27a5433570f7..9c139f25eaef3c1b93fbf254cb08c6a449288ec8 100644
index 899995f30b54db93a4f44313384b316825693e36..3f309c255097f6778854d710a5a045fa960a953f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -867,11 +867,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -870,11 +870,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftChatMessage.fromComponent(this.displayName);
}
@ -32,7 +32,7 @@ index 9a22459f15cff45a234c1d497aca27a5433570f7..9c139f25eaef3c1b93fbf254cb08c6a4
@Override
public boolean hasDisplayName() {
return this.displayName != null;
@@ -1045,6 +1057,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1048,6 +1060,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
}
@ -47,7 +47,7 @@ index 9a22459f15cff45a234c1d497aca27a5433570f7..9c139f25eaef3c1b93fbf254cb08c6a4
@Override
public void setLore(List<String> lore) {
if (lore == null || lore.isEmpty()) {
@@ -1059,6 +1079,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1062,6 +1082,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -69,7 +69,7 @@ index 9a22459f15cff45a234c1d497aca27a5433570f7..9c139f25eaef3c1b93fbf254cb08c6a4
@Override
public boolean hasCustomModelData() {
return this.customModelData != null;
@@ -1682,6 +1717,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@@ -1685,6 +1720,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
for (Object object : addFrom) {