API to get a BlockState without a snapshot
This allows you to get a BlockState without creating a snapshot, operating on the real tile entity. This is useful for where performance is needed
This commit is contained in:
@@ -36,4 +36,18 @@ 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user