diff --git a/paper-api/src/main/java/org/bukkit/block/data/BlockData.java b/paper-api/src/main/java/org/bukkit/block/data/BlockData.java index b3e1373381..3f64c7415f 100644 --- a/paper-api/src/main/java/org/bukkit/block/data/BlockData.java +++ b/paper-api/src/main/java/org/bukkit/block/data/BlockData.java @@ -21,6 +21,41 @@ public interface BlockData extends Cloneable { */ String getAsString(); + /** + * Merges all explicitly set states from the given data with this BlockData. + *
+ * Note that the given data MUST have been created from one of the String + * parse methods, e.g. {@link Server#createBlockData(java.lang.String)} and + * not have been subsequently modified. + *
+ * Note also that the block types must match identically. + * + * @param data the data to merge from + * @return a new instance of this blockdata with the merged data + * @deprecated draft API + */ + @Deprecated + BlockData merge(BlockData data); + + /** + * Checks if the specified BlockData matches this block data. + *
+ * The semantics of this method are such that for manually created or + * modified BlockData it has the same effect as + * {@link Object#equals(java.lang.Object)}, whilst for parsed data (that to + * which {@link #merge(org.bukkit.block.data.BlockData)} applies, it will + * return true when the type and all explicitly set states match. + *
+ * Note that these semantics mean that a.matches(b) may not be the same + * as b.matches(a) + * + * @param data the data to match against (normally a parsed constant) + * @return if there is a match + * @deprecated draft API + */ + @Deprecated + boolean matches(BlockData data); + /** * Returns a copy of this BlockData. *