SPIGOT-6781: Add Block#canPlace

This commit is contained in:
coll1234567 2021-11-23 18:49:11 +11:00 committed by md_5
parent 64c8bd39e0
commit 07a055315c
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

View file

@ -511,4 +511,13 @@ public interface Block extends Metadatable {
*/
@NotNull
VoxelShape getCollisionShape();
/**
* Checks if this block is a valid placement location for the specified
* block data.
*
* @param data the block data to check
* @return <code>true</code> if the block data can be placed here
*/
boolean canPlace(@NotNull BlockData data);
}