diff options
Diffstat (limited to 'patches/api')
-rw-r--r-- | patches/api/0056-Fix-upstream-javadocs.patch | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/patches/api/0056-Fix-upstream-javadocs.patch b/patches/api/0056-Fix-upstream-javadocs.patch index 8f32e343c7..3a13e0e863 100644 --- a/patches/api/0056-Fix-upstream-javadocs.patch +++ b/patches/api/0056-Fix-upstream-javadocs.patch @@ -1449,6 +1449,22 @@ index 07c3dff4d6190ef388d9c1e1c36f67f00a3e8e66..597a18a767b68b47e81454b7d44613c7 * * @param input The input choice. * @return The changed recipe, so you can chain calls. +diff --git a/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java b/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java +index e7d905b1146b2bdd2da5bdeb6bf3541fb181d59e..c7d3041221742f6655155f19ef2addcaf2401015 100644 +--- a/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java ++++ b/src/main/java/org/bukkit/inventory/meta/BlockStateMeta.java +@@ -32,6 +32,11 @@ public interface BlockStateMeta extends ItemMeta { + * @param blockState the block state to attach to the block. + * @throws IllegalArgumentException if the blockState is null + * or invalid for this item. ++ * ++ * @apiNote As of 1.20.5 the block state carries a copy of the item's data deviations. ++ * As such, setting the block state via this method will reset secondary deviations of the item meta. ++ * This can manifest in the addition to an existing lore failing or a change of a previously added display name. ++ * It is hence recommended to first mutate the block state, set it back, and then mutate the item meta. + */ + void setBlockState(@NotNull BlockState blockState); + } diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java index 18c2864c99d4dfae16cdb35143486aeebb9a6fd6..d66857825528ee772219440dffa28ad8e820493b 100644 --- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java |