mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 10:59:43 -05:00
1 parent
fe63b8897f
commit
463b006e43
1 file changed
+20
@@ -5035,6 +5035,26 @@ public enum Material implements Keyed {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the material is an air block.
|
||||
*
|
||||
* @return True if this material is an air block.
|
||||
*/
|
||||
public boolean isAir() {
|
||||
switch (this) {
|
||||
//<editor-fold defaultstate="collapsed" desc="isAir">
|
||||
case AIR:
|
||||
case CAVE_AIR:
|
||||
case VOID_AIR:
|
||||
// ----- Legacy Separator -----
|
||||
case LEGACY_AIR:
|
||||
//</editor-fold>
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the material is a block and does not block any light
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user