mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 03:22:19 +01:00
Add Block#isPassable
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
37945d9ca3
commit
2deff0fecc
1 changed files with 13 additions and 0 deletions
|
@ -356,4 +356,17 @@ public interface Block extends Metadatable {
|
|||
*/
|
||||
Collection<ItemStack> getDrops(ItemStack tool);
|
||||
|
||||
/**
|
||||
* Checks if this block is passable.
|
||||
* <p>
|
||||
* A block is passable if it has no colliding parts that would prevent
|
||||
* players from moving through it.
|
||||
* <p>
|
||||
* Examples: Tall grass, flowers, signs, etc. are passable, but open doors,
|
||||
* fence gates, trap doors, etc. are not because they still have parts that
|
||||
* can be collided with.
|
||||
*
|
||||
* @return <code>true</code> if passable
|
||||
*/
|
||||
boolean isPassable();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue