Add hasCollision methods to various places
This commit is contained in:
@@ -4877,6 +4877,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - item default attributes API
|
||||
|
||||
// Paper start - isCollidable API
|
||||
/**
|
||||
* Checks if this material is collidable.
|
||||
*
|
||||
* @return true if collidable
|
||||
* @throws IllegalArgumentException if {@link #isBlock()} is false
|
||||
*/
|
||||
public boolean isCollidable() {
|
||||
if (this.isBlock()) {
|
||||
return this.asBlockType().hasCollision();
|
||||
}
|
||||
throw new IllegalArgumentException(this + " isn't a block type");
|
||||
}
|
||||
// Paper end - isCollidable API
|
||||
|
||||
/**
|
||||
* Do not use for any reason.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user