#787: Add LivingEntity#canBreatheUnderwater()

This commit is contained in:
Parker Hawke 2022-09-04 21:34:17 +10:00 committed by md_5
parent dea11a5f1a
commit 2683d76602
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

View file

@ -588,6 +588,14 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
<T> void setMemory(@NotNull MemoryKey<T> memoryKey, @Nullable T memoryValue);
/**
* Returns true if this entity can breathe underwater and will not take
* suffocation damage when its air supply reaches zero.
*
* @return <code>true</code> if the entity can breathe underwater
*/
public boolean canBreatheUnderwater();
/**
* Get the category to which this entity belongs.
*