consumer) {
return Bukkit.createBlockData(this, consumer);
}
/**
* Creates a new {@link BlockData} instance for this Material, with all
* properties initialized to unspecified defaults, except for those provided
* in data.
*
* @param data data string
* @return new data instance
* @throws IllegalArgumentException if the specified data is not valid
*/
@NotNull
public BlockData createBlockData(@Nullable String data) throws IllegalArgumentException {
return Bukkit.createBlockData(this, data);
}
/**
* Gets the MaterialData class associated with this Material
*
* @return MaterialData associated with this Material
*/
@NotNull
public Class extends MaterialData> getData() {
Validate.isTrue(legacy, "Cannot get data class of Modern Material");
return ctor.getDeclaringClass();
}
/**
* Constructs a new MaterialData relevant for this Material, with the
* given initial data
*
* @param raw Initial data to construct the MaterialData with
* @return New MaterialData with the given data
* @deprecated Magic value
*/
@Deprecated
@NotNull
public MaterialData getNewData(final byte raw) {
Validate.isTrue(legacy, "Cannot get new data of Modern Material");
try {
return ctor.newInstance(this, raw);
} catch (InstantiationException ex) {
final Throwable t = ex.getCause();
if (t instanceof RuntimeException) {
throw (RuntimeException) t;
}
if (t instanceof Error) {
throw (Error) t;
}
throw new AssertionError(t);
} catch (Throwable t) {
throw new AssertionError(t);
}
}
/**
* Checks if this Material is a placable block
*
* @return true if this material is a block
*/
public boolean isBlock() {
switch (this) {
//
case ACACIA_BUTTON:
case ACACIA_DOOR:
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_LEAVES:
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_PRESSURE_PLATE:
case ACACIA_SAPLING:
case ACACIA_SIGN:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_TRAPDOOR:
case ACACIA_WALL_SIGN:
case ACACIA_WOOD:
case ACTIVATOR_RAIL:
case AIR:
case ALLIUM:
case ANDESITE:
case ANDESITE_SLAB:
case ANDESITE_STAIRS:
case ANDESITE_WALL:
case ANVIL:
case ATTACHED_MELON_STEM:
case ATTACHED_PUMPKIN_STEM:
case AZURE_BLUET:
case BAMBOO:
case BAMBOO_SAPLING:
case BARREL:
case BARRIER:
case BEACON:
case BEDROCK:
case BEETROOTS:
case BELL:
case BIRCH_BUTTON:
case BIRCH_DOOR:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_LEAVES:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_PRESSURE_PLATE:
case BIRCH_SAPLING:
case BIRCH_SIGN:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_TRAPDOOR:
case BIRCH_WALL_SIGN:
case BIRCH_WOOD:
case BLACK_BANNER:
case BLACK_BED:
case BLACK_CARPET:
case BLACK_CONCRETE:
case BLACK_CONCRETE_POWDER:
case BLACK_GLAZED_TERRACOTTA:
case BLACK_SHULKER_BOX:
case BLACK_STAINED_GLASS:
case BLACK_STAINED_GLASS_PANE:
case BLACK_TERRACOTTA:
case BLACK_WALL_BANNER:
case BLACK_WOOL:
case BLAST_FURNACE:
case BLUE_BANNER:
case BLUE_BED:
case BLUE_CARPET:
case BLUE_CONCRETE:
case BLUE_CONCRETE_POWDER:
case BLUE_GLAZED_TERRACOTTA:
case BLUE_ICE:
case BLUE_ORCHID:
case BLUE_SHULKER_BOX:
case BLUE_STAINED_GLASS:
case BLUE_STAINED_GLASS_PANE:
case BLUE_TERRACOTTA:
case BLUE_WALL_BANNER:
case BLUE_WOOL:
case BONE_BLOCK:
case BOOKSHELF:
case BRAIN_CORAL:
case BRAIN_CORAL_BLOCK:
case BRAIN_CORAL_FAN:
case BRAIN_CORAL_WALL_FAN:
case BREWING_STAND:
case BRICKS:
case BRICK_SLAB:
case BRICK_STAIRS:
case BRICK_WALL:
case BROWN_BANNER:
case BROWN_BED:
case BROWN_CARPET:
case BROWN_CONCRETE:
case BROWN_CONCRETE_POWDER:
case BROWN_GLAZED_TERRACOTTA:
case BROWN_MUSHROOM:
case BROWN_MUSHROOM_BLOCK:
case BROWN_SHULKER_BOX:
case BROWN_STAINED_GLASS:
case BROWN_STAINED_GLASS_PANE:
case BROWN_TERRACOTTA:
case BROWN_WALL_BANNER:
case BROWN_WOOL:
case BUBBLE_COLUMN:
case BUBBLE_CORAL:
case BUBBLE_CORAL_BLOCK:
case BUBBLE_CORAL_FAN:
case BUBBLE_CORAL_WALL_FAN:
case CACTUS:
case CAKE:
case CAMPFIRE:
case CARROTS:
case CARTOGRAPHY_TABLE:
case CARVED_PUMPKIN:
case CAULDRON:
case CAVE_AIR:
case CHAIN_COMMAND_BLOCK:
case CHEST:
case CHIPPED_ANVIL:
case CHISELED_QUARTZ_BLOCK:
case CHISELED_RED_SANDSTONE:
case CHISELED_SANDSTONE:
case CHISELED_STONE_BRICKS:
case CHORUS_FLOWER:
case CHORUS_PLANT:
case CLAY:
case COAL_BLOCK:
case COAL_ORE:
case COARSE_DIRT:
case COBBLESTONE:
case COBBLESTONE_SLAB:
case COBBLESTONE_STAIRS:
case COBBLESTONE_WALL:
case COBWEB:
case COCOA:
case COMMAND_BLOCK:
case COMPARATOR:
case COMPOSTER:
case CONDUIT:
case CORNFLOWER:
case CRACKED_STONE_BRICKS:
case CRAFTING_TABLE:
case CREEPER_HEAD:
case CREEPER_WALL_HEAD:
case CUT_RED_SANDSTONE:
case CUT_RED_SANDSTONE_SLAB:
case CUT_SANDSTONE:
case CUT_SANDSTONE_SLAB:
case CYAN_BANNER:
case CYAN_BED:
case CYAN_CARPET:
case CYAN_CONCRETE:
case CYAN_CONCRETE_POWDER:
case CYAN_GLAZED_TERRACOTTA:
case CYAN_SHULKER_BOX:
case CYAN_STAINED_GLASS:
case CYAN_STAINED_GLASS_PANE:
case CYAN_TERRACOTTA:
case CYAN_WALL_BANNER:
case CYAN_WOOL:
case DAMAGED_ANVIL:
case DANDELION:
case DARK_OAK_BUTTON:
case DARK_OAK_DOOR:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_LEAVES:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_PRESSURE_PLATE:
case DARK_OAK_SAPLING:
case DARK_OAK_SIGN:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_TRAPDOOR:
case DARK_OAK_WALL_SIGN:
case DARK_OAK_WOOD:
case DARK_PRISMARINE:
case DARK_PRISMARINE_SLAB:
case DARK_PRISMARINE_STAIRS:
case DAYLIGHT_DETECTOR:
case DEAD_BRAIN_CORAL:
case DEAD_BRAIN_CORAL_BLOCK:
case DEAD_BRAIN_CORAL_FAN:
case DEAD_BRAIN_CORAL_WALL_FAN:
case DEAD_BUBBLE_CORAL:
case DEAD_BUBBLE_CORAL_BLOCK:
case DEAD_BUBBLE_CORAL_FAN:
case DEAD_BUBBLE_CORAL_WALL_FAN:
case DEAD_BUSH:
case DEAD_FIRE_CORAL:
case DEAD_FIRE_CORAL_BLOCK:
case DEAD_FIRE_CORAL_FAN:
case DEAD_FIRE_CORAL_WALL_FAN:
case DEAD_HORN_CORAL:
case DEAD_HORN_CORAL_BLOCK:
case DEAD_HORN_CORAL_FAN:
case DEAD_HORN_CORAL_WALL_FAN:
case DEAD_TUBE_CORAL:
case DEAD_TUBE_CORAL_BLOCK:
case DEAD_TUBE_CORAL_FAN:
case DEAD_TUBE_CORAL_WALL_FAN:
case DETECTOR_RAIL:
case DIAMOND_BLOCK:
case DIAMOND_ORE:
case DIORITE:
case DIORITE_SLAB:
case DIORITE_STAIRS:
case DIORITE_WALL:
case DIRT:
case DISPENSER:
case DRAGON_EGG:
case DRAGON_HEAD:
case DRAGON_WALL_HEAD:
case DRIED_KELP_BLOCK:
case DROPPER:
case EMERALD_BLOCK:
case EMERALD_ORE:
case ENCHANTING_TABLE:
case ENDER_CHEST:
case END_GATEWAY:
case END_PORTAL:
case END_PORTAL_FRAME:
case END_ROD:
case END_STONE:
case END_STONE_BRICKS:
case END_STONE_BRICK_SLAB:
case END_STONE_BRICK_STAIRS:
case END_STONE_BRICK_WALL:
case FARMLAND:
case FERN:
case FIRE:
case FIRE_CORAL:
case FIRE_CORAL_BLOCK:
case FIRE_CORAL_FAN:
case FIRE_CORAL_WALL_FAN:
case FLETCHING_TABLE:
case FLOWER_POT:
case FROSTED_ICE:
case FURNACE:
case GLASS:
case GLASS_PANE:
case GLOWSTONE:
case GOLD_BLOCK:
case GOLD_ORE:
case GRANITE:
case GRANITE_SLAB:
case GRANITE_STAIRS:
case GRANITE_WALL:
case GRASS:
case GRASS_BLOCK:
case GRASS_PATH:
case GRAVEL:
case GRAY_BANNER:
case GRAY_BED:
case GRAY_CARPET:
case GRAY_CONCRETE:
case GRAY_CONCRETE_POWDER:
case GRAY_GLAZED_TERRACOTTA:
case GRAY_SHULKER_BOX:
case GRAY_STAINED_GLASS:
case GRAY_STAINED_GLASS_PANE:
case GRAY_TERRACOTTA:
case GRAY_WALL_BANNER:
case GRAY_WOOL:
case GREEN_BANNER:
case GREEN_BED:
case GREEN_CARPET:
case GREEN_CONCRETE:
case GREEN_CONCRETE_POWDER:
case GREEN_GLAZED_TERRACOTTA:
case GREEN_SHULKER_BOX:
case GREEN_STAINED_GLASS:
case GREEN_STAINED_GLASS_PANE:
case GREEN_TERRACOTTA:
case GREEN_WALL_BANNER:
case GREEN_WOOL:
case GRINDSTONE:
case HAY_BLOCK:
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case HOPPER:
case HORN_CORAL:
case HORN_CORAL_BLOCK:
case HORN_CORAL_FAN:
case HORN_CORAL_WALL_FAN:
case ICE:
case INFESTED_CHISELED_STONE_BRICKS:
case INFESTED_COBBLESTONE:
case INFESTED_CRACKED_STONE_BRICKS:
case INFESTED_MOSSY_STONE_BRICKS:
case INFESTED_STONE:
case INFESTED_STONE_BRICKS:
case IRON_BARS:
case IRON_BLOCK:
case IRON_DOOR:
case IRON_ORE:
case IRON_TRAPDOOR:
case JACK_O_LANTERN:
case JIGSAW:
case JUKEBOX:
case JUNGLE_BUTTON:
case JUNGLE_DOOR:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_LEAVES:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_PRESSURE_PLATE:
case JUNGLE_SAPLING:
case JUNGLE_SIGN:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_TRAPDOOR:
case JUNGLE_WALL_SIGN:
case JUNGLE_WOOD:
case KELP:
case KELP_PLANT:
case LADDER:
case LANTERN:
case LAPIS_BLOCK:
case LAPIS_ORE:
case LARGE_FERN:
case LAVA:
case LECTERN:
case LEVER:
case LIGHT_BLUE_BANNER:
case LIGHT_BLUE_BED:
case LIGHT_BLUE_CARPET:
case LIGHT_BLUE_CONCRETE:
case LIGHT_BLUE_CONCRETE_POWDER:
case LIGHT_BLUE_GLAZED_TERRACOTTA:
case LIGHT_BLUE_SHULKER_BOX:
case LIGHT_BLUE_STAINED_GLASS:
case LIGHT_BLUE_STAINED_GLASS_PANE:
case LIGHT_BLUE_TERRACOTTA:
case LIGHT_BLUE_WALL_BANNER:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_BANNER:
case LIGHT_GRAY_BED:
case LIGHT_GRAY_CARPET:
case LIGHT_GRAY_CONCRETE:
case LIGHT_GRAY_CONCRETE_POWDER:
case LIGHT_GRAY_GLAZED_TERRACOTTA:
case LIGHT_GRAY_SHULKER_BOX:
case LIGHT_GRAY_STAINED_GLASS:
case LIGHT_GRAY_STAINED_GLASS_PANE:
case LIGHT_GRAY_TERRACOTTA:
case LIGHT_GRAY_WALL_BANNER:
case LIGHT_GRAY_WOOL:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
case LILAC:
case LILY_OF_THE_VALLEY:
case LILY_PAD:
case LIME_BANNER:
case LIME_BED:
case LIME_CARPET:
case LIME_CONCRETE:
case LIME_CONCRETE_POWDER:
case LIME_GLAZED_TERRACOTTA:
case LIME_SHULKER_BOX:
case LIME_STAINED_GLASS:
case LIME_STAINED_GLASS_PANE:
case LIME_TERRACOTTA:
case LIME_WALL_BANNER:
case LIME_WOOL:
case LOOM:
case MAGENTA_BANNER:
case MAGENTA_BED:
case MAGENTA_CARPET:
case MAGENTA_CONCRETE:
case MAGENTA_CONCRETE_POWDER:
case MAGENTA_GLAZED_TERRACOTTA:
case MAGENTA_SHULKER_BOX:
case MAGENTA_STAINED_GLASS:
case MAGENTA_STAINED_GLASS_PANE:
case MAGENTA_TERRACOTTA:
case MAGENTA_WALL_BANNER:
case MAGENTA_WOOL:
case MAGMA_BLOCK:
case MELON:
case MELON_STEM:
case MOSSY_COBBLESTONE:
case MOSSY_COBBLESTONE_SLAB:
case MOSSY_COBBLESTONE_STAIRS:
case MOSSY_COBBLESTONE_WALL:
case MOSSY_STONE_BRICKS:
case MOSSY_STONE_BRICK_SLAB:
case MOSSY_STONE_BRICK_STAIRS:
case MOSSY_STONE_BRICK_WALL:
case MOVING_PISTON:
case MUSHROOM_STEM:
case MYCELIUM:
case NETHERRACK:
case NETHER_BRICKS:
case NETHER_BRICK_FENCE:
case NETHER_BRICK_SLAB:
case NETHER_BRICK_STAIRS:
case NETHER_BRICK_WALL:
case NETHER_PORTAL:
case NETHER_QUARTZ_ORE:
case NETHER_WART:
case NETHER_WART_BLOCK:
case NOTE_BLOCK:
case OAK_BUTTON:
case OAK_DOOR:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_LEAVES:
case OAK_LOG:
case OAK_PLANKS:
case OAK_PRESSURE_PLATE:
case OAK_SAPLING:
case OAK_SIGN:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_TRAPDOOR:
case OAK_WALL_SIGN:
case OAK_WOOD:
case OBSERVER:
case OBSIDIAN:
case ORANGE_BANNER:
case ORANGE_BED:
case ORANGE_CARPET:
case ORANGE_CONCRETE:
case ORANGE_CONCRETE_POWDER:
case ORANGE_GLAZED_TERRACOTTA:
case ORANGE_SHULKER_BOX:
case ORANGE_STAINED_GLASS:
case ORANGE_STAINED_GLASS_PANE:
case ORANGE_TERRACOTTA:
case ORANGE_TULIP:
case ORANGE_WALL_BANNER:
case ORANGE_WOOL:
case OXEYE_DAISY:
case PACKED_ICE:
case PEONY:
case PETRIFIED_OAK_SLAB:
case PINK_BANNER:
case PINK_BED:
case PINK_CARPET:
case PINK_CONCRETE:
case PINK_CONCRETE_POWDER:
case PINK_GLAZED_TERRACOTTA:
case PINK_SHULKER_BOX:
case PINK_STAINED_GLASS:
case PINK_STAINED_GLASS_PANE:
case PINK_TERRACOTTA:
case PINK_TULIP:
case PINK_WALL_BANNER:
case PINK_WOOL:
case PISTON:
case PISTON_HEAD:
case PLAYER_HEAD:
case PLAYER_WALL_HEAD:
case PODZOL:
case POLISHED_ANDESITE:
case POLISHED_ANDESITE_SLAB:
case POLISHED_ANDESITE_STAIRS:
case POLISHED_DIORITE:
case POLISHED_DIORITE_SLAB:
case POLISHED_DIORITE_STAIRS:
case POLISHED_GRANITE:
case POLISHED_GRANITE_SLAB:
case POLISHED_GRANITE_STAIRS:
case POPPY:
case POTATOES:
case POTTED_ACACIA_SAPLING:
case POTTED_ALLIUM:
case POTTED_AZURE_BLUET:
case POTTED_BAMBOO:
case POTTED_BIRCH_SAPLING:
case POTTED_BLUE_ORCHID:
case POTTED_BROWN_MUSHROOM:
case POTTED_CACTUS:
case POTTED_CORNFLOWER:
case POTTED_DANDELION:
case POTTED_DARK_OAK_SAPLING:
case POTTED_DEAD_BUSH:
case POTTED_FERN:
case POTTED_JUNGLE_SAPLING:
case POTTED_LILY_OF_THE_VALLEY:
case POTTED_OAK_SAPLING:
case POTTED_ORANGE_TULIP:
case POTTED_OXEYE_DAISY:
case POTTED_PINK_TULIP:
case POTTED_POPPY:
case POTTED_RED_MUSHROOM:
case POTTED_RED_TULIP:
case POTTED_SPRUCE_SAPLING:
case POTTED_WHITE_TULIP:
case POTTED_WITHER_ROSE:
case POWERED_RAIL:
case PRISMARINE:
case PRISMARINE_BRICKS:
case PRISMARINE_BRICK_SLAB:
case PRISMARINE_BRICK_STAIRS:
case PRISMARINE_SLAB:
case PRISMARINE_STAIRS:
case PRISMARINE_WALL:
case PUMPKIN:
case PUMPKIN_STEM:
case PURPLE_BANNER:
case PURPLE_BED:
case PURPLE_CARPET:
case PURPLE_CONCRETE:
case PURPLE_CONCRETE_POWDER:
case PURPLE_GLAZED_TERRACOTTA:
case PURPLE_SHULKER_BOX:
case PURPLE_STAINED_GLASS:
case PURPLE_STAINED_GLASS_PANE:
case PURPLE_TERRACOTTA:
case PURPLE_WALL_BANNER:
case PURPLE_WOOL:
case PURPUR_BLOCK:
case PURPUR_PILLAR:
case PURPUR_SLAB:
case PURPUR_STAIRS:
case QUARTZ_BLOCK:
case QUARTZ_PILLAR:
case QUARTZ_SLAB:
case QUARTZ_STAIRS:
case RAIL:
case REDSTONE_BLOCK:
case REDSTONE_LAMP:
case REDSTONE_ORE:
case REDSTONE_TORCH:
case REDSTONE_WALL_TORCH:
case REDSTONE_WIRE:
case RED_BANNER:
case RED_BED:
case RED_CARPET:
case RED_CONCRETE:
case RED_CONCRETE_POWDER:
case RED_GLAZED_TERRACOTTA:
case RED_MUSHROOM:
case RED_MUSHROOM_BLOCK:
case RED_NETHER_BRICKS:
case RED_NETHER_BRICK_SLAB:
case RED_NETHER_BRICK_STAIRS:
case RED_NETHER_BRICK_WALL:
case RED_SAND:
case RED_SANDSTONE:
case RED_SANDSTONE_SLAB:
case RED_SANDSTONE_STAIRS:
case RED_SANDSTONE_WALL:
case RED_SHULKER_BOX:
case RED_STAINED_GLASS:
case RED_STAINED_GLASS_PANE:
case RED_TERRACOTTA:
case RED_TULIP:
case RED_WALL_BANNER:
case RED_WOOL:
case REPEATER:
case REPEATING_COMMAND_BLOCK:
case ROSE_BUSH:
case SAND:
case SANDSTONE:
case SANDSTONE_SLAB:
case SANDSTONE_STAIRS:
case SANDSTONE_WALL:
case SCAFFOLDING:
case SEAGRASS:
case SEA_LANTERN:
case SEA_PICKLE:
case SHULKER_BOX:
case SKELETON_SKULL:
case SKELETON_WALL_SKULL:
case SLIME_BLOCK:
case SMITHING_TABLE:
case SMOKER:
case SMOOTH_QUARTZ:
case SMOOTH_QUARTZ_SLAB:
case SMOOTH_QUARTZ_STAIRS:
case SMOOTH_RED_SANDSTONE:
case SMOOTH_RED_SANDSTONE_SLAB:
case SMOOTH_RED_SANDSTONE_STAIRS:
case SMOOTH_SANDSTONE:
case SMOOTH_SANDSTONE_SLAB:
case SMOOTH_SANDSTONE_STAIRS:
case SMOOTH_STONE:
case SMOOTH_STONE_SLAB:
case SNOW:
case SNOW_BLOCK:
case SOUL_SAND:
case SPAWNER:
case SPONGE:
case SPRUCE_BUTTON:
case SPRUCE_DOOR:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_LEAVES:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_PRESSURE_PLATE:
case SPRUCE_SAPLING:
case SPRUCE_SIGN:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_TRAPDOOR:
case SPRUCE_WALL_SIGN:
case SPRUCE_WOOD:
case STICKY_PISTON:
case STONE:
case STONECUTTER:
case STONE_BRICKS:
case STONE_BRICK_SLAB:
case STONE_BRICK_STAIRS:
case STONE_BRICK_WALL:
case STONE_BUTTON:
case STONE_PRESSURE_PLATE:
case STONE_SLAB:
case STONE_STAIRS:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case STRUCTURE_BLOCK:
case STRUCTURE_VOID:
case SUGAR_CANE:
case SUNFLOWER:
case SWEET_BERRY_BUSH:
case TALL_GRASS:
case TALL_SEAGRASS:
case TERRACOTTA:
case TNT:
case TORCH:
case TRAPPED_CHEST:
case TRIPWIRE:
case TRIPWIRE_HOOK:
case TUBE_CORAL:
case TUBE_CORAL_BLOCK:
case TUBE_CORAL_FAN:
case TUBE_CORAL_WALL_FAN:
case TURTLE_EGG:
case VINE:
case VOID_AIR:
case WALL_TORCH:
case WATER:
case WET_SPONGE:
case WHEAT:
case WHITE_BANNER:
case WHITE_BED:
case WHITE_CARPET:
case WHITE_CONCRETE:
case WHITE_CONCRETE_POWDER:
case WHITE_GLAZED_TERRACOTTA:
case WHITE_SHULKER_BOX:
case WHITE_STAINED_GLASS:
case WHITE_STAINED_GLASS_PANE:
case WHITE_TERRACOTTA:
case WHITE_TULIP:
case WHITE_WALL_BANNER:
case WHITE_WOOL:
case WITHER_ROSE:
case WITHER_SKELETON_SKULL:
case WITHER_SKELETON_WALL_SKULL:
case YELLOW_BANNER:
case YELLOW_BED:
case YELLOW_CARPET:
case YELLOW_CONCRETE:
case YELLOW_CONCRETE_POWDER:
case YELLOW_GLAZED_TERRACOTTA:
case YELLOW_SHULKER_BOX:
case YELLOW_STAINED_GLASS:
case YELLOW_STAINED_GLASS_PANE:
case YELLOW_TERRACOTTA:
case YELLOW_WALL_BANNER:
case YELLOW_WOOL:
case ZOMBIE_HEAD:
case ZOMBIE_WALL_HEAD:
//
return true;
default:
return 0 <= id && id < 256;
}
}
/**
* Checks if this Material is edible.
*
* @return true if this Material is edible.
*/
public boolean isEdible() {
switch (this) {
//
case APPLE:
case BAKED_POTATO:
case BEEF:
case BEETROOT:
case BEETROOT_SOUP:
case BREAD:
case CARROT:
case CHICKEN:
case CHORUS_FRUIT:
case COD:
case COOKED_BEEF:
case COOKED_CHICKEN:
case COOKED_COD:
case COOKED_MUTTON:
case COOKED_PORKCHOP:
case COOKED_RABBIT:
case COOKED_SALMON:
case COOKIE:
case DRIED_KELP:
case ENCHANTED_GOLDEN_APPLE:
case GOLDEN_APPLE:
case GOLDEN_CARROT:
case MELON_SLICE:
case MUSHROOM_STEW:
case MUTTON:
case POISONOUS_POTATO:
case PORKCHOP:
case POTATO:
case PUFFERFISH:
case PUMPKIN_PIE:
case RABBIT:
case RABBIT_STEW:
case ROTTEN_FLESH:
case SALMON:
case SPIDER_EYE:
case SUSPICIOUS_STEW:
case SWEET_BERRIES:
case TROPICAL_FISH:
// ----- Legacy Separator -----
case LEGACY_BREAD:
case LEGACY_CARROT_ITEM:
case LEGACY_BAKED_POTATO:
case LEGACY_POTATO_ITEM:
case LEGACY_POISONOUS_POTATO:
case LEGACY_GOLDEN_CARROT:
case LEGACY_PUMPKIN_PIE:
case LEGACY_COOKIE:
case LEGACY_MELON:
case LEGACY_MUSHROOM_SOUP:
case LEGACY_RAW_CHICKEN:
case LEGACY_COOKED_CHICKEN:
case LEGACY_RAW_BEEF:
case LEGACY_COOKED_BEEF:
case LEGACY_RAW_FISH:
case LEGACY_COOKED_FISH:
case LEGACY_PORK:
case LEGACY_GRILLED_PORK:
case LEGACY_APPLE:
case LEGACY_GOLDEN_APPLE:
case LEGACY_ROTTEN_FLESH:
case LEGACY_SPIDER_EYE:
case LEGACY_RABBIT:
case LEGACY_COOKED_RABBIT:
case LEGACY_RABBIT_STEW:
case LEGACY_MUTTON:
case LEGACY_COOKED_MUTTON:
case LEGACY_BEETROOT:
case LEGACY_CHORUS_FRUIT:
case LEGACY_BEETROOT_SOUP:
//
return true;
default:
return false;
}
}
/**
* Attempts to get the Material with the given name.
*
* This is a normal lookup, names must be the precise name they are given
* in the enum.
*
* @param name Name of the material to get
* @return Material if found, or null
*/
@Nullable
public static Material getMaterial(@NotNull final String name) {
return getMaterial(name, false);
}
/**
* Attempts to get the Material with the given name.
*
* This is a normal lookup, names must be the precise name they are given
* in the enum.
*
* @param name Name of the material to get
* @param legacyName whether this is a legacy name
* @return Material if found, or null
*/
@Nullable
public static Material getMaterial(@NotNull String name, boolean legacyName) {
if (legacyName) {
if (!name.startsWith(LEGACY_PREFIX)) {
name = LEGACY_PREFIX + name;
}
Material match = BY_NAME.get(name);
return Bukkit.getUnsafe().fromLegacy(match);
}
return BY_NAME.get(name);
}
/**
* Attempts to match the Material with the given name.
*
* This is a match lookup; names will be stripped of the "minecraft:"
* namespace, converted to uppercase, then stripped of special characters in
* an attempt to format it like the enum.
*
* @param name Name of the material to get
* @return Material if found, or null
*/
@Nullable
public static Material matchMaterial(@NotNull final String name) {
return matchMaterial(name, false);
}
/**
* Attempts to match the Material with the given name.
*
* This is a match lookup; names will be stripped of the "minecraft:"
* namespace, converted to uppercase, then stripped of special characters in
* an attempt to format it like the enum.
*
* @param name Name of the material to get
* @param legacyName whether this is a legacy name
* @return Material if found, or null
*/
@Nullable
public static Material matchMaterial(@NotNull final String name, boolean legacyName) {
Validate.notNull(name, "Name cannot be null");
String filtered = name;
if (filtered.startsWith(NamespacedKey.MINECRAFT + ":")) {
filtered = filtered.substring((NamespacedKey.MINECRAFT + ":").length());
}
filtered = filtered.toUpperCase(java.util.Locale.ENGLISH);
filtered = filtered.replaceAll("\\s+", "_").replaceAll("\\W", "");
return getMaterial(filtered, legacyName);
}
static {
for (Material material : values()) {
BY_NAME.put(material.name(), material);
}
}
/**
* @return True if this material represents a playable music disk.
*/
public boolean isRecord() {
switch (this) {
//
case MUSIC_DISC_11:
case MUSIC_DISC_13:
case MUSIC_DISC_BLOCKS:
case MUSIC_DISC_CAT:
case MUSIC_DISC_CHIRP:
case MUSIC_DISC_FAR:
case MUSIC_DISC_MALL:
case MUSIC_DISC_MELLOHI:
case MUSIC_DISC_STAL:
case MUSIC_DISC_STRAD:
case MUSIC_DISC_WAIT:
case MUSIC_DISC_WARD:
//
return true;
default:
return id >= LEGACY_GOLD_RECORD.id && id <= LEGACY_RECORD_12.id;
}
}
/**
* Check if the material is a block and solid (can be built upon)
*
* @return True if this material is a block and solid
*/
public boolean isSolid() {
if (!isBlock() || id == 0) {
return false;
}
switch (this) {
//
case ACACIA_DOOR:
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_LEAVES:
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_PRESSURE_PLATE:
case ACACIA_SIGN:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_TRAPDOOR:
case ACACIA_WALL_SIGN:
case ACACIA_WOOD:
case ANDESITE:
case ANDESITE_SLAB:
case ANDESITE_STAIRS:
case ANDESITE_WALL:
case ANVIL:
case BAMBOO:
case BARREL:
case BARRIER:
case BEACON:
case BEDROCK:
case BELL:
case BIRCH_DOOR:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_LEAVES:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_PRESSURE_PLATE:
case BIRCH_SIGN:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_TRAPDOOR:
case BIRCH_WALL_SIGN:
case BIRCH_WOOD:
case BLACK_BANNER:
case BLACK_BED:
case BLACK_CONCRETE:
case BLACK_CONCRETE_POWDER:
case BLACK_GLAZED_TERRACOTTA:
case BLACK_SHULKER_BOX:
case BLACK_STAINED_GLASS:
case BLACK_STAINED_GLASS_PANE:
case BLACK_TERRACOTTA:
case BLACK_WALL_BANNER:
case BLACK_WOOL:
case BLAST_FURNACE:
case BLUE_BANNER:
case BLUE_BED:
case BLUE_CONCRETE:
case BLUE_CONCRETE_POWDER:
case BLUE_GLAZED_TERRACOTTA:
case BLUE_ICE:
case BLUE_SHULKER_BOX:
case BLUE_STAINED_GLASS:
case BLUE_STAINED_GLASS_PANE:
case BLUE_TERRACOTTA:
case BLUE_WALL_BANNER:
case BLUE_WOOL:
case BONE_BLOCK:
case BOOKSHELF:
case BRAIN_CORAL_BLOCK:
case BREWING_STAND:
case BRICKS:
case BRICK_SLAB:
case BRICK_STAIRS:
case BRICK_WALL:
case BROWN_BANNER:
case BROWN_BED:
case BROWN_CONCRETE:
case BROWN_CONCRETE_POWDER:
case BROWN_GLAZED_TERRACOTTA:
case BROWN_MUSHROOM_BLOCK:
case BROWN_SHULKER_BOX:
case BROWN_STAINED_GLASS:
case BROWN_STAINED_GLASS_PANE:
case BROWN_TERRACOTTA:
case BROWN_WALL_BANNER:
case BROWN_WOOL:
case BUBBLE_CORAL_BLOCK:
case CACTUS:
case CAKE:
case CAMPFIRE:
case CARTOGRAPHY_TABLE:
case CARVED_PUMPKIN:
case CAULDRON:
case CHAIN_COMMAND_BLOCK:
case CHEST:
case CHIPPED_ANVIL:
case CHISELED_QUARTZ_BLOCK:
case CHISELED_RED_SANDSTONE:
case CHISELED_SANDSTONE:
case CHISELED_STONE_BRICKS:
case CLAY:
case COAL_BLOCK:
case COAL_ORE:
case COARSE_DIRT:
case COBBLESTONE:
case COBBLESTONE_SLAB:
case COBBLESTONE_STAIRS:
case COBBLESTONE_WALL:
case COMMAND_BLOCK:
case COMPOSTER:
case CONDUIT:
case CRACKED_STONE_BRICKS:
case CRAFTING_TABLE:
case CUT_RED_SANDSTONE:
case CUT_RED_SANDSTONE_SLAB:
case CUT_SANDSTONE:
case CUT_SANDSTONE_SLAB:
case CYAN_BANNER:
case CYAN_BED:
case CYAN_CONCRETE:
case CYAN_CONCRETE_POWDER:
case CYAN_GLAZED_TERRACOTTA:
case CYAN_SHULKER_BOX:
case CYAN_STAINED_GLASS:
case CYAN_STAINED_GLASS_PANE:
case CYAN_TERRACOTTA:
case CYAN_WALL_BANNER:
case CYAN_WOOL:
case DAMAGED_ANVIL:
case DARK_OAK_DOOR:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_LEAVES:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_PRESSURE_PLATE:
case DARK_OAK_SIGN:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_TRAPDOOR:
case DARK_OAK_WALL_SIGN:
case DARK_OAK_WOOD:
case DARK_PRISMARINE:
case DARK_PRISMARINE_SLAB:
case DARK_PRISMARINE_STAIRS:
case DAYLIGHT_DETECTOR:
case DEAD_BRAIN_CORAL:
case DEAD_BRAIN_CORAL_BLOCK:
case DEAD_BRAIN_CORAL_FAN:
case DEAD_BRAIN_CORAL_WALL_FAN:
case DEAD_BUBBLE_CORAL:
case DEAD_BUBBLE_CORAL_BLOCK:
case DEAD_BUBBLE_CORAL_FAN:
case DEAD_BUBBLE_CORAL_WALL_FAN:
case DEAD_FIRE_CORAL:
case DEAD_FIRE_CORAL_BLOCK:
case DEAD_FIRE_CORAL_FAN:
case DEAD_FIRE_CORAL_WALL_FAN:
case DEAD_HORN_CORAL:
case DEAD_HORN_CORAL_BLOCK:
case DEAD_HORN_CORAL_FAN:
case DEAD_HORN_CORAL_WALL_FAN:
case DEAD_TUBE_CORAL:
case DEAD_TUBE_CORAL_BLOCK:
case DEAD_TUBE_CORAL_FAN:
case DEAD_TUBE_CORAL_WALL_FAN:
case DIAMOND_BLOCK:
case DIAMOND_ORE:
case DIORITE:
case DIORITE_SLAB:
case DIORITE_STAIRS:
case DIORITE_WALL:
case DIRT:
case DISPENSER:
case DRAGON_EGG:
case DRIED_KELP_BLOCK:
case DROPPER:
case EMERALD_BLOCK:
case EMERALD_ORE:
case ENCHANTING_TABLE:
case ENDER_CHEST:
case END_PORTAL_FRAME:
case END_STONE:
case END_STONE_BRICKS:
case END_STONE_BRICK_SLAB:
case END_STONE_BRICK_STAIRS:
case END_STONE_BRICK_WALL:
case FARMLAND:
case FIRE_CORAL_BLOCK:
case FLETCHING_TABLE:
case FROSTED_ICE:
case FURNACE:
case GLASS:
case GLASS_PANE:
case GLOWSTONE:
case GOLD_BLOCK:
case GOLD_ORE:
case GRANITE:
case GRANITE_SLAB:
case GRANITE_STAIRS:
case GRANITE_WALL:
case GRASS_BLOCK:
case GRASS_PATH:
case GRAVEL:
case GRAY_BANNER:
case GRAY_BED:
case GRAY_CONCRETE:
case GRAY_CONCRETE_POWDER:
case GRAY_GLAZED_TERRACOTTA:
case GRAY_SHULKER_BOX:
case GRAY_STAINED_GLASS:
case GRAY_STAINED_GLASS_PANE:
case GRAY_TERRACOTTA:
case GRAY_WALL_BANNER:
case GRAY_WOOL:
case GREEN_BANNER:
case GREEN_BED:
case GREEN_CONCRETE:
case GREEN_CONCRETE_POWDER:
case GREEN_GLAZED_TERRACOTTA:
case GREEN_SHULKER_BOX:
case GREEN_STAINED_GLASS:
case GREEN_STAINED_GLASS_PANE:
case GREEN_TERRACOTTA:
case GREEN_WALL_BANNER:
case GREEN_WOOL:
case GRINDSTONE:
case HAY_BLOCK:
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case HOPPER:
case HORN_CORAL_BLOCK:
case ICE:
case INFESTED_CHISELED_STONE_BRICKS:
case INFESTED_COBBLESTONE:
case INFESTED_CRACKED_STONE_BRICKS:
case INFESTED_MOSSY_STONE_BRICKS:
case INFESTED_STONE:
case INFESTED_STONE_BRICKS:
case IRON_BARS:
case IRON_BLOCK:
case IRON_DOOR:
case IRON_ORE:
case IRON_TRAPDOOR:
case JACK_O_LANTERN:
case JIGSAW:
case JUKEBOX:
case JUNGLE_DOOR:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_LEAVES:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_PRESSURE_PLATE:
case JUNGLE_SIGN:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_TRAPDOOR:
case JUNGLE_WALL_SIGN:
case JUNGLE_WOOD:
case LANTERN:
case LAPIS_BLOCK:
case LAPIS_ORE:
case LECTERN:
case LIGHT_BLUE_BANNER:
case LIGHT_BLUE_BED:
case LIGHT_BLUE_CONCRETE:
case LIGHT_BLUE_CONCRETE_POWDER:
case LIGHT_BLUE_GLAZED_TERRACOTTA:
case LIGHT_BLUE_SHULKER_BOX:
case LIGHT_BLUE_STAINED_GLASS:
case LIGHT_BLUE_STAINED_GLASS_PANE:
case LIGHT_BLUE_TERRACOTTA:
case LIGHT_BLUE_WALL_BANNER:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_BANNER:
case LIGHT_GRAY_BED:
case LIGHT_GRAY_CONCRETE:
case LIGHT_GRAY_CONCRETE_POWDER:
case LIGHT_GRAY_GLAZED_TERRACOTTA:
case LIGHT_GRAY_SHULKER_BOX:
case LIGHT_GRAY_STAINED_GLASS:
case LIGHT_GRAY_STAINED_GLASS_PANE:
case LIGHT_GRAY_TERRACOTTA:
case LIGHT_GRAY_WALL_BANNER:
case LIGHT_GRAY_WOOL:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
case LIME_BANNER:
case LIME_BED:
case LIME_CONCRETE:
case LIME_CONCRETE_POWDER:
case LIME_GLAZED_TERRACOTTA:
case LIME_SHULKER_BOX:
case LIME_STAINED_GLASS:
case LIME_STAINED_GLASS_PANE:
case LIME_TERRACOTTA:
case LIME_WALL_BANNER:
case LIME_WOOL:
case LOOM:
case MAGENTA_BANNER:
case MAGENTA_BED:
case MAGENTA_CONCRETE:
case MAGENTA_CONCRETE_POWDER:
case MAGENTA_GLAZED_TERRACOTTA:
case MAGENTA_SHULKER_BOX:
case MAGENTA_STAINED_GLASS:
case MAGENTA_STAINED_GLASS_PANE:
case MAGENTA_TERRACOTTA:
case MAGENTA_WALL_BANNER:
case MAGENTA_WOOL:
case MAGMA_BLOCK:
case MELON:
case MOSSY_COBBLESTONE:
case MOSSY_COBBLESTONE_SLAB:
case MOSSY_COBBLESTONE_STAIRS:
case MOSSY_COBBLESTONE_WALL:
case MOSSY_STONE_BRICKS:
case MOSSY_STONE_BRICK_SLAB:
case MOSSY_STONE_BRICK_STAIRS:
case MOSSY_STONE_BRICK_WALL:
case MOVING_PISTON:
case MUSHROOM_STEM:
case MYCELIUM:
case NETHERRACK:
case NETHER_BRICKS:
case NETHER_BRICK_FENCE:
case NETHER_BRICK_SLAB:
case NETHER_BRICK_STAIRS:
case NETHER_BRICK_WALL:
case NETHER_QUARTZ_ORE:
case NETHER_WART_BLOCK:
case NOTE_BLOCK:
case OAK_DOOR:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_LEAVES:
case OAK_LOG:
case OAK_PLANKS:
case OAK_PRESSURE_PLATE:
case OAK_SIGN:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_TRAPDOOR:
case OAK_WALL_SIGN:
case OAK_WOOD:
case OBSERVER:
case OBSIDIAN:
case ORANGE_BANNER:
case ORANGE_BED:
case ORANGE_CONCRETE:
case ORANGE_CONCRETE_POWDER:
case ORANGE_GLAZED_TERRACOTTA:
case ORANGE_SHULKER_BOX:
case ORANGE_STAINED_GLASS:
case ORANGE_STAINED_GLASS_PANE:
case ORANGE_TERRACOTTA:
case ORANGE_WALL_BANNER:
case ORANGE_WOOL:
case PACKED_ICE:
case PETRIFIED_OAK_SLAB:
case PINK_BANNER:
case PINK_BED:
case PINK_CONCRETE:
case PINK_CONCRETE_POWDER:
case PINK_GLAZED_TERRACOTTA:
case PINK_SHULKER_BOX:
case PINK_STAINED_GLASS:
case PINK_STAINED_GLASS_PANE:
case PINK_TERRACOTTA:
case PINK_WALL_BANNER:
case PINK_WOOL:
case PISTON:
case PISTON_HEAD:
case PODZOL:
case POLISHED_ANDESITE:
case POLISHED_ANDESITE_SLAB:
case POLISHED_ANDESITE_STAIRS:
case POLISHED_DIORITE:
case POLISHED_DIORITE_SLAB:
case POLISHED_DIORITE_STAIRS:
case POLISHED_GRANITE:
case POLISHED_GRANITE_SLAB:
case POLISHED_GRANITE_STAIRS:
case PRISMARINE:
case PRISMARINE_BRICKS:
case PRISMARINE_BRICK_SLAB:
case PRISMARINE_BRICK_STAIRS:
case PRISMARINE_SLAB:
case PRISMARINE_STAIRS:
case PRISMARINE_WALL:
case PUMPKIN:
case PURPLE_BANNER:
case PURPLE_BED:
case PURPLE_CONCRETE:
case PURPLE_CONCRETE_POWDER:
case PURPLE_GLAZED_TERRACOTTA:
case PURPLE_SHULKER_BOX:
case PURPLE_STAINED_GLASS:
case PURPLE_STAINED_GLASS_PANE:
case PURPLE_TERRACOTTA:
case PURPLE_WALL_BANNER:
case PURPLE_WOOL:
case PURPUR_BLOCK:
case PURPUR_PILLAR:
case PURPUR_SLAB:
case PURPUR_STAIRS:
case QUARTZ_BLOCK:
case QUARTZ_PILLAR:
case QUARTZ_SLAB:
case QUARTZ_STAIRS:
case REDSTONE_BLOCK:
case REDSTONE_LAMP:
case REDSTONE_ORE:
case RED_BANNER:
case RED_BED:
case RED_CONCRETE:
case RED_CONCRETE_POWDER:
case RED_GLAZED_TERRACOTTA:
case RED_MUSHROOM_BLOCK:
case RED_NETHER_BRICKS:
case RED_NETHER_BRICK_SLAB:
case RED_NETHER_BRICK_STAIRS:
case RED_NETHER_BRICK_WALL:
case RED_SAND:
case RED_SANDSTONE:
case RED_SANDSTONE_SLAB:
case RED_SANDSTONE_STAIRS:
case RED_SANDSTONE_WALL:
case RED_SHULKER_BOX:
case RED_STAINED_GLASS:
case RED_STAINED_GLASS_PANE:
case RED_TERRACOTTA:
case RED_WALL_BANNER:
case RED_WOOL:
case REPEATING_COMMAND_BLOCK:
case SAND:
case SANDSTONE:
case SANDSTONE_SLAB:
case SANDSTONE_STAIRS:
case SANDSTONE_WALL:
case SEA_LANTERN:
case SHULKER_BOX:
case SLIME_BLOCK:
case SMITHING_TABLE:
case SMOKER:
case SMOOTH_QUARTZ:
case SMOOTH_QUARTZ_SLAB:
case SMOOTH_QUARTZ_STAIRS:
case SMOOTH_RED_SANDSTONE:
case SMOOTH_RED_SANDSTONE_SLAB:
case SMOOTH_RED_SANDSTONE_STAIRS:
case SMOOTH_SANDSTONE:
case SMOOTH_SANDSTONE_SLAB:
case SMOOTH_SANDSTONE_STAIRS:
case SMOOTH_STONE:
case SMOOTH_STONE_SLAB:
case SNOW_BLOCK:
case SOUL_SAND:
case SPAWNER:
case SPONGE:
case SPRUCE_DOOR:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_LEAVES:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_PRESSURE_PLATE:
case SPRUCE_SIGN:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_TRAPDOOR:
case SPRUCE_WALL_SIGN:
case SPRUCE_WOOD:
case STICKY_PISTON:
case STONE:
case STONECUTTER:
case STONE_BRICKS:
case STONE_BRICK_SLAB:
case STONE_BRICK_STAIRS:
case STONE_BRICK_WALL:
case STONE_PRESSURE_PLATE:
case STONE_SLAB:
case STONE_STAIRS:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case STRUCTURE_BLOCK:
case TERRACOTTA:
case TNT:
case TRAPPED_CHEST:
case TUBE_CORAL_BLOCK:
case TURTLE_EGG:
case WET_SPONGE:
case WHITE_BANNER:
case WHITE_BED:
case WHITE_CONCRETE:
case WHITE_CONCRETE_POWDER:
case WHITE_GLAZED_TERRACOTTA:
case WHITE_SHULKER_BOX:
case WHITE_STAINED_GLASS:
case WHITE_STAINED_GLASS_PANE:
case WHITE_TERRACOTTA:
case WHITE_WALL_BANNER:
case WHITE_WOOL:
case YELLOW_BANNER:
case YELLOW_BED:
case YELLOW_CONCRETE:
case YELLOW_CONCRETE_POWDER:
case YELLOW_GLAZED_TERRACOTTA:
case YELLOW_SHULKER_BOX:
case YELLOW_STAINED_GLASS:
case YELLOW_STAINED_GLASS_PANE:
case YELLOW_TERRACOTTA:
case YELLOW_WALL_BANNER:
case YELLOW_WOOL:
// ----- Legacy Separator -----
case LEGACY_STONE:
case LEGACY_GRASS:
case LEGACY_DIRT:
case LEGACY_COBBLESTONE:
case LEGACY_WOOD:
case LEGACY_BEDROCK:
case LEGACY_SAND:
case LEGACY_GRAVEL:
case LEGACY_GOLD_ORE:
case LEGACY_IRON_ORE:
case LEGACY_COAL_ORE:
case LEGACY_LOG:
case LEGACY_LEAVES:
case LEGACY_SPONGE:
case LEGACY_GLASS:
case LEGACY_LAPIS_ORE:
case LEGACY_LAPIS_BLOCK:
case LEGACY_DISPENSER:
case LEGACY_SANDSTONE:
case LEGACY_NOTE_BLOCK:
case LEGACY_BED_BLOCK:
case LEGACY_PISTON_STICKY_BASE:
case LEGACY_PISTON_BASE:
case LEGACY_PISTON_EXTENSION:
case LEGACY_WOOL:
case LEGACY_PISTON_MOVING_PIECE:
case LEGACY_GOLD_BLOCK:
case LEGACY_IRON_BLOCK:
case LEGACY_DOUBLE_STEP:
case LEGACY_STEP:
case LEGACY_BRICK:
case LEGACY_TNT:
case LEGACY_BOOKSHELF:
case LEGACY_MOSSY_COBBLESTONE:
case LEGACY_OBSIDIAN:
case LEGACY_MOB_SPAWNER:
case LEGACY_WOOD_STAIRS:
case LEGACY_CHEST:
case LEGACY_DIAMOND_ORE:
case LEGACY_DIAMOND_BLOCK:
case LEGACY_WORKBENCH:
case LEGACY_SOIL:
case LEGACY_FURNACE:
case LEGACY_BURNING_FURNACE:
case LEGACY_SIGN_POST:
case LEGACY_WOODEN_DOOR:
case LEGACY_COBBLESTONE_STAIRS:
case LEGACY_WALL_SIGN:
case LEGACY_STONE_PLATE:
case LEGACY_IRON_DOOR_BLOCK:
case LEGACY_WOOD_PLATE:
case LEGACY_REDSTONE_ORE:
case LEGACY_GLOWING_REDSTONE_ORE:
case LEGACY_ICE:
case LEGACY_SNOW_BLOCK:
case LEGACY_CACTUS:
case LEGACY_CLAY:
case LEGACY_JUKEBOX:
case LEGACY_FENCE:
case LEGACY_PUMPKIN:
case LEGACY_NETHERRACK:
case LEGACY_SOUL_SAND:
case LEGACY_GLOWSTONE:
case LEGACY_JACK_O_LANTERN:
case LEGACY_CAKE_BLOCK:
case LEGACY_STAINED_GLASS:
case LEGACY_TRAP_DOOR:
case LEGACY_MONSTER_EGGS:
case LEGACY_SMOOTH_BRICK:
case LEGACY_HUGE_MUSHROOM_1:
case LEGACY_HUGE_MUSHROOM_2:
case LEGACY_IRON_FENCE:
case LEGACY_THIN_GLASS:
case LEGACY_MELON_BLOCK:
case LEGACY_FENCE_GATE:
case LEGACY_BRICK_STAIRS:
case LEGACY_SMOOTH_STAIRS:
case LEGACY_MYCEL:
case LEGACY_NETHER_BRICK:
case LEGACY_NETHER_FENCE:
case LEGACY_NETHER_BRICK_STAIRS:
case LEGACY_ENCHANTMENT_TABLE:
case LEGACY_BREWING_STAND:
case LEGACY_CAULDRON:
case LEGACY_ENDER_PORTAL_FRAME:
case LEGACY_ENDER_STONE:
case LEGACY_DRAGON_EGG:
case LEGACY_REDSTONE_LAMP_OFF:
case LEGACY_REDSTONE_LAMP_ON:
case LEGACY_WOOD_DOUBLE_STEP:
case LEGACY_WOOD_STEP:
case LEGACY_SANDSTONE_STAIRS:
case LEGACY_EMERALD_ORE:
case LEGACY_ENDER_CHEST:
case LEGACY_EMERALD_BLOCK:
case LEGACY_SPRUCE_WOOD_STAIRS:
case LEGACY_BIRCH_WOOD_STAIRS:
case LEGACY_JUNGLE_WOOD_STAIRS:
case LEGACY_COMMAND:
case LEGACY_BEACON:
case LEGACY_COBBLE_WALL:
case LEGACY_ANVIL:
case LEGACY_TRAPPED_CHEST:
case LEGACY_GOLD_PLATE:
case LEGACY_IRON_PLATE:
case LEGACY_DAYLIGHT_DETECTOR:
case LEGACY_REDSTONE_BLOCK:
case LEGACY_QUARTZ_ORE:
case LEGACY_HOPPER:
case LEGACY_QUARTZ_BLOCK:
case LEGACY_QUARTZ_STAIRS:
case LEGACY_DROPPER:
case LEGACY_STAINED_CLAY:
case LEGACY_HAY_BLOCK:
case LEGACY_HARD_CLAY:
case LEGACY_COAL_BLOCK:
case LEGACY_STAINED_GLASS_PANE:
case LEGACY_LEAVES_2:
case LEGACY_LOG_2:
case LEGACY_ACACIA_STAIRS:
case LEGACY_DARK_OAK_STAIRS:
case LEGACY_PACKED_ICE:
case LEGACY_RED_SANDSTONE:
case LEGACY_SLIME_BLOCK:
case LEGACY_BARRIER:
case LEGACY_IRON_TRAPDOOR:
case LEGACY_PRISMARINE:
case LEGACY_SEA_LANTERN:
case LEGACY_DOUBLE_STONE_SLAB2:
case LEGACY_RED_SANDSTONE_STAIRS:
case LEGACY_STONE_SLAB2:
case LEGACY_SPRUCE_FENCE_GATE:
case LEGACY_BIRCH_FENCE_GATE:
case LEGACY_JUNGLE_FENCE_GATE:
case LEGACY_DARK_OAK_FENCE_GATE:
case LEGACY_ACACIA_FENCE_GATE:
case LEGACY_SPRUCE_FENCE:
case LEGACY_BIRCH_FENCE:
case LEGACY_JUNGLE_FENCE:
case LEGACY_DARK_OAK_FENCE:
case LEGACY_ACACIA_FENCE:
case LEGACY_STANDING_BANNER:
case LEGACY_WALL_BANNER:
case LEGACY_DAYLIGHT_DETECTOR_INVERTED:
case LEGACY_SPRUCE_DOOR:
case LEGACY_BIRCH_DOOR:
case LEGACY_JUNGLE_DOOR:
case LEGACY_ACACIA_DOOR:
case LEGACY_DARK_OAK_DOOR:
case LEGACY_PURPUR_BLOCK:
case LEGACY_PURPUR_PILLAR:
case LEGACY_PURPUR_STAIRS:
case LEGACY_PURPUR_DOUBLE_SLAB:
case LEGACY_PURPUR_SLAB:
case LEGACY_END_BRICKS:
case LEGACY_GRASS_PATH:
case LEGACY_STRUCTURE_BLOCK:
case LEGACY_COMMAND_REPEATING:
case LEGACY_COMMAND_CHAIN:
case LEGACY_FROSTED_ICE:
case LEGACY_MAGMA:
case LEGACY_NETHER_WART_BLOCK:
case LEGACY_RED_NETHER_BRICK:
case LEGACY_BONE_BLOCK:
case LEGACY_OBSERVER:
case LEGACY_WHITE_SHULKER_BOX:
case LEGACY_ORANGE_SHULKER_BOX:
case LEGACY_MAGENTA_SHULKER_BOX:
case LEGACY_LIGHT_BLUE_SHULKER_BOX:
case LEGACY_YELLOW_SHULKER_BOX:
case LEGACY_LIME_SHULKER_BOX:
case LEGACY_PINK_SHULKER_BOX:
case LEGACY_GRAY_SHULKER_BOX:
case LEGACY_SILVER_SHULKER_BOX:
case LEGACY_CYAN_SHULKER_BOX:
case LEGACY_PURPLE_SHULKER_BOX:
case LEGACY_BLUE_SHULKER_BOX:
case LEGACY_BROWN_SHULKER_BOX:
case LEGACY_GREEN_SHULKER_BOX:
case LEGACY_RED_SHULKER_BOX:
case LEGACY_BLACK_SHULKER_BOX:
case LEGACY_WHITE_GLAZED_TERRACOTTA:
case LEGACY_ORANGE_GLAZED_TERRACOTTA:
case LEGACY_MAGENTA_GLAZED_TERRACOTTA:
case LEGACY_LIGHT_BLUE_GLAZED_TERRACOTTA:
case LEGACY_YELLOW_GLAZED_TERRACOTTA:
case LEGACY_LIME_GLAZED_TERRACOTTA:
case LEGACY_PINK_GLAZED_TERRACOTTA:
case LEGACY_GRAY_GLAZED_TERRACOTTA:
case LEGACY_SILVER_GLAZED_TERRACOTTA:
case LEGACY_CYAN_GLAZED_TERRACOTTA:
case LEGACY_PURPLE_GLAZED_TERRACOTTA:
case LEGACY_BLUE_GLAZED_TERRACOTTA:
case LEGACY_BROWN_GLAZED_TERRACOTTA:
case LEGACY_GREEN_GLAZED_TERRACOTTA:
case LEGACY_RED_GLAZED_TERRACOTTA:
case LEGACY_BLACK_GLAZED_TERRACOTTA:
case LEGACY_CONCRETE:
case LEGACY_CONCRETE_POWDER:
//
return true;
default:
return false;
}
}
/**
* Check if the material is a block and does not block any light
*
* @return True if this material is a block and does not block any light
* @deprecated currently does not have an implementation which is well
* linked to the underlying server. Contributions welcome.
*/
@Deprecated
public boolean isTransparent() {
if (!isBlock()) {
return false;
}
switch (this) {
//
case ACACIA_BUTTON:
case ACACIA_SAPLING:
case ACTIVATOR_RAIL:
case AIR:
case ALLIUM:
case ATTACHED_MELON_STEM:
case ATTACHED_PUMPKIN_STEM:
case AZURE_BLUET:
case BARRIER:
case BEETROOTS:
case BIRCH_BUTTON:
case BIRCH_SAPLING:
case BLACK_CARPET:
case BLUE_CARPET:
case BLUE_ORCHID:
case BROWN_CARPET:
case BROWN_MUSHROOM:
case CARROTS:
case CAVE_AIR:
case CHORUS_FLOWER:
case CHORUS_PLANT:
case COCOA:
case COMPARATOR:
case CREEPER_HEAD:
case CREEPER_WALL_HEAD:
case CYAN_CARPET:
case DANDELION:
case DARK_OAK_BUTTON:
case DARK_OAK_SAPLING:
case DEAD_BUSH:
case DETECTOR_RAIL:
case DRAGON_HEAD:
case DRAGON_WALL_HEAD:
case END_GATEWAY:
case END_PORTAL:
case END_ROD:
case FERN:
case FIRE:
case FLOWER_POT:
case GRASS:
case GRAY_CARPET:
case GREEN_CARPET:
case JUNGLE_BUTTON:
case JUNGLE_SAPLING:
case LADDER:
case LARGE_FERN:
case LEVER:
case LIGHT_BLUE_CARPET:
case LIGHT_GRAY_CARPET:
case LILAC:
case LILY_PAD:
case LIME_CARPET:
case MAGENTA_CARPET:
case MELON_STEM:
case NETHER_PORTAL:
case NETHER_WART:
case OAK_BUTTON:
case OAK_SAPLING:
case ORANGE_CARPET:
case ORANGE_TULIP:
case OXEYE_DAISY:
case PEONY:
case PINK_CARPET:
case PINK_TULIP:
case PLAYER_HEAD:
case PLAYER_WALL_HEAD:
case POPPY:
case POTATOES:
case POTTED_ACACIA_SAPLING:
case POTTED_ALLIUM:
case POTTED_AZURE_BLUET:
case POTTED_BIRCH_SAPLING:
case POTTED_BLUE_ORCHID:
case POTTED_BROWN_MUSHROOM:
case POTTED_CACTUS:
case POTTED_DANDELION:
case POTTED_DARK_OAK_SAPLING:
case POTTED_DEAD_BUSH:
case POTTED_FERN:
case POTTED_JUNGLE_SAPLING:
case POTTED_OAK_SAPLING:
case POTTED_ORANGE_TULIP:
case POTTED_OXEYE_DAISY:
case POTTED_PINK_TULIP:
case POTTED_POPPY:
case POTTED_RED_MUSHROOM:
case POTTED_RED_TULIP:
case POTTED_SPRUCE_SAPLING:
case POTTED_WHITE_TULIP:
case POWERED_RAIL:
case PUMPKIN_STEM:
case PURPLE_CARPET:
case RAIL:
case REDSTONE_TORCH:
case REDSTONE_WALL_TORCH:
case REDSTONE_WIRE:
case RED_CARPET:
case RED_MUSHROOM:
case RED_TULIP:
case REPEATER:
case ROSE_BUSH:
case SKELETON_SKULL:
case SKELETON_WALL_SKULL:
case SNOW:
case SPRUCE_BUTTON:
case SPRUCE_SAPLING:
case STONE_BUTTON:
case STRUCTURE_VOID:
case SUGAR_CANE:
case SUNFLOWER:
case TALL_GRASS:
case TORCH:
case TRIPWIRE:
case TRIPWIRE_HOOK:
case VINE:
case VOID_AIR:
case WALL_TORCH:
case WHEAT:
case WHITE_CARPET:
case WHITE_TULIP:
case WITHER_SKELETON_SKULL:
case WITHER_SKELETON_WALL_SKULL:
case YELLOW_CARPET:
case ZOMBIE_HEAD:
case ZOMBIE_WALL_HEAD:
// ----- Legacy Separator -----
case LEGACY_AIR:
case LEGACY_SAPLING:
case LEGACY_POWERED_RAIL:
case LEGACY_DETECTOR_RAIL:
case LEGACY_LONG_GRASS:
case LEGACY_DEAD_BUSH:
case LEGACY_YELLOW_FLOWER:
case LEGACY_RED_ROSE:
case LEGACY_BROWN_MUSHROOM:
case LEGACY_RED_MUSHROOM:
case LEGACY_TORCH:
case LEGACY_FIRE:
case LEGACY_REDSTONE_WIRE:
case LEGACY_CROPS:
case LEGACY_LADDER:
case LEGACY_RAILS:
case LEGACY_LEVER:
case LEGACY_REDSTONE_TORCH_OFF:
case LEGACY_REDSTONE_TORCH_ON:
case LEGACY_STONE_BUTTON:
case LEGACY_SNOW:
case LEGACY_SUGAR_CANE_BLOCK:
case LEGACY_PORTAL:
case LEGACY_DIODE_BLOCK_OFF:
case LEGACY_DIODE_BLOCK_ON:
case LEGACY_PUMPKIN_STEM:
case LEGACY_MELON_STEM:
case LEGACY_VINE:
case LEGACY_WATER_LILY:
case LEGACY_NETHER_WARTS:
case LEGACY_ENDER_PORTAL:
case LEGACY_COCOA:
case LEGACY_TRIPWIRE_HOOK:
case LEGACY_TRIPWIRE:
case LEGACY_FLOWER_POT:
case LEGACY_CARROT:
case LEGACY_POTATO:
case LEGACY_WOOD_BUTTON:
case LEGACY_SKULL:
case LEGACY_REDSTONE_COMPARATOR_OFF:
case LEGACY_REDSTONE_COMPARATOR_ON:
case LEGACY_ACTIVATOR_RAIL:
case LEGACY_CARPET:
case LEGACY_DOUBLE_PLANT:
case LEGACY_END_ROD:
case LEGACY_CHORUS_PLANT:
case LEGACY_CHORUS_FLOWER:
case LEGACY_BEETROOT_BLOCK:
case LEGACY_END_GATEWAY:
case LEGACY_STRUCTURE_VOID:
//
return true;
default:
return false;
}
}
/**
* Check if the material is a block and can catch fire
*
* @return True if this material is a block and can catch fire
*/
public boolean isFlammable() {
if (!isBlock()) {
return false;
}
switch (this) {
//
case ACACIA_DOOR:
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_LEAVES:
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_PRESSURE_PLATE:
case ACACIA_SIGN:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_TRAPDOOR:
case ACACIA_WALL_SIGN:
case ACACIA_WOOD:
case BAMBOO:
case BAMBOO_SAPLING:
case BARREL:
case BIRCH_DOOR:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_LEAVES:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_PRESSURE_PLATE:
case BIRCH_SIGN:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_TRAPDOOR:
case BIRCH_WALL_SIGN:
case BIRCH_WOOD:
case BLACK_BANNER:
case BLACK_BED:
case BLACK_CARPET:
case BLACK_WALL_BANNER:
case BLACK_WOOL:
case BLUE_BANNER:
case BLUE_BED:
case BLUE_CARPET:
case BLUE_WALL_BANNER:
case BLUE_WOOL:
case BOOKSHELF:
case BROWN_BANNER:
case BROWN_BED:
case BROWN_CARPET:
case BROWN_MUSHROOM_BLOCK:
case BROWN_WALL_BANNER:
case BROWN_WOOL:
case CAMPFIRE:
case CARTOGRAPHY_TABLE:
case CHEST:
case COMPOSTER:
case CRAFTING_TABLE:
case CYAN_BANNER:
case CYAN_BED:
case CYAN_CARPET:
case CYAN_WALL_BANNER:
case CYAN_WOOL:
case DARK_OAK_DOOR:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_LEAVES:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_PRESSURE_PLATE:
case DARK_OAK_SIGN:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_TRAPDOOR:
case DARK_OAK_WALL_SIGN:
case DARK_OAK_WOOD:
case DAYLIGHT_DETECTOR:
case DEAD_BUSH:
case FERN:
case FLETCHING_TABLE:
case GRASS:
case GRAY_BANNER:
case GRAY_BED:
case GRAY_CARPET:
case GRAY_WALL_BANNER:
case GRAY_WOOL:
case GREEN_BANNER:
case GREEN_BED:
case GREEN_CARPET:
case GREEN_WALL_BANNER:
case GREEN_WOOL:
case JUKEBOX:
case JUNGLE_DOOR:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_LEAVES:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_PRESSURE_PLATE:
case JUNGLE_SIGN:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_TRAPDOOR:
case JUNGLE_WALL_SIGN:
case JUNGLE_WOOD:
case LARGE_FERN:
case LECTERN:
case LIGHT_BLUE_BANNER:
case LIGHT_BLUE_BED:
case LIGHT_BLUE_CARPET:
case LIGHT_BLUE_WALL_BANNER:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_BANNER:
case LIGHT_GRAY_BED:
case LIGHT_GRAY_CARPET:
case LIGHT_GRAY_WALL_BANNER:
case LIGHT_GRAY_WOOL:
case LILAC:
case LIME_BANNER:
case LIME_BED:
case LIME_CARPET:
case LIME_WALL_BANNER:
case LIME_WOOL:
case LOOM:
case MAGENTA_BANNER:
case MAGENTA_BED:
case MAGENTA_CARPET:
case MAGENTA_WALL_BANNER:
case MAGENTA_WOOL:
case MUSHROOM_STEM:
case NOTE_BLOCK:
case OAK_DOOR:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_LEAVES:
case OAK_LOG:
case OAK_PLANKS:
case OAK_PRESSURE_PLATE:
case OAK_SIGN:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_TRAPDOOR:
case OAK_WALL_SIGN:
case OAK_WOOD:
case ORANGE_BANNER:
case ORANGE_BED:
case ORANGE_CARPET:
case ORANGE_WALL_BANNER:
case ORANGE_WOOL:
case PEONY:
case PINK_BANNER:
case PINK_BED:
case PINK_CARPET:
case PINK_WALL_BANNER:
case PINK_WOOL:
case PURPLE_BANNER:
case PURPLE_BED:
case PURPLE_CARPET:
case PURPLE_WALL_BANNER:
case PURPLE_WOOL:
case RED_BANNER:
case RED_BED:
case RED_CARPET:
case RED_MUSHROOM_BLOCK:
case RED_WALL_BANNER:
case RED_WOOL:
case ROSE_BUSH:
case SMITHING_TABLE:
case SPRUCE_DOOR:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_LEAVES:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_PRESSURE_PLATE:
case SPRUCE_SIGN:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_TRAPDOOR:
case SPRUCE_WALL_SIGN:
case SPRUCE_WOOD:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case SUNFLOWER:
case TALL_GRASS:
case TNT:
case TRAPPED_CHEST:
case VINE:
case WHITE_BANNER:
case WHITE_BED:
case WHITE_CARPET:
case WHITE_WALL_BANNER:
case WHITE_WOOL:
case YELLOW_BANNER:
case YELLOW_BED:
case YELLOW_CARPET:
case YELLOW_WALL_BANNER:
case YELLOW_WOOL:
// ----- Legacy Separator -----
case LEGACY_WOOD:
case LEGACY_LOG:
case LEGACY_LEAVES:
case LEGACY_NOTE_BLOCK:
case LEGACY_BED_BLOCK:
case LEGACY_LONG_GRASS:
case LEGACY_DEAD_BUSH:
case LEGACY_WOOL:
case LEGACY_TNT:
case LEGACY_BOOKSHELF:
case LEGACY_WOOD_STAIRS:
case LEGACY_CHEST:
case LEGACY_WORKBENCH:
case LEGACY_SIGN_POST:
case LEGACY_WOODEN_DOOR:
case LEGACY_WALL_SIGN:
case LEGACY_WOOD_PLATE:
case LEGACY_JUKEBOX:
case LEGACY_FENCE:
case LEGACY_TRAP_DOOR:
case LEGACY_HUGE_MUSHROOM_1:
case LEGACY_HUGE_MUSHROOM_2:
case LEGACY_VINE:
case LEGACY_FENCE_GATE:
case LEGACY_WOOD_DOUBLE_STEP:
case LEGACY_WOOD_STEP:
case LEGACY_SPRUCE_WOOD_STAIRS:
case LEGACY_BIRCH_WOOD_STAIRS:
case LEGACY_JUNGLE_WOOD_STAIRS:
case LEGACY_TRAPPED_CHEST:
case LEGACY_DAYLIGHT_DETECTOR:
case LEGACY_CARPET:
case LEGACY_LEAVES_2:
case LEGACY_LOG_2:
case LEGACY_ACACIA_STAIRS:
case LEGACY_DARK_OAK_STAIRS:
case LEGACY_DOUBLE_PLANT:
case LEGACY_SPRUCE_FENCE_GATE:
case LEGACY_BIRCH_FENCE_GATE:
case LEGACY_JUNGLE_FENCE_GATE:
case LEGACY_DARK_OAK_FENCE_GATE:
case LEGACY_ACACIA_FENCE_GATE:
case LEGACY_SPRUCE_FENCE:
case LEGACY_BIRCH_FENCE:
case LEGACY_JUNGLE_FENCE:
case LEGACY_DARK_OAK_FENCE:
case LEGACY_ACACIA_FENCE:
case LEGACY_STANDING_BANNER:
case LEGACY_WALL_BANNER:
case LEGACY_DAYLIGHT_DETECTOR_INVERTED:
case LEGACY_SPRUCE_DOOR:
case LEGACY_BIRCH_DOOR:
case LEGACY_JUNGLE_DOOR:
case LEGACY_ACACIA_DOOR:
case LEGACY_DARK_OAK_DOOR:
//
return true;
default:
return false;
}
}
/**
* Check if the material is a block and can burn away
*
* @return True if this material is a block and can burn away
*/
public boolean isBurnable() {
if (!isBlock()) {
return false;
}
switch (this) {
//
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_LEAVES:
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_WOOD:
case ALLIUM:
case AZURE_BLUET:
case BAMBOO:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_LEAVES:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_WOOD:
case BLACK_CARPET:
case BLACK_WOOL:
case BLUE_CARPET:
case BLUE_ORCHID:
case BLUE_WOOL:
case BOOKSHELF:
case BROWN_CARPET:
case BROWN_WOOL:
case COAL_BLOCK:
case COMPOSTER:
case CORNFLOWER:
case CYAN_CARPET:
case CYAN_WOOL:
case DANDELION:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_LEAVES:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_WOOD:
case DEAD_BUSH:
case DRIED_KELP_BLOCK:
case FERN:
case GRASS:
case GRAY_CARPET:
case GRAY_WOOL:
case GREEN_CARPET:
case GREEN_WOOL:
case HAY_BLOCK:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_LEAVES:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_WOOD:
case LARGE_FERN:
case LECTERN:
case LIGHT_BLUE_CARPET:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_CARPET:
case LIGHT_GRAY_WOOL:
case LILAC:
case LILY_OF_THE_VALLEY:
case LIME_CARPET:
case LIME_WOOL:
case MAGENTA_CARPET:
case MAGENTA_WOOL:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_LEAVES:
case OAK_LOG:
case OAK_PLANKS:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_WOOD:
case ORANGE_CARPET:
case ORANGE_TULIP:
case ORANGE_WOOL:
case OXEYE_DAISY:
case PEONY:
case PINK_CARPET:
case PINK_TULIP:
case PINK_WOOL:
case POPPY:
case PURPLE_CARPET:
case PURPLE_WOOL:
case RED_CARPET:
case RED_TULIP:
case RED_WOOL:
case ROSE_BUSH:
case SCAFFOLDING:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_LEAVES:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_WOOD:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case SUNFLOWER:
case SWEET_BERRY_BUSH:
case TALL_GRASS:
case TNT:
case VINE:
case WHITE_CARPET:
case WHITE_TULIP:
case WHITE_WOOL:
case WITHER_ROSE:
case YELLOW_CARPET:
case YELLOW_WOOL:
// ----- Legacy Separator -----
case LEGACY_WOOD:
case LEGACY_LOG:
case LEGACY_LEAVES:
case LEGACY_LONG_GRASS:
case LEGACY_WOOL:
case LEGACY_YELLOW_FLOWER:
case LEGACY_RED_ROSE:
case LEGACY_TNT:
case LEGACY_BOOKSHELF:
case LEGACY_WOOD_STAIRS:
case LEGACY_FENCE:
case LEGACY_VINE:
case LEGACY_WOOD_DOUBLE_STEP:
case LEGACY_WOOD_STEP:
case LEGACY_SPRUCE_WOOD_STAIRS:
case LEGACY_BIRCH_WOOD_STAIRS:
case LEGACY_JUNGLE_WOOD_STAIRS:
case LEGACY_HAY_BLOCK:
case LEGACY_COAL_BLOCK:
case LEGACY_LEAVES_2:
case LEGACY_LOG_2:
case LEGACY_CARPET:
case LEGACY_DOUBLE_PLANT:
case LEGACY_DEAD_BUSH:
case LEGACY_FENCE_GATE:
case LEGACY_SPRUCE_FENCE_GATE:
case LEGACY_BIRCH_FENCE_GATE:
case LEGACY_JUNGLE_FENCE_GATE:
case LEGACY_DARK_OAK_FENCE_GATE:
case LEGACY_ACACIA_FENCE_GATE:
case LEGACY_SPRUCE_FENCE:
case LEGACY_BIRCH_FENCE:
case LEGACY_JUNGLE_FENCE:
case LEGACY_DARK_OAK_FENCE:
case LEGACY_ACACIA_FENCE:
case LEGACY_ACACIA_STAIRS:
case LEGACY_DARK_OAK_STAIRS:
//
return true;
default:
return false;
}
}
/**
* Checks if this Material can be used as fuel in a Furnace
*
* @return true if this Material can be used as fuel.
*/
public boolean isFuel() {
switch (this) {
//
case ACACIA_BOAT:
case ACACIA_BUTTON:
case ACACIA_DOOR:
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_PRESSURE_PLATE:
case ACACIA_SAPLING:
case ACACIA_SIGN:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_TRAPDOOR:
case ACACIA_WOOD:
case BAMBOO:
case BARREL:
case BIRCH_BOAT:
case BIRCH_BUTTON:
case BIRCH_DOOR:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_PRESSURE_PLATE:
case BIRCH_SAPLING:
case BIRCH_SIGN:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_TRAPDOOR:
case BIRCH_WOOD:
case BLACK_BANNER:
case BLACK_CARPET:
case BLACK_WOOL:
case BLAZE_ROD:
case BLUE_BANNER:
case BLUE_CARPET:
case BLUE_WOOL:
case BOOKSHELF:
case BOW:
case BOWL:
case BROWN_BANNER:
case BROWN_CARPET:
case BROWN_WOOL:
case CARTOGRAPHY_TABLE:
case CHARCOAL:
case CHEST:
case COAL:
case COAL_BLOCK:
case COMPOSTER:
case CRAFTING_TABLE:
case CROSSBOW:
case CYAN_BANNER:
case CYAN_CARPET:
case CYAN_WOOL:
case DARK_OAK_BOAT:
case DARK_OAK_BUTTON:
case DARK_OAK_DOOR:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_PRESSURE_PLATE:
case DARK_OAK_SAPLING:
case DARK_OAK_SIGN:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_TRAPDOOR:
case DARK_OAK_WOOD:
case DAYLIGHT_DETECTOR:
case DEAD_BUSH:
case DRIED_KELP_BLOCK:
case FISHING_ROD:
case FLETCHING_TABLE:
case GRAY_BANNER:
case GRAY_CARPET:
case GRAY_WOOL:
case GREEN_BANNER:
case GREEN_CARPET:
case GREEN_WOOL:
case JUKEBOX:
case JUNGLE_BOAT:
case JUNGLE_BUTTON:
case JUNGLE_DOOR:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_PRESSURE_PLATE:
case JUNGLE_SAPLING:
case JUNGLE_SIGN:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_TRAPDOOR:
case JUNGLE_WOOD:
case LADDER:
case LAVA_BUCKET:
case LECTERN:
case LIGHT_BLUE_BANNER:
case LIGHT_BLUE_CARPET:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_BANNER:
case LIGHT_GRAY_CARPET:
case LIGHT_GRAY_WOOL:
case LIME_BANNER:
case LIME_CARPET:
case LIME_WOOL:
case LOOM:
case MAGENTA_BANNER:
case MAGENTA_CARPET:
case MAGENTA_WOOL:
case NOTE_BLOCK:
case OAK_BOAT:
case OAK_BUTTON:
case OAK_DOOR:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_LOG:
case OAK_PLANKS:
case OAK_PRESSURE_PLATE:
case OAK_SAPLING:
case OAK_SIGN:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_TRAPDOOR:
case OAK_WOOD:
case ORANGE_BANNER:
case ORANGE_CARPET:
case ORANGE_WOOL:
case PINK_BANNER:
case PINK_CARPET:
case PINK_WOOL:
case PURPLE_BANNER:
case PURPLE_CARPET:
case PURPLE_WOOL:
case RED_BANNER:
case RED_CARPET:
case RED_WOOL:
case SCAFFOLDING:
case SMITHING_TABLE:
case SPRUCE_BOAT:
case SPRUCE_BUTTON:
case SPRUCE_DOOR:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_PRESSURE_PLATE:
case SPRUCE_SAPLING:
case SPRUCE_SIGN:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_TRAPDOOR:
case SPRUCE_WOOD:
case STICK:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case TRAPPED_CHEST:
case WHITE_BANNER:
case WHITE_CARPET:
case WHITE_WOOL:
case WOODEN_AXE:
case WOODEN_HOE:
case WOODEN_PICKAXE:
case WOODEN_SHOVEL:
case WOODEN_SWORD:
case YELLOW_BANNER:
case YELLOW_CARPET:
case YELLOW_WOOL:
// ----- Legacy Separator -----
case LEGACY_LAVA_BUCKET:
case LEGACY_COAL_BLOCK:
case LEGACY_BLAZE_ROD:
case LEGACY_COAL:
case LEGACY_BOAT:
case LEGACY_BOAT_ACACIA:
case LEGACY_BOAT_BIRCH:
case LEGACY_BOAT_DARK_OAK:
case LEGACY_BOAT_JUNGLE:
case LEGACY_BOAT_SPRUCE:
case LEGACY_LOG:
case LEGACY_LOG_2:
case LEGACY_WOOD:
case LEGACY_WOOD_PLATE:
case LEGACY_FENCE:
case LEGACY_ACACIA_FENCE:
case LEGACY_BIRCH_FENCE:
case LEGACY_DARK_OAK_FENCE:
case LEGACY_JUNGLE_FENCE:
case LEGACY_SPRUCE_FENCE:
case LEGACY_FENCE_GATE:
case LEGACY_ACACIA_FENCE_GATE:
case LEGACY_BIRCH_FENCE_GATE:
case LEGACY_DARK_OAK_FENCE_GATE:
case LEGACY_JUNGLE_FENCE_GATE:
case LEGACY_SPRUCE_FENCE_GATE:
case LEGACY_WOOD_STAIRS:
case LEGACY_ACACIA_STAIRS:
case LEGACY_BIRCH_WOOD_STAIRS:
case LEGACY_DARK_OAK_STAIRS:
case LEGACY_JUNGLE_WOOD_STAIRS:
case LEGACY_SPRUCE_WOOD_STAIRS:
case LEGACY_TRAP_DOOR:
case LEGACY_WORKBENCH:
case LEGACY_BOOKSHELF:
case LEGACY_CHEST:
case LEGACY_TRAPPED_CHEST:
case LEGACY_DAYLIGHT_DETECTOR:
case LEGACY_JUKEBOX:
case LEGACY_NOTE_BLOCK:
case LEGACY_BANNER:
case LEGACY_FISHING_ROD:
case LEGACY_LADDER:
case LEGACY_WOOD_SWORD:
case LEGACY_WOOD_PICKAXE:
case LEGACY_WOOD_AXE:
case LEGACY_WOOD_SPADE:
case LEGACY_WOOD_HOE:
case LEGACY_BOW:
case LEGACY_SIGN:
case LEGACY_WOOD_DOOR:
case LEGACY_ACACIA_DOOR_ITEM:
case LEGACY_BIRCH_DOOR_ITEM:
case LEGACY_DARK_OAK_DOOR_ITEM:
case LEGACY_JUNGLE_DOOR_ITEM:
case LEGACY_SPRUCE_DOOR_ITEM:
case LEGACY_WOOD_STEP:
case LEGACY_SAPLING:
case LEGACY_STICK:
case LEGACY_WOOD_BUTTON:
case LEGACY_WOOL:
case LEGACY_CARPET:
case LEGACY_BOWL:
//
return true;
default:
return false;
}
}
/**
* Check if the material is a block and completely blocks vision
*
* @return True if this material is a block and completely blocks vision
*/
public boolean isOccluding() {
if (!isBlock()) {
return false;
}
switch (this) {
//
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_WOOD:
case ANDESITE:
case BARREL:
case BARRIER:
case BEDROCK:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_WOOD:
case BLACK_CONCRETE:
case BLACK_CONCRETE_POWDER:
case BLACK_GLAZED_TERRACOTTA:
case BLACK_SHULKER_BOX:
case BLACK_TERRACOTTA:
case BLACK_WOOL:
case BLAST_FURNACE:
case BLUE_CONCRETE:
case BLUE_CONCRETE_POWDER:
case BLUE_GLAZED_TERRACOTTA:
case BLUE_ICE:
case BLUE_SHULKER_BOX:
case BLUE_TERRACOTTA:
case BLUE_WOOL:
case BONE_BLOCK:
case BOOKSHELF:
case BRAIN_CORAL_BLOCK:
case BRICKS:
case BROWN_CONCRETE:
case BROWN_CONCRETE_POWDER:
case BROWN_GLAZED_TERRACOTTA:
case BROWN_MUSHROOM_BLOCK:
case BROWN_SHULKER_BOX:
case BROWN_TERRACOTTA:
case BROWN_WOOL:
case BUBBLE_CORAL_BLOCK:
case CARTOGRAPHY_TABLE:
case CARVED_PUMPKIN:
case CHAIN_COMMAND_BLOCK:
case CHISELED_QUARTZ_BLOCK:
case CHISELED_RED_SANDSTONE:
case CHISELED_SANDSTONE:
case CHISELED_STONE_BRICKS:
case CLAY:
case COAL_BLOCK:
case COAL_ORE:
case COARSE_DIRT:
case COBBLESTONE:
case COMMAND_BLOCK:
case CRACKED_STONE_BRICKS:
case CRAFTING_TABLE:
case CUT_RED_SANDSTONE:
case CUT_SANDSTONE:
case CYAN_CONCRETE:
case CYAN_CONCRETE_POWDER:
case CYAN_GLAZED_TERRACOTTA:
case CYAN_SHULKER_BOX:
case CYAN_TERRACOTTA:
case CYAN_WOOL:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_WOOD:
case DARK_PRISMARINE:
case DEAD_BRAIN_CORAL_BLOCK:
case DEAD_BUBBLE_CORAL_BLOCK:
case DEAD_FIRE_CORAL_BLOCK:
case DEAD_HORN_CORAL_BLOCK:
case DEAD_TUBE_CORAL_BLOCK:
case DIAMOND_BLOCK:
case DIAMOND_ORE:
case DIORITE:
case DIRT:
case DISPENSER:
case DRIED_KELP_BLOCK:
case DROPPER:
case EMERALD_BLOCK:
case EMERALD_ORE:
case END_STONE:
case END_STONE_BRICKS:
case FIRE_CORAL_BLOCK:
case FLETCHING_TABLE:
case FURNACE:
case GOLD_BLOCK:
case GOLD_ORE:
case GRANITE:
case GRASS_BLOCK:
case GRAVEL:
case GRAY_CONCRETE:
case GRAY_CONCRETE_POWDER:
case GRAY_GLAZED_TERRACOTTA:
case GRAY_SHULKER_BOX:
case GRAY_TERRACOTTA:
case GRAY_WOOL:
case GREEN_CONCRETE:
case GREEN_CONCRETE_POWDER:
case GREEN_GLAZED_TERRACOTTA:
case GREEN_SHULKER_BOX:
case GREEN_TERRACOTTA:
case GREEN_WOOL:
case HAY_BLOCK:
case HORN_CORAL_BLOCK:
case INFESTED_CHISELED_STONE_BRICKS:
case INFESTED_COBBLESTONE:
case INFESTED_CRACKED_STONE_BRICKS:
case INFESTED_MOSSY_STONE_BRICKS:
case INFESTED_STONE:
case INFESTED_STONE_BRICKS:
case IRON_BLOCK:
case IRON_ORE:
case JACK_O_LANTERN:
case JIGSAW:
case JUKEBOX:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_WOOD:
case LAPIS_BLOCK:
case LAPIS_ORE:
case LIGHT_BLUE_CONCRETE:
case LIGHT_BLUE_CONCRETE_POWDER:
case LIGHT_BLUE_GLAZED_TERRACOTTA:
case LIGHT_BLUE_SHULKER_BOX:
case LIGHT_BLUE_TERRACOTTA:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_CONCRETE:
case LIGHT_GRAY_CONCRETE_POWDER:
case LIGHT_GRAY_GLAZED_TERRACOTTA:
case LIGHT_GRAY_SHULKER_BOX:
case LIGHT_GRAY_TERRACOTTA:
case LIGHT_GRAY_WOOL:
case LIME_CONCRETE:
case LIME_CONCRETE_POWDER:
case LIME_GLAZED_TERRACOTTA:
case LIME_SHULKER_BOX:
case LIME_TERRACOTTA:
case LIME_WOOL:
case LOOM:
case MAGENTA_CONCRETE:
case MAGENTA_CONCRETE_POWDER:
case MAGENTA_GLAZED_TERRACOTTA:
case MAGENTA_SHULKER_BOX:
case MAGENTA_TERRACOTTA:
case MAGENTA_WOOL:
case MAGMA_BLOCK:
case MELON:
case MOSSY_COBBLESTONE:
case MOSSY_STONE_BRICKS:
case MUSHROOM_STEM:
case MYCELIUM:
case NETHERRACK:
case NETHER_BRICKS:
case NETHER_QUARTZ_ORE:
case NETHER_WART_BLOCK:
case NOTE_BLOCK:
case OAK_LOG:
case OAK_PLANKS:
case OAK_WOOD:
case OBSIDIAN:
case ORANGE_CONCRETE:
case ORANGE_CONCRETE_POWDER:
case ORANGE_GLAZED_TERRACOTTA:
case ORANGE_SHULKER_BOX:
case ORANGE_TERRACOTTA:
case ORANGE_WOOL:
case PACKED_ICE:
case PINK_CONCRETE:
case PINK_CONCRETE_POWDER:
case PINK_GLAZED_TERRACOTTA:
case PINK_SHULKER_BOX:
case PINK_TERRACOTTA:
case PINK_WOOL:
case PODZOL:
case POLISHED_ANDESITE:
case POLISHED_DIORITE:
case POLISHED_GRANITE:
case PRISMARINE:
case PRISMARINE_BRICKS:
case PUMPKIN:
case PURPLE_CONCRETE:
case PURPLE_CONCRETE_POWDER:
case PURPLE_GLAZED_TERRACOTTA:
case PURPLE_SHULKER_BOX:
case PURPLE_TERRACOTTA:
case PURPLE_WOOL:
case PURPUR_BLOCK:
case PURPUR_PILLAR:
case QUARTZ_BLOCK:
case QUARTZ_PILLAR:
case REDSTONE_LAMP:
case REDSTONE_ORE:
case RED_CONCRETE:
case RED_CONCRETE_POWDER:
case RED_GLAZED_TERRACOTTA:
case RED_MUSHROOM_BLOCK:
case RED_NETHER_BRICKS:
case RED_SAND:
case RED_SANDSTONE:
case RED_SHULKER_BOX:
case RED_TERRACOTTA:
case RED_WOOL:
case REPEATING_COMMAND_BLOCK:
case SAND:
case SANDSTONE:
case SHULKER_BOX:
case SLIME_BLOCK:
case SMITHING_TABLE:
case SMOKER:
case SMOOTH_QUARTZ:
case SMOOTH_RED_SANDSTONE:
case SMOOTH_SANDSTONE:
case SMOOTH_STONE:
case SNOW_BLOCK:
case SOUL_SAND:
case SPAWNER:
case SPONGE:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_WOOD:
case STONE:
case STONE_BRICKS:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case STRUCTURE_BLOCK:
case TERRACOTTA:
case TUBE_CORAL_BLOCK:
case WET_SPONGE:
case WHITE_CONCRETE:
case WHITE_CONCRETE_POWDER:
case WHITE_GLAZED_TERRACOTTA:
case WHITE_SHULKER_BOX:
case WHITE_TERRACOTTA:
case WHITE_WOOL:
case YELLOW_CONCRETE:
case YELLOW_CONCRETE_POWDER:
case YELLOW_GLAZED_TERRACOTTA:
case YELLOW_SHULKER_BOX:
case YELLOW_TERRACOTTA:
case YELLOW_WOOL:
// ----- Legacy Separator -----
case LEGACY_STONE:
case LEGACY_GRASS:
case LEGACY_DIRT:
case LEGACY_COBBLESTONE:
case LEGACY_WOOD:
case LEGACY_BEDROCK:
case LEGACY_SAND:
case LEGACY_GRAVEL:
case LEGACY_GOLD_ORE:
case LEGACY_IRON_ORE:
case LEGACY_COAL_ORE:
case LEGACY_LOG:
case LEGACY_SPONGE:
case LEGACY_LAPIS_ORE:
case LEGACY_LAPIS_BLOCK:
case LEGACY_DISPENSER:
case LEGACY_SANDSTONE:
case LEGACY_NOTE_BLOCK:
case LEGACY_WOOL:
case LEGACY_GOLD_BLOCK:
case LEGACY_IRON_BLOCK:
case LEGACY_DOUBLE_STEP:
case LEGACY_BRICK:
case LEGACY_BOOKSHELF:
case LEGACY_MOSSY_COBBLESTONE:
case LEGACY_OBSIDIAN:
case LEGACY_MOB_SPAWNER:
case LEGACY_DIAMOND_ORE:
case LEGACY_DIAMOND_BLOCK:
case LEGACY_WORKBENCH:
case LEGACY_FURNACE:
case LEGACY_BURNING_FURNACE:
case LEGACY_REDSTONE_ORE:
case LEGACY_GLOWING_REDSTONE_ORE:
case LEGACY_SNOW_BLOCK:
case LEGACY_CLAY:
case LEGACY_JUKEBOX:
case LEGACY_PUMPKIN:
case LEGACY_NETHERRACK:
case LEGACY_SOUL_SAND:
case LEGACY_JACK_O_LANTERN:
case LEGACY_MONSTER_EGGS:
case LEGACY_SMOOTH_BRICK:
case LEGACY_HUGE_MUSHROOM_1:
case LEGACY_HUGE_MUSHROOM_2:
case LEGACY_MELON_BLOCK:
case LEGACY_MYCEL:
case LEGACY_NETHER_BRICK:
case LEGACY_ENDER_STONE:
case LEGACY_REDSTONE_LAMP_OFF:
case LEGACY_REDSTONE_LAMP_ON:
case LEGACY_WOOD_DOUBLE_STEP:
case LEGACY_EMERALD_ORE:
case LEGACY_EMERALD_BLOCK:
case LEGACY_COMMAND:
case LEGACY_QUARTZ_ORE:
case LEGACY_QUARTZ_BLOCK:
case LEGACY_DROPPER:
case LEGACY_STAINED_CLAY:
case LEGACY_HAY_BLOCK:
case LEGACY_HARD_CLAY:
case LEGACY_COAL_BLOCK:
case LEGACY_LOG_2:
case LEGACY_PACKED_ICE:
case LEGACY_SLIME_BLOCK:
case LEGACY_BARRIER:
case LEGACY_PRISMARINE:
case LEGACY_RED_SANDSTONE:
case LEGACY_DOUBLE_STONE_SLAB2:
case LEGACY_PURPUR_BLOCK:
case LEGACY_PURPUR_PILLAR:
case LEGACY_PURPUR_DOUBLE_SLAB:
case LEGACY_END_BRICKS:
case LEGACY_STRUCTURE_BLOCK:
case LEGACY_COMMAND_REPEATING:
case LEGACY_COMMAND_CHAIN:
case LEGACY_MAGMA:
case LEGACY_NETHER_WART_BLOCK:
case LEGACY_RED_NETHER_BRICK:
case LEGACY_BONE_BLOCK:
case LEGACY_WHITE_GLAZED_TERRACOTTA:
case LEGACY_ORANGE_GLAZED_TERRACOTTA:
case LEGACY_MAGENTA_GLAZED_TERRACOTTA:
case LEGACY_LIGHT_BLUE_GLAZED_TERRACOTTA:
case LEGACY_YELLOW_GLAZED_TERRACOTTA:
case LEGACY_LIME_GLAZED_TERRACOTTA:
case LEGACY_PINK_GLAZED_TERRACOTTA:
case LEGACY_GRAY_GLAZED_TERRACOTTA:
case LEGACY_SILVER_GLAZED_TERRACOTTA:
case LEGACY_CYAN_GLAZED_TERRACOTTA:
case LEGACY_PURPLE_GLAZED_TERRACOTTA:
case LEGACY_BLUE_GLAZED_TERRACOTTA:
case LEGACY_BROWN_GLAZED_TERRACOTTA:
case LEGACY_GREEN_GLAZED_TERRACOTTA:
case LEGACY_RED_GLAZED_TERRACOTTA:
case LEGACY_BLACK_GLAZED_TERRACOTTA:
case LEGACY_CONCRETE:
case LEGACY_CONCRETE_POWDER:
//
return true;
default:
return false;
}
}
/**
* @return True if this material is affected by gravity.
*/
public boolean hasGravity() {
if (!isBlock()) {
return false;
}
switch (this) {
//
case ANVIL:
case BLACK_CONCRETE_POWDER:
case BLUE_CONCRETE_POWDER:
case BROWN_CONCRETE_POWDER:
case CHIPPED_ANVIL:
case CYAN_CONCRETE_POWDER:
case DAMAGED_ANVIL:
case DRAGON_EGG:
case GRAVEL:
case GRAY_CONCRETE_POWDER:
case GREEN_CONCRETE_POWDER:
case LIGHT_BLUE_CONCRETE_POWDER:
case LIGHT_GRAY_CONCRETE_POWDER:
case LIME_CONCRETE_POWDER:
case MAGENTA_CONCRETE_POWDER:
case ORANGE_CONCRETE_POWDER:
case PINK_CONCRETE_POWDER:
case PURPLE_CONCRETE_POWDER:
case RED_CONCRETE_POWDER:
case RED_SAND:
case SAND:
case WHITE_CONCRETE_POWDER:
case YELLOW_CONCRETE_POWDER:
// ----- Legacy Separator -----
case LEGACY_SAND:
case LEGACY_GRAVEL:
case LEGACY_ANVIL:
case LEGACY_CONCRETE_POWDER:
//
return true;
default:
return false;
}
}
/**
* Checks if this Material is an obtainable item.
*
* @return true if this material is an item
*/
public boolean isItem() {
switch (this) {
//
case ACACIA_WALL_SIGN:
case ATTACHED_MELON_STEM:
case ATTACHED_PUMPKIN_STEM:
case BAMBOO_SAPLING:
case BEETROOTS:
case BIRCH_WALL_SIGN:
case BLACK_WALL_BANNER:
case BLUE_WALL_BANNER:
case BRAIN_CORAL_WALL_FAN:
case BROWN_WALL_BANNER:
case BUBBLE_COLUMN:
case BUBBLE_CORAL_WALL_FAN:
case CARROTS:
case CAVE_AIR:
case COCOA:
case CREEPER_WALL_HEAD:
case CYAN_WALL_BANNER:
case DARK_OAK_WALL_SIGN:
case DEAD_BRAIN_CORAL_WALL_FAN:
case DEAD_BUBBLE_CORAL_WALL_FAN:
case DEAD_FIRE_CORAL_WALL_FAN:
case DEAD_HORN_CORAL_WALL_FAN:
case DEAD_TUBE_CORAL_WALL_FAN:
case DRAGON_WALL_HEAD:
case END_GATEWAY:
case END_PORTAL:
case FIRE:
case FIRE_CORAL_WALL_FAN:
case FROSTED_ICE:
case GRAY_WALL_BANNER:
case GREEN_WALL_BANNER:
case HORN_CORAL_WALL_FAN:
case JUNGLE_WALL_SIGN:
case KELP_PLANT:
case LAVA:
case LIGHT_BLUE_WALL_BANNER:
case LIGHT_GRAY_WALL_BANNER:
case LIME_WALL_BANNER:
case MAGENTA_WALL_BANNER:
case MELON_STEM:
case MOVING_PISTON:
case NETHER_PORTAL:
case OAK_WALL_SIGN:
case ORANGE_WALL_BANNER:
case PINK_WALL_BANNER:
case PISTON_HEAD:
case PLAYER_WALL_HEAD:
case POTATOES:
case POTTED_ACACIA_SAPLING:
case POTTED_ALLIUM:
case POTTED_AZURE_BLUET:
case POTTED_BAMBOO:
case POTTED_BIRCH_SAPLING:
case POTTED_BLUE_ORCHID:
case POTTED_BROWN_MUSHROOM:
case POTTED_CACTUS:
case POTTED_CORNFLOWER:
case POTTED_DANDELION:
case POTTED_DARK_OAK_SAPLING:
case POTTED_DEAD_BUSH:
case POTTED_FERN:
case POTTED_JUNGLE_SAPLING:
case POTTED_LILY_OF_THE_VALLEY:
case POTTED_OAK_SAPLING:
case POTTED_ORANGE_TULIP:
case POTTED_OXEYE_DAISY:
case POTTED_PINK_TULIP:
case POTTED_POPPY:
case POTTED_RED_MUSHROOM:
case POTTED_RED_TULIP:
case POTTED_SPRUCE_SAPLING:
case POTTED_WHITE_TULIP:
case POTTED_WITHER_ROSE:
case PUMPKIN_STEM:
case PURPLE_WALL_BANNER:
case REDSTONE_WALL_TORCH:
case REDSTONE_WIRE:
case RED_WALL_BANNER:
case SKELETON_WALL_SKULL:
case SPRUCE_WALL_SIGN:
case SWEET_BERRY_BUSH:
case TALL_SEAGRASS:
case TRIPWIRE:
case TUBE_CORAL_WALL_FAN:
case VOID_AIR:
case WALL_TORCH:
case WATER:
case WHITE_WALL_BANNER:
case WITHER_SKELETON_WALL_SKULL:
case YELLOW_WALL_BANNER:
case ZOMBIE_WALL_HEAD:
// ----- Legacy Separator -----
case LEGACY_ACACIA_DOOR:
case LEGACY_BED_BLOCK:
case LEGACY_BEETROOT_BLOCK:
case LEGACY_BIRCH_DOOR:
case LEGACY_BREWING_STAND:
case LEGACY_BURNING_FURNACE:
case LEGACY_CAKE_BLOCK:
case LEGACY_CARROT:
case LEGACY_CAULDRON:
case LEGACY_COCOA:
case LEGACY_CROPS:
case LEGACY_DARK_OAK_DOOR:
case LEGACY_DAYLIGHT_DETECTOR_INVERTED:
case LEGACY_DIODE_BLOCK_OFF:
case LEGACY_DIODE_BLOCK_ON:
case LEGACY_DOUBLE_STEP:
case LEGACY_DOUBLE_STONE_SLAB2:
case LEGACY_ENDER_PORTAL:
case LEGACY_END_GATEWAY:
case LEGACY_FIRE:
case LEGACY_FLOWER_POT:
case LEGACY_FROSTED_ICE:
case LEGACY_GLOWING_REDSTONE_ORE:
case LEGACY_IRON_DOOR_BLOCK:
case LEGACY_JUNGLE_DOOR:
case LEGACY_LAVA:
case LEGACY_MELON_STEM:
case LEGACY_NETHER_WARTS:
case LEGACY_PISTON_EXTENSION:
case LEGACY_PISTON_MOVING_PIECE:
case LEGACY_PORTAL:
case LEGACY_POTATO:
case LEGACY_PUMPKIN_STEM:
case LEGACY_PURPUR_DOUBLE_SLAB:
case LEGACY_REDSTONE_COMPARATOR_OFF:
case LEGACY_REDSTONE_COMPARATOR_ON:
case LEGACY_REDSTONE_LAMP_ON:
case LEGACY_REDSTONE_TORCH_OFF:
case LEGACY_REDSTONE_WIRE:
case LEGACY_SIGN_POST:
case LEGACY_SKULL:
case LEGACY_SPRUCE_DOOR:
case LEGACY_STANDING_BANNER:
case LEGACY_STATIONARY_LAVA:
case LEGACY_STATIONARY_WATER:
case LEGACY_SUGAR_CANE_BLOCK:
case LEGACY_TRIPWIRE:
case LEGACY_WALL_BANNER:
case LEGACY_WALL_SIGN:
case LEGACY_WATER:
case LEGACY_WOODEN_DOOR:
case LEGACY_WOOD_DOUBLE_STEP:
//
return false;
default:
return true;
}
}
/**
* Checks if this Material can be interacted with.
*
* Interactable materials include those with functionality when they are
* interacted with by a player such as chests, furnaces, etc.
*
* Some blocks such as piston heads and stairs are considered interactable
* though may not perform any additional functionality.
*
* Note that the interactability of some materials may be dependant on their
* state as well. This method will return true if there is at least one
* state in which additional interact handling is performed for the
* material.
*
* @return true if this material can be interacted with.
*/
public boolean isInteractable() {
switch (this) {
//
case ACACIA_BUTTON:
case ACACIA_DOOR:
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_SIGN:
case ACACIA_STAIRS:
case ACACIA_TRAPDOOR:
case ACACIA_WALL_SIGN:
case ANDESITE_STAIRS:
case ANVIL:
case BARREL:
case BEACON:
case BELL:
case BIRCH_BUTTON:
case BIRCH_DOOR:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_SIGN:
case BIRCH_STAIRS:
case BIRCH_TRAPDOOR:
case BIRCH_WALL_SIGN:
case BLACK_BED:
case BLACK_SHULKER_BOX:
case BLAST_FURNACE:
case BLUE_BED:
case BLUE_SHULKER_BOX:
case BREWING_STAND:
case BRICK_STAIRS:
case BROWN_BED:
case BROWN_SHULKER_BOX:
case CAKE:
case CAMPFIRE:
case CARTOGRAPHY_TABLE:
case CAULDRON:
case CHAIN_COMMAND_BLOCK:
case CHEST:
case CHIPPED_ANVIL:
case COBBLESTONE_STAIRS:
case COMMAND_BLOCK:
case COMPARATOR:
case COMPOSTER:
case CRAFTING_TABLE:
case CYAN_BED:
case CYAN_SHULKER_BOX:
case DAMAGED_ANVIL:
case DARK_OAK_BUTTON:
case DARK_OAK_DOOR:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_SIGN:
case DARK_OAK_STAIRS:
case DARK_OAK_TRAPDOOR:
case DARK_OAK_WALL_SIGN:
case DARK_PRISMARINE_STAIRS:
case DAYLIGHT_DETECTOR:
case DIORITE_STAIRS:
case DISPENSER:
case DRAGON_EGG:
case DROPPER:
case ENCHANTING_TABLE:
case ENDER_CHEST:
case END_STONE_BRICK_STAIRS:
case FLETCHING_TABLE:
case FLOWER_POT:
case FURNACE:
case GRANITE_STAIRS:
case GRAY_BED:
case GRAY_SHULKER_BOX:
case GREEN_BED:
case GREEN_SHULKER_BOX:
case GRINDSTONE:
case HOPPER:
case IRON_DOOR:
case IRON_TRAPDOOR:
case JIGSAW:
case JUKEBOX:
case JUNGLE_BUTTON:
case JUNGLE_DOOR:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_SIGN:
case JUNGLE_STAIRS:
case JUNGLE_TRAPDOOR:
case JUNGLE_WALL_SIGN:
case LECTERN:
case LEVER:
case LIGHT_BLUE_BED:
case LIGHT_BLUE_SHULKER_BOX:
case LIGHT_GRAY_BED:
case LIGHT_GRAY_SHULKER_BOX:
case LIME_BED:
case LIME_SHULKER_BOX:
case LOOM:
case MAGENTA_BED:
case MAGENTA_SHULKER_BOX:
case MOSSY_COBBLESTONE_STAIRS:
case MOSSY_STONE_BRICK_STAIRS:
case MOVING_PISTON:
case NETHER_BRICK_FENCE:
case NETHER_BRICK_STAIRS:
case NOTE_BLOCK:
case OAK_BUTTON:
case OAK_DOOR:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_SIGN:
case OAK_STAIRS:
case OAK_TRAPDOOR:
case OAK_WALL_SIGN:
case ORANGE_BED:
case ORANGE_SHULKER_BOX:
case PINK_BED:
case PINK_SHULKER_BOX:
case POLISHED_ANDESITE_STAIRS:
case POLISHED_DIORITE_STAIRS:
case POLISHED_GRANITE_STAIRS:
case POTTED_ACACIA_SAPLING:
case POTTED_ALLIUM:
case POTTED_AZURE_BLUET:
case POTTED_BAMBOO:
case POTTED_BIRCH_SAPLING:
case POTTED_BLUE_ORCHID:
case POTTED_BROWN_MUSHROOM:
case POTTED_CACTUS:
case POTTED_CORNFLOWER:
case POTTED_DANDELION:
case POTTED_DARK_OAK_SAPLING:
case POTTED_DEAD_BUSH:
case POTTED_FERN:
case POTTED_JUNGLE_SAPLING:
case POTTED_LILY_OF_THE_VALLEY:
case POTTED_OAK_SAPLING:
case POTTED_ORANGE_TULIP:
case POTTED_OXEYE_DAISY:
case POTTED_PINK_TULIP:
case POTTED_POPPY:
case POTTED_RED_MUSHROOM:
case POTTED_RED_TULIP:
case POTTED_SPRUCE_SAPLING:
case POTTED_WHITE_TULIP:
case POTTED_WITHER_ROSE:
case PRISMARINE_BRICK_STAIRS:
case PRISMARINE_STAIRS:
case PUMPKIN:
case PURPLE_BED:
case PURPLE_SHULKER_BOX:
case PURPUR_STAIRS:
case QUARTZ_STAIRS:
case REDSTONE_ORE:
case RED_BED:
case RED_NETHER_BRICK_STAIRS:
case RED_SANDSTONE_STAIRS:
case RED_SHULKER_BOX:
case REPEATER:
case REPEATING_COMMAND_BLOCK:
case SANDSTONE_STAIRS:
case SHULKER_BOX:
case SMITHING_TABLE:
case SMOKER:
case SMOOTH_QUARTZ_STAIRS:
case SMOOTH_RED_SANDSTONE_STAIRS:
case SMOOTH_SANDSTONE_STAIRS:
case SPRUCE_BUTTON:
case SPRUCE_DOOR:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_SIGN:
case SPRUCE_STAIRS:
case SPRUCE_TRAPDOOR:
case SPRUCE_WALL_SIGN:
case STONECUTTER:
case STONE_BRICK_STAIRS:
case STONE_BUTTON:
case STONE_STAIRS:
case STRUCTURE_BLOCK:
case SWEET_BERRY_BUSH:
case TNT:
case TRAPPED_CHEST:
case WHITE_BED:
case WHITE_SHULKER_BOX:
case YELLOW_BED:
case YELLOW_SHULKER_BOX:
//
return true;
default:
return false;
}
}
/**
* Obtains the block's hardness level (also known as "strength").
*
* This number is used to calculate the time required to break each block.
*
* Only available when {@link #isBlock()} is true.
*
* @return the hardness of that material.
*/
public float getHardness() {
Validate.isTrue(isBlock(), "The Material is not a block!");
switch (this) {
//
case BARRIER:
case BEDROCK:
case CHAIN_COMMAND_BLOCK:
case COMMAND_BLOCK:
case END_GATEWAY:
case END_PORTAL:
case END_PORTAL_FRAME:
case JIGSAW:
case MOVING_PISTON:
case NETHER_PORTAL:
case REPEATING_COMMAND_BLOCK:
case STRUCTURE_BLOCK:
return -1.0F;
case BLACK_CARPET:
case BLUE_CARPET:
case BROWN_CARPET:
case CYAN_CARPET:
case GRAY_CARPET:
case GREEN_CARPET:
case LIGHT_BLUE_CARPET:
case LIGHT_GRAY_CARPET:
case LIME_CARPET:
case MAGENTA_CARPET:
case ORANGE_CARPET:
case PINK_CARPET:
case PURPLE_CARPET:
case RED_CARPET:
case SNOW:
case WHITE_CARPET:
case YELLOW_CARPET:
return 0.1F;
case ACACIA_LEAVES:
case BIRCH_LEAVES:
case BLACK_BED:
case BLUE_BED:
case BROWN_BED:
case BROWN_MUSHROOM_BLOCK:
case COCOA:
case CYAN_BED:
case DARK_OAK_LEAVES:
case DAYLIGHT_DETECTOR:
case GRAY_BED:
case GREEN_BED:
case JUNGLE_LEAVES:
case LIGHT_BLUE_BED:
case LIGHT_GRAY_BED:
case LIME_BED:
case MAGENTA_BED:
case MUSHROOM_STEM:
case OAK_LEAVES:
case ORANGE_BED:
case PINK_BED:
case PURPLE_BED:
case RED_BED:
case RED_MUSHROOM_BLOCK:
case SNOW_BLOCK:
case SPRUCE_LEAVES:
case VINE:
case WHITE_BED:
case YELLOW_BED:
return 0.2F;
case BLACK_STAINED_GLASS:
case BLACK_STAINED_GLASS_PANE:
case BLUE_STAINED_GLASS:
case BLUE_STAINED_GLASS_PANE:
case BROWN_STAINED_GLASS:
case BROWN_STAINED_GLASS_PANE:
case CYAN_STAINED_GLASS:
case CYAN_STAINED_GLASS_PANE:
case GLASS:
case GLASS_PANE:
case GLOWSTONE:
case GRAY_STAINED_GLASS:
case GRAY_STAINED_GLASS_PANE:
case GREEN_STAINED_GLASS:
case GREEN_STAINED_GLASS_PANE:
case LIGHT_BLUE_STAINED_GLASS:
case LIGHT_BLUE_STAINED_GLASS_PANE:
case LIGHT_GRAY_STAINED_GLASS:
case LIGHT_GRAY_STAINED_GLASS_PANE:
case LIME_STAINED_GLASS:
case LIME_STAINED_GLASS_PANE:
case MAGENTA_STAINED_GLASS:
case MAGENTA_STAINED_GLASS_PANE:
case ORANGE_STAINED_GLASS:
case ORANGE_STAINED_GLASS_PANE:
case PINK_STAINED_GLASS:
case PINK_STAINED_GLASS_PANE:
case PURPLE_STAINED_GLASS:
case PURPLE_STAINED_GLASS_PANE:
case REDSTONE_LAMP:
case RED_STAINED_GLASS:
case RED_STAINED_GLASS_PANE:
case SEA_LANTERN:
case WHITE_STAINED_GLASS:
case WHITE_STAINED_GLASS_PANE:
case YELLOW_STAINED_GLASS:
case YELLOW_STAINED_GLASS_PANE:
return 0.3F;
case CACTUS:
case CHORUS_FLOWER:
case CHORUS_PLANT:
case LADDER:
case NETHERRACK:
return 0.4F;
case ACACIA_BUTTON:
case ACACIA_PRESSURE_PLATE:
case BIRCH_BUTTON:
case BIRCH_PRESSURE_PLATE:
case BLACK_CONCRETE_POWDER:
case BLUE_CONCRETE_POWDER:
case BREWING_STAND:
case BROWN_CONCRETE_POWDER:
case CAKE:
case COARSE_DIRT:
case CYAN_CONCRETE_POWDER:
case DARK_OAK_BUTTON:
case DARK_OAK_PRESSURE_PLATE:
case DIRT:
case DRIED_KELP_BLOCK:
case FROSTED_ICE:
case GRAY_CONCRETE_POWDER:
case GREEN_CONCRETE_POWDER:
case HAY_BLOCK:
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case ICE:
case JUNGLE_BUTTON:
case JUNGLE_PRESSURE_PLATE:
case LEVER:
case LIGHT_BLUE_CONCRETE_POWDER:
case LIGHT_GRAY_CONCRETE_POWDER:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
case LIME_CONCRETE_POWDER:
case MAGENTA_CONCRETE_POWDER:
case MAGMA_BLOCK:
case OAK_BUTTON:
case OAK_PRESSURE_PLATE:
case ORANGE_CONCRETE_POWDER:
case PACKED_ICE:
case PINK_CONCRETE_POWDER:
case PISTON:
case PISTON_HEAD:
case PODZOL:
case PURPLE_CONCRETE_POWDER:
case RED_CONCRETE_POWDER:
case RED_SAND:
case SAND:
case SOUL_SAND:
case SPRUCE_BUTTON:
case SPRUCE_PRESSURE_PLATE:
case STICKY_PISTON:
case STONE_BUTTON:
case STONE_PRESSURE_PLATE:
case TURTLE_EGG:
case WHITE_CONCRETE_POWDER:
case YELLOW_CONCRETE_POWDER:
return 0.5F;
case CLAY:
case COMPOSTER:
case FARMLAND:
case GRASS_BLOCK:
case GRAVEL:
case MYCELIUM:
case SPONGE:
case WET_SPONGE:
return 0.6F;
case GRASS_PATH:
return 0.65F;
case ACTIVATOR_RAIL:
case DETECTOR_RAIL:
case POWERED_RAIL:
case RAIL:
return 0.7F;
case BLACK_WOOL:
case BLUE_WOOL:
case BROWN_WOOL:
case CHISELED_QUARTZ_BLOCK:
case CHISELED_RED_SANDSTONE:
case CHISELED_SANDSTONE:
case CUT_RED_SANDSTONE:
case CUT_SANDSTONE:
case CYAN_WOOL:
case END_STONE_BRICKS:
case END_STONE_BRICK_SLAB:
case END_STONE_BRICK_STAIRS:
case END_STONE_BRICK_WALL:
case GRAY_WOOL:
case GREEN_WOOL:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_WOOL:
case LIME_WOOL:
case MAGENTA_WOOL:
case NOTE_BLOCK:
case ORANGE_WOOL:
case PINK_WOOL:
case PURPLE_WOOL:
case QUARTZ_BLOCK:
case QUARTZ_PILLAR:
case QUARTZ_STAIRS:
case RED_SANDSTONE:
case RED_SANDSTONE_STAIRS:
case RED_SANDSTONE_WALL:
case RED_WOOL:
case SANDSTONE:
case SANDSTONE_STAIRS:
case SANDSTONE_WALL:
case WHITE_WOOL:
case YELLOW_WOOL:
return 0.8F;
case ACACIA_SIGN:
case ACACIA_WALL_SIGN:
case BAMBOO:
case BAMBOO_SAPLING:
case BIRCH_SIGN:
case BIRCH_WALL_SIGN:
case BLACK_BANNER:
case BLACK_WALL_BANNER:
case BLUE_BANNER:
case BLUE_WALL_BANNER:
case BROWN_BANNER:
case BROWN_WALL_BANNER:
case CARVED_PUMPKIN:
case CREEPER_HEAD:
case CREEPER_WALL_HEAD:
case CYAN_BANNER:
case CYAN_WALL_BANNER:
case DARK_OAK_SIGN:
case DARK_OAK_WALL_SIGN:
case DRAGON_HEAD:
case DRAGON_WALL_HEAD:
case GRAY_BANNER:
case GRAY_WALL_BANNER:
case GREEN_BANNER:
case GREEN_WALL_BANNER:
case JACK_O_LANTERN:
case JUNGLE_SIGN:
case JUNGLE_WALL_SIGN:
case LIGHT_BLUE_BANNER:
case LIGHT_BLUE_WALL_BANNER:
case LIGHT_GRAY_BANNER:
case LIGHT_GRAY_WALL_BANNER:
case LIME_BANNER:
case LIME_WALL_BANNER:
case MAGENTA_BANNER:
case MAGENTA_WALL_BANNER:
case MELON:
case NETHER_WART_BLOCK:
case OAK_SIGN:
case OAK_WALL_SIGN:
case ORANGE_BANNER:
case ORANGE_WALL_BANNER:
case PINK_BANNER:
case PINK_WALL_BANNER:
case PLAYER_HEAD:
case PLAYER_WALL_HEAD:
case PUMPKIN:
case PURPLE_BANNER:
case PURPLE_WALL_BANNER:
case RED_BANNER:
case RED_WALL_BANNER:
case SKELETON_SKULL:
case SKELETON_WALL_SKULL:
case SPRUCE_SIGN:
case SPRUCE_WALL_SIGN:
case WHITE_BANNER:
case WHITE_WALL_BANNER:
case WITHER_SKELETON_SKULL:
case WITHER_SKELETON_WALL_SKULL:
case YELLOW_BANNER:
case YELLOW_WALL_BANNER:
case ZOMBIE_HEAD:
case ZOMBIE_WALL_HEAD:
return 1.0F;
case BLACK_TERRACOTTA:
case BLUE_TERRACOTTA:
case BROWN_TERRACOTTA:
case CYAN_TERRACOTTA:
case GRAY_TERRACOTTA:
case GREEN_TERRACOTTA:
case LIGHT_BLUE_TERRACOTTA:
case LIGHT_GRAY_TERRACOTTA:
case LIME_TERRACOTTA:
case MAGENTA_TERRACOTTA:
case ORANGE_TERRACOTTA:
case PINK_TERRACOTTA:
case PURPLE_TERRACOTTA:
case RED_TERRACOTTA:
case TERRACOTTA:
case WHITE_TERRACOTTA:
case YELLOW_TERRACOTTA:
return 1.25F;
case BLACK_GLAZED_TERRACOTTA:
case BLUE_GLAZED_TERRACOTTA:
case BROWN_GLAZED_TERRACOTTA:
case CYAN_GLAZED_TERRACOTTA:
case GRAY_GLAZED_TERRACOTTA:
case GREEN_GLAZED_TERRACOTTA:
case LIGHT_BLUE_GLAZED_TERRACOTTA:
case LIGHT_GRAY_GLAZED_TERRACOTTA:
case LIME_GLAZED_TERRACOTTA:
case MAGENTA_GLAZED_TERRACOTTA:
case ORANGE_GLAZED_TERRACOTTA:
case PINK_GLAZED_TERRACOTTA:
case PURPLE_GLAZED_TERRACOTTA:
case RED_GLAZED_TERRACOTTA:
case WHITE_GLAZED_TERRACOTTA:
case YELLOW_GLAZED_TERRACOTTA:
return 1.4F;
case ANDESITE:
case ANDESITE_SLAB:
case ANDESITE_STAIRS:
case ANDESITE_WALL:
case BOOKSHELF:
case BRAIN_CORAL_BLOCK:
case BUBBLE_CORAL_BLOCK:
case CHISELED_STONE_BRICKS:
case CRACKED_STONE_BRICKS:
case DARK_PRISMARINE:
case DARK_PRISMARINE_SLAB:
case DARK_PRISMARINE_STAIRS:
case DEAD_BRAIN_CORAL_BLOCK:
case DEAD_BUBBLE_CORAL_BLOCK:
case DEAD_FIRE_CORAL_BLOCK:
case DEAD_HORN_CORAL_BLOCK:
case DEAD_TUBE_CORAL_BLOCK:
case DIORITE:
case DIORITE_SLAB:
case DIORITE_STAIRS:
case DIORITE_WALL:
case FIRE_CORAL_BLOCK:
case GRANITE:
case GRANITE_SLAB:
case GRANITE_STAIRS:
case GRANITE_WALL:
case HORN_CORAL_BLOCK:
case MOSSY_STONE_BRICKS:
case MOSSY_STONE_BRICK_SLAB:
case MOSSY_STONE_BRICK_STAIRS:
case MOSSY_STONE_BRICK_WALL:
case POLISHED_ANDESITE:
case POLISHED_ANDESITE_SLAB:
case POLISHED_ANDESITE_STAIRS:
case POLISHED_DIORITE:
case POLISHED_DIORITE_SLAB:
case POLISHED_DIORITE_STAIRS:
case POLISHED_GRANITE:
case POLISHED_GRANITE_SLAB:
case POLISHED_GRANITE_STAIRS:
case PRISMARINE:
case PRISMARINE_BRICKS:
case PRISMARINE_BRICK_SLAB:
case PRISMARINE_BRICK_STAIRS:
case PRISMARINE_SLAB:
case PRISMARINE_STAIRS:
case PRISMARINE_WALL:
case PURPUR_BLOCK:
case PURPUR_PILLAR:
case PURPUR_STAIRS:
case STONE:
case STONE_BRICKS:
case STONE_BRICK_STAIRS:
case STONE_BRICK_WALL:
case STONE_STAIRS:
case TUBE_CORAL_BLOCK:
return 1.5F;
case BLACK_CONCRETE:
case BLUE_CONCRETE:
case BROWN_CONCRETE:
case CYAN_CONCRETE:
case GRAY_CONCRETE:
case GREEN_CONCRETE:
case LIGHT_BLUE_CONCRETE:
case LIGHT_GRAY_CONCRETE:
case LIME_CONCRETE:
case MAGENTA_CONCRETE:
case ORANGE_CONCRETE:
case PINK_CONCRETE:
case PURPLE_CONCRETE:
case RED_CONCRETE:
case WHITE_CONCRETE:
case YELLOW_CONCRETE:
return 1.8F;
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_LOG:
case ACACIA_PLANKS:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_WOOD:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_LOG:
case BIRCH_PLANKS:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_WOOD:
case BLACK_SHULKER_BOX:
case BLUE_SHULKER_BOX:
case BONE_BLOCK:
case BRICKS:
case BRICK_SLAB:
case BRICK_STAIRS:
case BRICK_WALL:
case BROWN_SHULKER_BOX:
case CAMPFIRE:
case CAULDRON:
case COBBLESTONE:
case COBBLESTONE_SLAB:
case COBBLESTONE_STAIRS:
case COBBLESTONE_WALL:
case CUT_RED_SANDSTONE_SLAB:
case CUT_SANDSTONE_SLAB:
case CYAN_SHULKER_BOX:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_LOG:
case DARK_OAK_PLANKS:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_WOOD:
case GRAY_SHULKER_BOX:
case GREEN_SHULKER_BOX:
case GRINDSTONE:
case JUKEBOX:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_LOG:
case JUNGLE_PLANKS:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_WOOD:
case LIGHT_BLUE_SHULKER_BOX:
case LIGHT_GRAY_SHULKER_BOX:
case LIME_SHULKER_BOX:
case MAGENTA_SHULKER_BOX:
case MOSSY_COBBLESTONE:
case MOSSY_COBBLESTONE_SLAB:
case MOSSY_COBBLESTONE_STAIRS:
case MOSSY_COBBLESTONE_WALL:
case NETHER_BRICKS:
case NETHER_BRICK_FENCE:
case NETHER_BRICK_SLAB:
case NETHER_BRICK_STAIRS:
case NETHER_BRICK_WALL:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_LOG:
case OAK_PLANKS:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_WOOD:
case ORANGE_SHULKER_BOX:
case PETRIFIED_OAK_SLAB:
case PINK_SHULKER_BOX:
case PURPLE_SHULKER_BOX:
case PURPUR_SLAB:
case QUARTZ_SLAB:
case RED_NETHER_BRICKS:
case RED_NETHER_BRICK_SLAB:
case RED_NETHER_BRICK_STAIRS:
case RED_NETHER_BRICK_WALL:
case RED_SANDSTONE_SLAB:
case RED_SHULKER_BOX:
case SANDSTONE_SLAB:
case SHULKER_BOX:
case SMOOTH_QUARTZ:
case SMOOTH_QUARTZ_SLAB:
case SMOOTH_QUARTZ_STAIRS:
case SMOOTH_RED_SANDSTONE:
case SMOOTH_RED_SANDSTONE_SLAB:
case SMOOTH_RED_SANDSTONE_STAIRS:
case SMOOTH_SANDSTONE:
case SMOOTH_SANDSTONE_SLAB:
case SMOOTH_SANDSTONE_STAIRS:
case SMOOTH_STONE:
case SMOOTH_STONE_SLAB:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_LOG:
case SPRUCE_PLANKS:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_WOOD:
case STONE_BRICK_SLAB:
case STONE_SLAB:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case WHITE_SHULKER_BOX:
case YELLOW_SHULKER_BOX:
return 2.0F;
case BARREL:
case CARTOGRAPHY_TABLE:
case CHEST:
case CRAFTING_TABLE:
case FLETCHING_TABLE:
case LECTERN:
case LOOM:
case SMITHING_TABLE:
case TRAPPED_CHEST:
return 2.5F;
case BLUE_ICE:
return 2.8F;
case ACACIA_DOOR:
case ACACIA_TRAPDOOR:
case BEACON:
case BIRCH_DOOR:
case BIRCH_TRAPDOOR:
case COAL_ORE:
case CONDUIT:
case DARK_OAK_DOOR:
case DARK_OAK_TRAPDOOR:
case DIAMOND_ORE:
case DRAGON_EGG:
case EMERALD_ORE:
case END_STONE:
case GOLD_BLOCK:
case GOLD_ORE:
case HOPPER:
case IRON_ORE:
case JUNGLE_DOOR:
case JUNGLE_TRAPDOOR:
case LAPIS_BLOCK:
case LAPIS_ORE:
case NETHER_QUARTZ_ORE:
case OAK_DOOR:
case OAK_TRAPDOOR:
case OBSERVER:
case REDSTONE_ORE:
case SPRUCE_DOOR:
case SPRUCE_TRAPDOOR:
return 3.0F;
case BLAST_FURNACE:
case DISPENSER:
case DROPPER:
case FURNACE:
case LANTERN:
case SMOKER:
case STONECUTTER:
return 3.5F;
case COBWEB:
return 4.0F;
case ANVIL:
case BELL:
case CHIPPED_ANVIL:
case COAL_BLOCK:
case DAMAGED_ANVIL:
case DIAMOND_BLOCK:
case EMERALD_BLOCK:
case ENCHANTING_TABLE:
case IRON_BARS:
case IRON_BLOCK:
case IRON_DOOR:
case IRON_TRAPDOOR:
case REDSTONE_BLOCK:
case SPAWNER:
return 5.0F;
case ENDER_CHEST:
return 22.5F;
case OBSIDIAN:
return 50.0F;
case LAVA:
case WATER:
return 100.0F;
default:
return 0F;
//
}
}
/**
* Obtains the blast resistance value (also known as block "durability").
*
* This value is used in explosions to calculate whether a block should be
* broken or not.
*
* Only available when {@link #isBlock()} is true.
*
* @return the blast resistance of that material.
*/
public float getBlastResistance() {
Validate.isTrue(isBlock(), "The Material is not a block!");
switch (this) {
//
case BLACK_CARPET:
case BLUE_CARPET:
case BROWN_CARPET:
case CYAN_CARPET:
case GRAY_CARPET:
case GREEN_CARPET:
case LIGHT_BLUE_CARPET:
case LIGHT_GRAY_CARPET:
case LIME_CARPET:
case MAGENTA_CARPET:
case ORANGE_CARPET:
case PINK_CARPET:
case PURPLE_CARPET:
case RED_CARPET:
case SNOW:
case WHITE_CARPET:
case YELLOW_CARPET:
return 0.1F;
case ACACIA_LEAVES:
case BIRCH_LEAVES:
case BLACK_BED:
case BLUE_BED:
case BROWN_BED:
case BROWN_MUSHROOM_BLOCK:
case CYAN_BED:
case DARK_OAK_LEAVES:
case DAYLIGHT_DETECTOR:
case GRAY_BED:
case GREEN_BED:
case JUNGLE_LEAVES:
case LIGHT_BLUE_BED:
case LIGHT_GRAY_BED:
case LIME_BED:
case MAGENTA_BED:
case MUSHROOM_STEM:
case OAK_LEAVES:
case ORANGE_BED:
case PINK_BED:
case PURPLE_BED:
case RED_BED:
case RED_MUSHROOM_BLOCK:
case SNOW_BLOCK:
case SPRUCE_LEAVES:
case VINE:
case WHITE_BED:
case YELLOW_BED:
return 0.2F;
case BLACK_STAINED_GLASS:
case BLACK_STAINED_GLASS_PANE:
case BLUE_STAINED_GLASS:
case BLUE_STAINED_GLASS_PANE:
case BROWN_STAINED_GLASS:
case BROWN_STAINED_GLASS_PANE:
case CYAN_STAINED_GLASS:
case CYAN_STAINED_GLASS_PANE:
case GLASS:
case GLASS_PANE:
case GLOWSTONE:
case GRAY_STAINED_GLASS:
case GRAY_STAINED_GLASS_PANE:
case GREEN_STAINED_GLASS:
case GREEN_STAINED_GLASS_PANE:
case LIGHT_BLUE_STAINED_GLASS:
case LIGHT_BLUE_STAINED_GLASS_PANE:
case LIGHT_GRAY_STAINED_GLASS:
case LIGHT_GRAY_STAINED_GLASS_PANE:
case LIME_STAINED_GLASS:
case LIME_STAINED_GLASS_PANE:
case MAGENTA_STAINED_GLASS:
case MAGENTA_STAINED_GLASS_PANE:
case ORANGE_STAINED_GLASS:
case ORANGE_STAINED_GLASS_PANE:
case PINK_STAINED_GLASS:
case PINK_STAINED_GLASS_PANE:
case PURPLE_STAINED_GLASS:
case PURPLE_STAINED_GLASS_PANE:
case REDSTONE_LAMP:
case RED_STAINED_GLASS:
case RED_STAINED_GLASS_PANE:
case SEA_LANTERN:
case WHITE_STAINED_GLASS:
case WHITE_STAINED_GLASS_PANE:
case YELLOW_STAINED_GLASS:
case YELLOW_STAINED_GLASS_PANE:
return 0.3F;
case CACTUS:
case CHORUS_FLOWER:
case CHORUS_PLANT:
case LADDER:
case NETHERRACK:
return 0.4F;
case ACACIA_BUTTON:
case ACACIA_PRESSURE_PLATE:
case BIRCH_BUTTON:
case BIRCH_PRESSURE_PLATE:
case BLACK_CONCRETE_POWDER:
case BLUE_CONCRETE_POWDER:
case BREWING_STAND:
case BROWN_CONCRETE_POWDER:
case CAKE:
case COARSE_DIRT:
case CYAN_CONCRETE_POWDER:
case DARK_OAK_BUTTON:
case DARK_OAK_PRESSURE_PLATE:
case DIRT:
case FROSTED_ICE:
case GRAY_CONCRETE_POWDER:
case GREEN_CONCRETE_POWDER:
case HAY_BLOCK:
case HEAVY_WEIGHTED_PRESSURE_PLATE:
case ICE:
case JUNGLE_BUTTON:
case JUNGLE_PRESSURE_PLATE:
case LEVER:
case LIGHT_BLUE_CONCRETE_POWDER:
case LIGHT_GRAY_CONCRETE_POWDER:
case LIGHT_WEIGHTED_PRESSURE_PLATE:
case LIME_CONCRETE_POWDER:
case MAGENTA_CONCRETE_POWDER:
case MAGMA_BLOCK:
case OAK_BUTTON:
case OAK_PRESSURE_PLATE:
case ORANGE_CONCRETE_POWDER:
case PACKED_ICE:
case PINK_CONCRETE_POWDER:
case PISTON:
case PISTON_HEAD:
case PODZOL:
case PURPLE_CONCRETE_POWDER:
case RED_CONCRETE_POWDER:
case RED_SAND:
case SAND:
case SOUL_SAND:
case SPRUCE_BUTTON:
case SPRUCE_PRESSURE_PLATE:
case STICKY_PISTON:
case STONE_BUTTON:
case STONE_PRESSURE_PLATE:
case TURTLE_EGG:
case WHITE_CONCRETE_POWDER:
case YELLOW_CONCRETE_POWDER:
return 0.5F;
case CLAY:
case COMPOSTER:
case FARMLAND:
case GRASS_BLOCK:
case GRAVEL:
case MYCELIUM:
case SPONGE:
case WET_SPONGE:
return 0.6F;
case GRASS_PATH:
return 0.65F;
case ACTIVATOR_RAIL:
case DETECTOR_RAIL:
case POWERED_RAIL:
case RAIL:
return 0.7F;
case INFESTED_CHISELED_STONE_BRICKS:
case INFESTED_COBBLESTONE:
case INFESTED_CRACKED_STONE_BRICKS:
case INFESTED_MOSSY_STONE_BRICKS:
case INFESTED_STONE:
case INFESTED_STONE_BRICKS:
return 0.75F;
case BLACK_WOOL:
case BLUE_WOOL:
case BROWN_WOOL:
case CHISELED_QUARTZ_BLOCK:
case CHISELED_RED_SANDSTONE:
case CHISELED_SANDSTONE:
case CUT_RED_SANDSTONE:
case CUT_SANDSTONE:
case CYAN_WOOL:
case END_STONE_BRICKS:
case END_STONE_BRICK_SLAB:
case END_STONE_BRICK_STAIRS:
case END_STONE_BRICK_WALL:
case GRAY_WOOL:
case GREEN_WOOL:
case LIGHT_BLUE_WOOL:
case LIGHT_GRAY_WOOL:
case LIME_WOOL:
case MAGENTA_WOOL:
case NOTE_BLOCK:
case ORANGE_WOOL:
case PINK_WOOL:
case PURPLE_WOOL:
case QUARTZ_BLOCK:
case QUARTZ_PILLAR:
case QUARTZ_STAIRS:
case RED_SANDSTONE:
case RED_SANDSTONE_STAIRS:
case RED_SANDSTONE_WALL:
case RED_WOOL:
case SANDSTONE:
case SANDSTONE_STAIRS:
case SANDSTONE_WALL:
case WHITE_WOOL:
case YELLOW_WOOL:
return 0.8F;
case ACACIA_SIGN:
case ACACIA_WALL_SIGN:
case BAMBOO:
case BAMBOO_SAPLING:
case BIRCH_SIGN:
case BIRCH_WALL_SIGN:
case BLACK_BANNER:
case BLACK_WALL_BANNER:
case BLUE_BANNER:
case BLUE_WALL_BANNER:
case BROWN_BANNER:
case BROWN_WALL_BANNER:
case CARVED_PUMPKIN:
case CREEPER_HEAD:
case CREEPER_WALL_HEAD:
case CYAN_BANNER:
case CYAN_WALL_BANNER:
case DARK_OAK_SIGN:
case DARK_OAK_WALL_SIGN:
case DRAGON_HEAD:
case DRAGON_WALL_HEAD:
case GRAY_BANNER:
case GRAY_WALL_BANNER:
case GREEN_BANNER:
case GREEN_WALL_BANNER:
case JACK_O_LANTERN:
case JUNGLE_SIGN:
case JUNGLE_WALL_SIGN:
case LIGHT_BLUE_BANNER:
case LIGHT_BLUE_WALL_BANNER:
case LIGHT_GRAY_BANNER:
case LIGHT_GRAY_WALL_BANNER:
case LIME_BANNER:
case LIME_WALL_BANNER:
case MAGENTA_BANNER:
case MAGENTA_WALL_BANNER:
case MELON:
case NETHER_WART_BLOCK:
case OAK_SIGN:
case OAK_WALL_SIGN:
case ORANGE_BANNER:
case ORANGE_WALL_BANNER:
case PINK_BANNER:
case PINK_WALL_BANNER:
case PLAYER_HEAD:
case PLAYER_WALL_HEAD:
case PUMPKIN:
case PURPLE_BANNER:
case PURPLE_WALL_BANNER:
case RED_BANNER:
case RED_WALL_BANNER:
case SKELETON_SKULL:
case SKELETON_WALL_SKULL:
case SPRUCE_SIGN:
case SPRUCE_WALL_SIGN:
case WHITE_BANNER:
case WHITE_WALL_BANNER:
case WITHER_SKELETON_SKULL:
case WITHER_SKELETON_WALL_SKULL:
case YELLOW_BANNER:
case YELLOW_WALL_BANNER:
case ZOMBIE_HEAD:
case ZOMBIE_WALL_HEAD:
return 1.0F;
case BLACK_GLAZED_TERRACOTTA:
case BLUE_GLAZED_TERRACOTTA:
case BROWN_GLAZED_TERRACOTTA:
case CYAN_GLAZED_TERRACOTTA:
case GRAY_GLAZED_TERRACOTTA:
case GREEN_GLAZED_TERRACOTTA:
case LIGHT_BLUE_GLAZED_TERRACOTTA:
case LIGHT_GRAY_GLAZED_TERRACOTTA:
case LIME_GLAZED_TERRACOTTA:
case MAGENTA_GLAZED_TERRACOTTA:
case ORANGE_GLAZED_TERRACOTTA:
case PINK_GLAZED_TERRACOTTA:
case PURPLE_GLAZED_TERRACOTTA:
case RED_GLAZED_TERRACOTTA:
case WHITE_GLAZED_TERRACOTTA:
case YELLOW_GLAZED_TERRACOTTA:
return 1.4F;
case BOOKSHELF:
return 1.5F;
case BLACK_CONCRETE:
case BLUE_CONCRETE:
case BROWN_CONCRETE:
case CYAN_CONCRETE:
case GRAY_CONCRETE:
case GREEN_CONCRETE:
case LIGHT_BLUE_CONCRETE:
case LIGHT_GRAY_CONCRETE:
case LIME_CONCRETE:
case MAGENTA_CONCRETE:
case ORANGE_CONCRETE:
case PINK_CONCRETE:
case PURPLE_CONCRETE:
case RED_CONCRETE:
case WHITE_CONCRETE:
case YELLOW_CONCRETE:
return 1.8F;
case ACACIA_LOG:
case ACACIA_WOOD:
case BIRCH_LOG:
case BIRCH_WOOD:
case BLACK_SHULKER_BOX:
case BLUE_SHULKER_BOX:
case BONE_BLOCK:
case BROWN_SHULKER_BOX:
case CAMPFIRE:
case CAULDRON:
case CYAN_SHULKER_BOX:
case DARK_OAK_LOG:
case DARK_OAK_WOOD:
case GRAY_SHULKER_BOX:
case GREEN_SHULKER_BOX:
case JUNGLE_LOG:
case JUNGLE_WOOD:
case LIGHT_BLUE_SHULKER_BOX:
case LIGHT_GRAY_SHULKER_BOX:
case LIME_SHULKER_BOX:
case MAGENTA_SHULKER_BOX:
case OAK_LOG:
case OAK_WOOD:
case ORANGE_SHULKER_BOX:
case PINK_SHULKER_BOX:
case PURPLE_SHULKER_BOX:
case RED_SHULKER_BOX:
case SHULKER_BOX:
case SPRUCE_LOG:
case SPRUCE_WOOD:
case STRIPPED_ACACIA_LOG:
case STRIPPED_ACACIA_WOOD:
case STRIPPED_BIRCH_LOG:
case STRIPPED_BIRCH_WOOD:
case STRIPPED_DARK_OAK_LOG:
case STRIPPED_DARK_OAK_WOOD:
case STRIPPED_JUNGLE_LOG:
case STRIPPED_JUNGLE_WOOD:
case STRIPPED_OAK_LOG:
case STRIPPED_OAK_WOOD:
case STRIPPED_SPRUCE_LOG:
case STRIPPED_SPRUCE_WOOD:
case WHITE_SHULKER_BOX:
case YELLOW_SHULKER_BOX:
return 2.0F;
case BARREL:
case CARTOGRAPHY_TABLE:
case CHEST:
case CRAFTING_TABLE:
case DRIED_KELP_BLOCK:
case FLETCHING_TABLE:
case LECTERN:
case LOOM:
case SMITHING_TABLE:
case TRAPPED_CHEST:
return 2.5F;
case BLUE_ICE:
return 2.8F;
case ACACIA_DOOR:
case ACACIA_FENCE:
case ACACIA_FENCE_GATE:
case ACACIA_PLANKS:
case ACACIA_SLAB:
case ACACIA_STAIRS:
case ACACIA_TRAPDOOR:
case BEACON:
case BIRCH_DOOR:
case BIRCH_FENCE:
case BIRCH_FENCE_GATE:
case BIRCH_PLANKS:
case BIRCH_SLAB:
case BIRCH_STAIRS:
case BIRCH_TRAPDOOR:
case COAL_ORE:
case COCOA:
case CONDUIT:
case DARK_OAK_DOOR:
case DARK_OAK_FENCE:
case DARK_OAK_FENCE_GATE:
case DARK_OAK_PLANKS:
case DARK_OAK_SLAB:
case DARK_OAK_STAIRS:
case DARK_OAK_TRAPDOOR:
case DIAMOND_ORE:
case EMERALD_ORE:
case GOLD_ORE:
case IRON_ORE:
case JUNGLE_DOOR:
case JUNGLE_FENCE:
case JUNGLE_FENCE_GATE:
case JUNGLE_PLANKS:
case JUNGLE_SLAB:
case JUNGLE_STAIRS:
case JUNGLE_TRAPDOOR:
case LAPIS_BLOCK:
case LAPIS_ORE:
case NETHER_QUARTZ_ORE:
case OAK_DOOR:
case OAK_FENCE:
case OAK_FENCE_GATE:
case OAK_PLANKS:
case OAK_SLAB:
case OAK_STAIRS:
case OAK_TRAPDOOR:
case OBSERVER:
case REDSTONE_ORE:
case SPRUCE_DOOR:
case SPRUCE_FENCE:
case SPRUCE_FENCE_GATE:
case SPRUCE_PLANKS:
case SPRUCE_SLAB:
case SPRUCE_STAIRS:
case SPRUCE_TRAPDOOR:
return 3.0F;
case BLAST_FURNACE:
case DISPENSER:
case DROPPER:
case FURNACE:
case LANTERN:
case SMOKER:
case STONECUTTER:
return 3.5F;
case COBWEB:
return 4.0F;
case BLACK_TERRACOTTA:
case BLUE_TERRACOTTA:
case BROWN_TERRACOTTA:
case CYAN_TERRACOTTA:
case GRAY_TERRACOTTA:
case GREEN_TERRACOTTA:
case LIGHT_BLUE_TERRACOTTA:
case LIGHT_GRAY_TERRACOTTA:
case LIME_TERRACOTTA:
case MAGENTA_TERRACOTTA:
case ORANGE_TERRACOTTA:
case PINK_TERRACOTTA:
case PURPLE_TERRACOTTA:
case RED_TERRACOTTA:
case TERRACOTTA:
case WHITE_TERRACOTTA:
case YELLOW_TERRACOTTA:
return 4.2F;
case HOPPER:
return 4.8F;
case BELL:
case IRON_DOOR:
case IRON_TRAPDOOR:
case SPAWNER:
return 5.0F;
case ANDESITE:
case ANDESITE_SLAB:
case ANDESITE_STAIRS:
case ANDESITE_WALL:
case BRAIN_CORAL_BLOCK:
case BRICKS:
case BRICK_SLAB:
case BRICK_STAIRS:
case BRICK_WALL:
case BUBBLE_CORAL_BLOCK:
case CHISELED_STONE_BRICKS:
case COAL_BLOCK:
case COBBLESTONE:
case COBBLESTONE_SLAB:
case COBBLESTONE_STAIRS:
case COBBLESTONE_WALL:
case CRACKED_STONE_BRICKS:
case CUT_RED_SANDSTONE_SLAB:
case CUT_SANDSTONE_SLAB:
case DARK_PRISMARINE:
case DARK_PRISMARINE_SLAB:
case DARK_PRISMARINE_STAIRS:
case DEAD_BRAIN_CORAL_BLOCK:
case DEAD_BUBBLE_CORAL_BLOCK:
case DEAD_FIRE_CORAL_BLOCK:
case DEAD_HORN_CORAL_BLOCK:
case DEAD_TUBE_CORAL_BLOCK:
case DIAMOND_BLOCK:
case DIORITE:
case DIORITE_SLAB:
case DIORITE_STAIRS:
case DIORITE_WALL:
case EMERALD_BLOCK:
case FIRE_CORAL_BLOCK:
case GOLD_BLOCK:
case GRANITE:
case GRANITE_SLAB:
case GRANITE_STAIRS:
case GRANITE_WALL:
case GRINDSTONE:
case HORN_CORAL_BLOCK:
case IRON_BARS:
case IRON_BLOCK:
case JUKEBOX:
case MOSSY_COBBLESTONE:
case MOSSY_COBBLESTONE_SLAB:
case MOSSY_COBBLESTONE_STAIRS:
case MOSSY_COBBLESTONE_WALL:
case MOSSY_STONE_BRICKS:
case MOSSY_STONE_BRICK_SLAB:
case MOSSY_STONE_BRICK_STAIRS:
case MOSSY_STONE_BRICK_WALL:
case NETHER_BRICKS:
case NETHER_BRICK_FENCE:
case NETHER_BRICK_SLAB:
case NETHER_BRICK_STAIRS:
case NETHER_BRICK_WALL:
case PETRIFIED_OAK_SLAB:
case POLISHED_ANDESITE:
case POLISHED_ANDESITE_SLAB:
case POLISHED_ANDESITE_STAIRS:
case POLISHED_DIORITE:
case POLISHED_DIORITE_SLAB:
case POLISHED_DIORITE_STAIRS:
case POLISHED_GRANITE:
case POLISHED_GRANITE_SLAB:
case POLISHED_GRANITE_STAIRS:
case PRISMARINE:
case PRISMARINE_BRICKS:
case PRISMARINE_BRICK_SLAB:
case PRISMARINE_BRICK_STAIRS:
case PRISMARINE_SLAB:
case PRISMARINE_STAIRS:
case PRISMARINE_WALL:
case PURPUR_BLOCK:
case PURPUR_PILLAR:
case PURPUR_SLAB:
case PURPUR_STAIRS:
case QUARTZ_SLAB:
case REDSTONE_BLOCK:
case RED_NETHER_BRICKS:
case RED_NETHER_BRICK_SLAB:
case RED_NETHER_BRICK_STAIRS:
case RED_NETHER_BRICK_WALL:
case RED_SANDSTONE_SLAB:
case SANDSTONE_SLAB:
case SMOOTH_QUARTZ:
case SMOOTH_QUARTZ_SLAB:
case SMOOTH_QUARTZ_STAIRS:
case SMOOTH_RED_SANDSTONE:
case SMOOTH_RED_SANDSTONE_SLAB:
case SMOOTH_RED_SANDSTONE_STAIRS:
case SMOOTH_SANDSTONE:
case SMOOTH_SANDSTONE_SLAB:
case SMOOTH_SANDSTONE_STAIRS:
case SMOOTH_STONE:
case SMOOTH_STONE_SLAB:
case STONE:
case STONE_BRICKS:
case STONE_BRICK_SLAB:
case STONE_BRICK_STAIRS:
case STONE_BRICK_WALL:
case STONE_SLAB:
case STONE_STAIRS:
case TUBE_CORAL_BLOCK:
return 6.0F;
case DRAGON_EGG:
case END_STONE:
return 9.0F;
case LAVA:
case WATER:
return 100.0F;
case ENDER_CHEST:
return 600.0F;
case ANVIL:
case CHIPPED_ANVIL:
case DAMAGED_ANVIL:
case ENCHANTING_TABLE:
case OBSIDIAN:
return 1200.0F;
case BEDROCK:
case CHAIN_COMMAND_BLOCK:
case COMMAND_BLOCK:
case END_GATEWAY:
case END_PORTAL:
case END_PORTAL_FRAME:
case JIGSAW:
case REPEATING_COMMAND_BLOCK:
case STRUCTURE_BLOCK:
return 3600000.0F;
case BARRIER:
return 3600000.8F;
default:
return 0;
//
}
}
}