MCPcopy Create free account
hub / github.com/Teneted/Tenet / hasGravity

Method hasGravity

src/main/java/org/bukkit/Material.java:6826–6865  ·  view source on GitHub ↗

@return True if this material is affected by gravity.

()

Source from the content-addressed store, hash-verified

6824 * @return True if this material is affected by gravity.
6825 */
6826 public boolean hasGravity() {
6827 if (!isBlock()) {
6828 return false;
6829 }
6830 switch (this) {
6831 //<editor-fold defaultstate="collapsed" desc="hasGravity">
6832 case ANVIL:
6833 case BLACK_CONCRETE_POWDER:
6834 case BLUE_CONCRETE_POWDER:
6835 case BROWN_CONCRETE_POWDER:
6836 case CHIPPED_ANVIL:
6837 case CYAN_CONCRETE_POWDER:
6838 case DAMAGED_ANVIL:
6839 case DRAGON_EGG:
6840 case GRAVEL:
6841 case GRAY_CONCRETE_POWDER:
6842 case GREEN_CONCRETE_POWDER:
6843 case LIGHT_BLUE_CONCRETE_POWDER:
6844 case LIGHT_GRAY_CONCRETE_POWDER:
6845 case LIME_CONCRETE_POWDER:
6846 case MAGENTA_CONCRETE_POWDER:
6847 case ORANGE_CONCRETE_POWDER:
6848 case PINK_CONCRETE_POWDER:
6849 case PURPLE_CONCRETE_POWDER:
6850 case RED_CONCRETE_POWDER:
6851 case RED_SAND:
6852 case SAND:
6853 case WHITE_CONCRETE_POWDER:
6854 case YELLOW_CONCRETE_POWDER:
6855 // ----- Legacy Separator -----
6856 case LEGACY_SAND:
6857 case LEGACY_GRAVEL:
6858 case LEGACY_ANVIL:
6859 case LEGACY_CONCRETE_POWDER:
6860 //</editor-fold>
6861 return true;
6862 default:
6863 return false;
6864 }
6865 }
6866
6867 /**
6868 * Checks if this Material is an obtainable item.

Callers

nothing calls this directly

Calls 1

isBlockMethod · 0.95

Tested by

no test coverage detected