Added method to check snapshot state of TileStates (#7325)

This commit is contained in:
Jake Potrebic
2022-03-16 18:28:06 -07:00
parent f258c4f2e9
commit 2f393a5bdd
2 changed files with 35 additions and 0 deletions

View File

@@ -29,3 +29,26 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
/**
* Returns the biome that this block resides in
*
diff --git a/src/main/java/org/bukkit/block/TileState.java b/src/main/java/org/bukkit/block/TileState.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/block/TileState.java
+++ b/src/main/java/org/bukkit/block/TileState.java
@@ -0,0 +0,0 @@ public interface TileState extends BlockState, PersistentDataHolder {
@NotNull
@Override
PersistentDataContainer getPersistentDataContainer();
+
+ // Paper start
+ /**
+ * Checks if this TileState is a snapshot or a live
+ * representation of the underlying tile entity.
+ * <p>
+ * NOTE: You may still have to call {@link BlockState#update()} on
+ * live representations to update any visuals on the block.
+ *
+ * @return true if this is a snapshot
+ * @see Block#getState(boolean)
+ */
+ boolean isSnapshot();
+ // Paper end
}