public final class Material
extends java.lang.Object
implements java.io.Serializable
Supports modern post-Minecraft 1.13 materials based on names and properties, as well as legacy pre-1.13 materials based on numerical IDs, and provides continuity between them.
Modifier and Type | Class and Description |
---|---|
static class |
Material.Identity
Note that an identity does not uniquely identify one material,
since it does not include the block ID and data value of legacy
materials, multiple ones of which map map to the same modern identity.
|
static class |
Material.PropertyDescriptor |
static class |
Material.PropertyType |
Modifier and Type | Field and Description |
---|---|
static Material |
ACACIA_FENCE |
static Material |
ACACIA_SAPLING |
static Property<java.lang.Integer> |
AGE |
boolean |
air
Whether the block is an air block.
|
static Material |
AIR |
static Material |
ALLIUM |
static Material |
ANCIENT_DEBRIS |
static Material |
ANDESITE |
static Property<java.lang.String> |
AXIS |
static Material |
AZALEA |
static Material |
AZURE_BLUET |
static Material |
BAMBOO_LARGE_LEAVES |
static Material |
BAMBOO_NO_LEAVES |
static Material |
BAMBOO_SMALL_LEAVES |
static Material |
BARRIER |
static Material |
BASALT |
static Material |
BED_FOOT |
static Material |
BED_HEAD |
static Material |
BEDROCK |
static Material |
BEETROOTS |
static Property<java.lang.Boolean> |
BERRIES |
static Material |
BIG_DRIPLEAF_SOUTH |
static Material |
BIG_DRIPLEAF_STEM_SOUTH |
static Material |
BIRCH_FENCE |
static Material |
BIRCH_SAPLING |
static Material |
BLACK_CLAY |
static Material |
BLACKSTONE |
int |
blockLight
The amount of blocklight emitted by this block.
|
int |
blockType
The legacy (pre-Minecraft 1.13) block ID of the material.
|
static Material |
BLUE_CLAY |
static Material |
BLUE_ORCHID |
static Material |
BRAIN_CORAL |
static Material |
BRAIN_CORAL_BLOCK |
static Material |
BRAIN_CORAL_FAN |
static Material |
BRAIN_CORAL_WALL_FAN |
static Material |
BRICK_STAIRS |
static Material |
BRICKS |
static Material |
BROWN_CLAY |
static Material |
BROWN_MUSHROOM |
static Material |
BUBBLE_CORAL |
static Material |
BUBBLE_CORAL_BLOCK |
static Material |
BUBBLE_CORAL_FAN |
static Material |
BUBBLE_CORAL_WALL_FAN |
static Material |
CACTUS |
static Material |
CALCITE |
boolean |
canSupportSnow
Whether snow may be placed on this block.
|
static Material |
CARROTS |
static Material |
CARVED_PUMPKIN_EAST_FACE |
static Material |
CARVED_PUMPKIN_NORTH_FACE |
static Material |
CARVED_PUMPKIN_SOUTH_FACE |
static Material |
CARVED_PUMPKIN_WEST_FACE |
int |
category
Type of block encoded in a single category
|
static int |
CATEGORY_AIR |
static int |
CATEGORY_FLUID |
static int |
CATEGORY_INSUBSTANTIAL |
static int |
CATEGORY_MAN_MADE |
static int |
CATEGORY_NATURAL_SOLID |
static int |
CATEGORY_RESOURCE |
static int |
CATEGORY_UNKNOWN |
static Material |
CAVE_AIR |
static Material |
CAVE_VINES_NO_BERRIES |
static Material |
CAVE_VINES_PLANT_NO_BERRIES |
static Material |
CHERRY_SAPLING |
static Material |
CHEST_EAST |
static Material |
CHEST_NORTH |
static Material |
CHEST_SOUTH |
static Material |
CHEST_WEST |
static Material |
CHORUS_FLOWER |
static Material |
CHORUS_PLANT |
static Material |
CLAY |
static Material |
COAL |
static Material |
COBBLESTONE |
static Material |
COBBLESTONE_SLAB |
static Material |
COBBLESTONE_STAIRS |
static Material |
COBBLESTONE_WALL |
static Material |
COBWEB |
static Material |
COCOA_PLANT |
static Material |
COCOA_PLANT_HALF_RIPE |
static Material |
COCOA_PLANT_RIPE |
int |
colour
The colour of this material as an
int in ARGB format. |
boolean |
connectingBlock
A connecting block has boolean west, north, east and south properties which should be set if the block in that
direction is the same type, or a solid and opaque block.
|
static Material |
COPPER_ORE |
static Material |
CORNFLOWER |
static Material |
CRIMSON_FUNGUS |
static Material |
CRIMSON_NYLIUM |
static Material |
CRIMSON_ROOTS |
static Material |
CYAN_CLAY |
static Material |
DANDELION |
static Material |
DARK_OAK_FENCE |
static Material |
DARK_OAK_SAPLING |
int |
data
The legacy (pre-Minecraft 1.13) data value of the material.
|
static Material |
DEAD_BRAIN_CORAL |
static Material |
DEAD_BRAIN_CORAL_BLOCK |
static Material |
DEAD_BRAIN_CORAL_FAN |
static Material |
DEAD_BRAIN_CORAL_WALL_FAN |
static Material |
DEAD_BUBBLE_CORAL |
static Material |
DEAD_BUBBLE_CORAL_BLOCK |
static Material |
DEAD_BUBBLE_CORAL_FAN |
static Material |
DEAD_BUBBLE_CORAL_WALL_FAN |
static Material |
DEAD_FIRE_CORAL |
static Material |
DEAD_FIRE_CORAL_BLOCK |
static Material |
DEAD_FIRE_CORAL_FAN |
static Material |
DEAD_FIRE_CORAL_WALL_FAN |
static Material |
DEAD_HORN_CORAL |
static Material |
DEAD_HORN_CORAL_BLOCK |
static Material |
DEAD_HORN_CORAL_FAN |
static Material |
DEAD_HORN_CORAL_WALL_FAN |
static Material |
DEAD_SHRUBS |
static Material |
DEAD_TUBE_CORAL |
static Material |
DEAD_TUBE_CORAL_BLOCK |
static Material |
DEAD_TUBE_CORAL_FAN |
static Material |
DEAD_TUBE_CORAL_WALL_FAN |
static Material |
DEEPSLATE_COAL_ORE |
static Material |
DEEPSLATE_COPPER_ORE |
static Material |
DEEPSLATE_DIAMOND_ORE |
static Material |
DEEPSLATE_EMERALD_ORE |
static Material |
DEEPSLATE_GOLD_ORE |
static Material |
DEEPSLATE_IRON_ORE |
static Material |
DEEPSLATE_LAPIS_ORE |
static java.util.Set<Material> |
DEEPSLATE_ORES |
static Material |
DEEPSLATE_REDSTONE_ORE |
static Material |
DEEPSLATE_X |
static Material |
DEEPSLATE_Y |
static Material |
DEEPSLATE_Z |
static Material |
DIAMOND_BLOCK |
static Material |
DIAMOND_ORE |
static Material |
DIORITE |
static Material |
DIRT |
static Material |
DIRT_PATH |
static Property<java.lang.Integer> |
DISTANCE |
static Material |
DOOR_CLOSED_LEFT_BOTTOM |
static Material |
DOOR_CLOSED_LEFT_TOP |
static Material |
DOOR_CLOSED_RIGHT_BOTTOM |
static Material |
DOOR_CLOSED_RIGHT_TOP |
static Material |
DOOR_OPEN_LEFT_BOTTOM |
static Material |
DOOR_OPEN_LEFT_TOP |
static Material |
DOOR_OPEN_RIGHT_BOTTOM |
static Material |
DOOR_OPEN_RIGHT_TOP |
static Property<java.lang.Boolean> |
DOWN |
static Material |
DRIPSTONE_BLOCK |
static Property<java.lang.Boolean> |
EAST |
static Material |
EMERALD_BLOCK |
static Material |
EMERALD_ORE |
boolean |
empty
Whether the block contains nothing physical and is fully transparent.
|
static Material |
END_STONE |
static Property<Direction> |
FACING |
static Material |
FALLING_LAVA
Lava that maps to falling, non-permanent lava in all Minecraft versions.
|
static Material |
FALLING_WATER
Water that maps to falling, non-permanent water in all Minecraft versions.
|
static Material |
FARMLAND |
static Material |
FENCE |
static Material |
FERN |
static Material |
FIRE |
static Material |
FIRE_CORAL |
static Material |
FIRE_CORAL_BLOCK |
static Material |
FIRE_CORAL_FAN |
static Material |
FIRE_CORAL_WALL_FAN |
static Property<java.lang.Integer> |
FLOWER_AMOUNT |
static Material |
FLOWERING_AZALEA |
static Material |
FLOWING_LAVA
Lava that maps to sideways flowing, non-permanent lava in all Minecraft versions.
|
static Material |
FLOWING_WATER
Water that maps to sideways flowing, non-permanent water in all Minecraft versions.
|
static Material |
FROSTED_ICE |
static Material |
GLASS |
static Material |
GLASS_PANE |
static Material |
GLOW_LICHEN_DOWN |
static Material |
GLOW_LICHEN_NONE
A
glow_lichen block with none of the directions enabled. |
static Material |
GLOW_LICHEN_UP |
static Material |
GLOWSTONE |
static Material |
GOLD_BLOCK |
static Material |
GOLD_ORE |
static Material |
GRANITE |
static Material |
GRASS |
static Material |
GRASS_BLOCK |
static Material |
GRASS_PATH |
static Material |
GRAVEL |
static Material |
GREEN_CLAY |
static Material |
GREY_CLAY |
static Property<java.lang.String> |
HALF |
static Material |
HANGING_ROOTS |
static Material |
HARDENED_CLAY |
boolean |
hasPropertySnowy
Whether the material has the property
snowy . |
static Property<java.lang.String> |
HINGE |
org.pepsoft.minecraft.HorizontalOrientationScheme[] |
horizontalOrientationSchemes
The horizontal orientation scheme(s) detected for this material, or
null if this material has no horizontal orientation, or one could
not be determined. |
static Material |
HORN_CORAL |
static Material |
HORN_CORAL_BLOCK |
static Material |
HORN_CORAL_FAN |
static Material |
HORN_CORAL_WALL_FAN |
static Material |
ICE |
Material.Identity |
identity
The modern identity of the material, excluding legacy block type and data value (meaning there may be multiple
Material s with the same identity . |
int |
index |
static Material |
INFESTED_DEEPSLATE |
static Material |
INFESTED_STONE |
boolean |
insubstantial
Whether the block is insubstantial, meaning that they are fully
transparent, not man-made, removing them would have no effect on the
surrounding blocks and be otherwise inconsequential.
|
static Material |
IRON_BARS |
static Material |
IRON_BLOCK |
static Material |
IRON_ORE |
static Material |
JACK_O_LANTERN_EAST_FACE |
static Material |
JACK_O_LANTERN_NORTH_FACE |
static Material |
JACK_O_LANTERN_SOUTH_FACE |
static Material |
JACK_O_LANTERN_WEST_FACE |
static Material |
JUNGLE_FENCE |
static Material |
JUNGLE_SAPLING |
static Material |
KELP
Kelp with age 0.
|
static Material |
KELP_PLANT |
static Material |
LADDER |
static Material |
LAPIS_LAZULI_BLOCK |
static Material |
LAPIS_LAZULI_ORE |
static Material |
LARGE_FERN_LOWER |
static Material |
LAVA
Lava that maps to flowing lava in Minecraft 1.12 and older.
|
static Property<java.lang.Integer> |
LAYERS |
boolean |
leafBlock
The material should be treated as a leaf block for the purposes of leaf decay calculations.
|
static Material |
LEAVES_ACACIA |
static Material |
LEAVES_BIRCH |
static Material |
LEAVES_CHERRY |
static Material |
LEAVES_DARK_OAK |
static Material |
LEAVES_JUNGLE |
static Material |
LEAVES_OAK |
static Material |
LEAVES_PINE |
static java.lang.String |
LEGACY |
static Property<java.lang.Integer> |
LEVEL |
static Material |
LIGHT
A dry light block with level 8.
|
static Material |
LIGHT_BLUE_CLAY |
static Material |
LIGHT_GREY_CLAY |
boolean |
lightSource
Whether the block is a source of blocklight (
blockLight > 0). |
static Material |
LILAC_LOWER |
static Material |
LILY_OF_THE_VALLEY |
static Material |
LILY_PAD |
static Material |
LIME_CLAY |
static Material |
MAGENTA_CLAY |
static Material |
MANGROVE_PROPAGULE |
static Material |
MELON |
static Material |
MELON_STEM |
static java.lang.String |
MINECRAFT |
boolean |
modded
Whether the material is vanilla or modded.
|
static Property<java.lang.Integer> |
MOISTURE |
static Material |
MOSS_BLOCK |
static Material |
MOSS_CARPET |
static Material |
MOSSY_COBBLESTONE |
static Material |
MUD |
static Material |
MYCELIUM |
java.lang.String |
name
The name of the block, including the namespace (if present; separated by a colon).
|
java.lang.String |
namespace
The namespace (i.e.
|
boolean |
natural
Whether the block can occur as part of a pristine Minecraft-generated
landscape, excluding artificial structures such as abandoned
mineshafts, villages, temples, strongholds, etc.
|
static Material |
NETHER_BRICK_FENCE |
static Material |
NETHER_GOLD_ORE |
static Material |
NETHER_SPROUTS |
static Material |
NETHER_WART |
static Material |
NETHERRACK |
static Property<java.lang.Boolean> |
NORTH |
static Material |
OAK_FENCE |
static Material |
OAK_SAPLING |
static Material |
OAK_SIGN |
static Material |
OBSIDIAN |
int |
opacity
How much light the block blocks from 0 (fully transparent) to 15 (fully
opaque).
|
boolean |
opaque
Whether the block is fully opaque (
opacity == 15) |
static Material |
ORANGE_CLAY |
static Material |
ORANGE_TULIP |
static Material |
OXEYE_DAISY |
static Material |
PACKED_ICE |
static Material |
PEONY_LOWER |
static Material |
PERMADIRT |
static Property<java.lang.Boolean> |
PERSISTENT |
static Property<java.lang.Integer> |
PICKLES |
static Material |
PINE_SAPLING |
static Material |
PINK_CLAY |
static Material |
PINK_PETALS_1 |
static Material |
PINK_TULIP |
static Material |
PITCHER_CROP_0_LOWER |
static Material |
PITCHER_PLANT_LOWER |
static Material |
PODZOL |
static Material |
POINTED_DRIPSTONE_DOWN_BASE |
static Material |
POINTED_DRIPSTONE_DOWN_FRUSTUM |
static Material |
POINTED_DRIPSTONE_DOWN_MIDDLE |
static Material |
POINTED_DRIPSTONE_DOWN_TIP |
static Material |
POINTED_DRIPSTONE_UP_BASE |
static Material |
POINTED_DRIPSTONE_UP_FRUSTUM |
static Material |
POINTED_DRIPSTONE_UP_MIDDLE |
static Material |
POINTED_DRIPSTONE_UP_TIP |
static Material |
POTATOES |
java.util.SortedMap<java.lang.String,Material.PropertyDescriptor> |
propertyDescriptors
Descriptors of all the properties this type of material has, regardless of whether they are set on the current
instance, sorted by their name.
|
static Material |
PUMPKIN |
static Material |
PUMPKIN_NO_FACE
Deprecated.
|
static Material |
PUMPKIN_STEM
A pumpkin stem without direction; set the facing property before use.
|
static Material |
PURPLE_CLAY |
static Material |
QUARTZ_ORE |
boolean |
receivesLight
Whether the block receives light unto itself, despite being opaque to surrounding blocks.
|
static Material |
RED_CLAY |
static Material |
RED_MUSHROOM |
static Material |
RED_SAND |
static Material |
RED_SANDSTONE |
static Material |
RED_TULIP |
static Material |
REDSTONE_ORE |
boolean |
resource
Whether the block is a mineable ore or resource.
|
static Material |
ROOTED_DIRT |
static Material |
ROSE |
static Material |
ROSE_BUSH_LOWER |
static Property<java.lang.Integer> |
ROTATION |
static Material |
SAND |
static Material |
SANDSTONE |
static Material |
SEA_PICKLE_1
One sea pickle.
|
static Material |
SEAGRASS |
static Property<java.lang.String> |
SHAPE |
java.lang.String |
simpleName
The simple name (excluding the namespace, i.e.
|
static Material |
SMALL_DRIPLEAF_SOUTH_LOWER |
static Material |
SNOW |
static Material |
SNOW_BLOCK |
static Material |
SNOW_EIGHT_LAYERS |
static Property<java.lang.Boolean> |
SNOWY |
boolean |
solid
Whether the block is solid (meaning not
insubstantial or
veryInsubstantial ). |
static Material |
SOUL_SAND |
static Material |
SOUL_SOIL |
static Property<java.lang.Boolean> |
SOUTH |
static Material |
SPORE_BLOSSOM |
static Material |
SPRUCE_FENCE |
static Material |
STATIONARY_LAVA
Lava that maps to stationary lava in Minecraft 1.12 and older.
|
static Material |
STATIONARY_WATER
Water that maps to stationary water in Minecraft 1.12 and older.
|
static Material |
STONE |
static Material |
STONE_BRICK_STAIRS |
static Material |
STONE_BRICKS |
static java.util.Set<Material> |
STONE_ORES |
static Material |
SUGAR_CANE |
static Material |
SUNFLOWER_LOWER |
boolean |
sustainsLeaves
Whether the material should keep connected leaf blocks from decaying for the purposes of leaf decay calculations.
|
static Material |
SWEET_BERRY_BUSH
Sweet Berry Bush with age 0.
|
static Material |
TALL_GRASS_LOWER |
static Material |
TALL_SEAGRASS_LOWER |
static Material |
TERRACOTTA |
boolean |
terrain
Whether the block is part of Minecraft-generated natural ground; more
specifically whether the block type should be assigned a terrain type
when importing a Minecraft map.
|
static java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
TILE_ENTITY_MAP
A map of modern tile entity IDs mapped to the modern block IDs they are associated with.
|
boolean |
tileEntity
Whether the block is a tile entity.
|
java.lang.String |
tileEntityId
If
tileEntity , the name of the tile entity. |
static Material |
TORCH |
static Material |
TORCHFLOWER |
static Material |
TORCHFLOWER_CROP |
boolean |
translucent
Whether the block is translucent (
opacity < 15) |
boolean |
transparent
Whether the block is fully transparent (
opacity == 0) |
static Material |
TRAPDOOR |
boolean |
treeRelated
Whether the block is part of or attached to naturally occurring
trees or giant mushrooms.
|
static Material |
TUBE_CORAL |
static Material |
TUBE_CORAL_BLOCK |
static Material |
TUBE_CORAL_FAN |
static Material |
TUBE_CORAL_WALL_FAN |
static Material |
TUFF |
static Material |
TWISTING_VINES_25 |
static Material |
TWISTING_VINES_PLANT |
static Property<java.lang.String> |
TYPE |
static Property<java.lang.Boolean> |
UP |
boolean |
vegetation
Whether the block is a plant.
|
static Property<java.lang.String> |
VERTICAL_DIRECTION |
org.pepsoft.minecraft.VerticalOrientationScheme |
verticalOrientationScheme
The vertical orientation scheme detected for this material, or
null if this material has no vertical orientation, or one could
not be determined. |
boolean |
veryInsubstantial
Whether the block is even more insubstantial.
|
static Material |
VINE
A vine with no directions turned on, which is not a valid block in
Minecraft, so you must set at least one direction.
|
static Material |
WALL_SIGN |
static Material |
WARPED_FUNGUS |
static Material |
WARPED_NYLIUM |
static Material |
WARPED_ROOTS |
static Material |
WATER
Water that maps to flowing water in Minecraft 1.12 and older.
|
static Property<java.lang.Boolean> |
WATERLOGGED |
boolean |
watery
Whether the block always contains water (and can therefore only exist
"under water") rather than having a waterlogged property.
|
static Material |
WEEPING_VINES |
static Material |
WEEPING_VINES_PLANT |
static Property<java.lang.Boolean> |
WEST |
static Material |
WHEAT |
static Material |
WHITE_CLAY |
static Material |
WHITE_TULIP |
static Material |
WITHER_ROSE |
static Material |
WOOD_ACACIA |
static Material |
WOOD_BIRCH |
static Material |
WOOD_DARK_OAK |
static Material |
WOOD_JUNGLE |
static Material |
WOOD_OAK |
static Material |
WOOD_PINE |
static Material |
WOODEN_PLANK_ACACIA |
static Material |
WOODEN_PLANK_BIRCH |
static Material |
WOODEN_PLANK_DARK_WOOD |
static Material |
WOODEN_PLANK_JUNGLE |
static Material |
WOODEN_PLANK_OAK |
static Material |
WOODEN_PLANK_PINE |
static Material |
WOODEN_STAIRS |
static Material |
WOOL_BLACK |
static Material |
WOOL_BLUE |
static Material |
WOOL_BROWN |
static Material |
WOOL_CYAN |
static Material |
WOOL_GREEN |
static Material |
WOOL_GREY |
static Material |
WOOL_LIGHT_BLUE |
static Material |
WOOL_LIGHT_GREY |
static Material |
WOOL_LIME |
static Material |
WOOL_MAGENTA |
static Material |
WOOL_ORANGE |
static Material |
WOOL_PINK |
static Material |
WOOL_PURPLE |
static Material |
WOOL_RED |
static Material |
WOOL_WHITE |
static Material |
WOOL_YELLOW |
static Material[] |
WOOLS
All the colour wools, indexed by the
DATA_* colour data constants (which correspond to the legacy data
values for the wool block). |
static Material |
YELLOW_CLAY |
Modifier and Type | Method and Description |
---|---|
boolean |
containsWater()
Indicate whether the block is filled with water (in addition to whatever else may be there), excepting flowing
water.
|
boolean |
equals(java.lang.Object o) |
static Material |
get(int blockType)
Get a legacy (pre-1.13) material by block ID.
|
static Material |
get(int blockType,
int data)
Get a legacy (pre-1.13) material by block ID and data value.
|
static Material |
get(Material.Identity identity)
Get the single instance of the material with the given identity.
|
static Material |
get(java.lang.String name,
java.util.Map<java.lang.String,java.lang.String> properties)
Get the single instance of the material with the given name and
properties.
|
static Material |
get(java.lang.String name,
java.lang.Object... properties)
Get the single instance of the material with the given name and
properties.
|
static java.util.Collection<Material> |
getAllMaterials()
Get all realised materials.
|
static java.util.Set<java.lang.String> |
getAllNames()
Get the fully qualified names of all realised materials.
|
static java.util.Set<java.lang.String> |
getAllNamespaces()
Get all known namespaces.
|
static java.util.Set<java.lang.String> |
getAllSimpleNamesForNamespace(java.lang.String namespace)
Get all known names for a specific namespace.
|
static Material |
getByCombinedIndex(int index)
Get a legacy (pre-1.13) material corresponding to a combined index
consisting of the block ID shifted left four bits and or-ed with the data
value.
|
Direction |
getDirection()
Get the cardinal direction this block is pointing, if applicable.
|
java.util.Map<java.lang.String,java.lang.String> |
getProperties()
Get the properties of this material.
|
<T> T |
getProperty(Property<T> property)
Get the value of a property as the correct type.
|
<T> T |
getProperty(Property<T> property,
T defaultValue)
Get the value of a property as the correct type, or a default value if
the property is not set on the material.
|
java.lang.String |
getProperty(java.lang.String name)
Get the value of a property as a string.
|
static Material |
getPrototype(java.lang.String name)
Get a prototype of a known material by name.
|
static java.util.Set<java.util.Map<java.lang.String,java.lang.Object>> |
getSpecs(java.lang.String name)
Get the specs for a known material.
|
static int |
guessOpacity(java.lang.String name) |
static boolean |
guessReceivesLight(java.lang.String name) |
static boolean |
guessResource(java.lang.String name) |
static boolean |
guessTreeRelated(java.lang.String name) |
int |
hashCode() |
boolean |
hasProperties(java.lang.String... names)
Indicates whether one or more specific properties are all present on this type of material, regardless of whether
they are set on the current instance.
|
boolean |
hasProperty(Property<?> property)
Indicates whether a specific property is present on this type of material, regardless of whether it is set on the
current instance.
|
boolean |
hasProperty(java.lang.String name)
Indicates whether a specific property is present on this type of material, regardless of whether it is set on the
current instance.
|
Material |
invert(Platform platform)
Gets a vertically mirrored version of the material.
|
boolean |
is(Property<java.lang.Boolean> property)
Convenience method to check whether a boolean-typed property is present
and set.
|
boolean |
isNamed(java.lang.String name)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedOneOf(java.util.Collection<java.lang.String> names)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedOneOf(java.lang.String... names)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedOneOf(java.lang.String name1,
java.lang.String name2)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedOneOf(java.lang.String name1,
java.lang.String name2,
java.lang.String name3)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedOneOf(java.lang.String name1,
java.lang.String name2,
java.lang.String name3,
java.lang.String name4)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedOneOf(java.lang.String name1,
java.lang.String name2,
java.lang.String name3,
java.lang.String name4,
java.lang.String name5)
Compare the material in name only, disregarding its properties.
|
boolean |
isNamedSameAs(Material material)
Compare two materials in name only, disregarding their properties.
|
boolean |
isNotNamed(java.lang.String name)
Compare the material in name only, disregarding its properties.
|
boolean |
isNotNamedOneOf(java.lang.String... names)
Compare the material in name only, disregarding its properties.
|
boolean |
isNotNamedSameAs(Material material)
Compare two materials in name only, disregarding their properties.
|
boolean |
isPropertySet(java.lang.String name)
Indicates whether a specific property is currently set on this material.
|
Material |
mirror(Direction axis,
Platform platform)
If applicable, return a Material that is the mirror image of this one in
a specific axis.
|
Material |
rotate(int steps,
Platform platform)
If applicable, return a Material that is rotated a specific number of
quarter turns.
|
Material |
setDirection(Direction direction)
Get a material that is pointing in the specified direction, if applicable
for the block type.
|
java.lang.String |
toFullString()
Get the full, non abreviated identity of this material as a string.
|
java.lang.String |
toLegacyString()
For legacy materials (pre-1.13; with a numerical block ID), get the
legacy style block name for this material.
|
java.lang.String |
toString()
Get the modern style (name and property-based) name of this material.
|
Material |
withoutProperty(java.lang.String name)
Returns a material identical to this one, except with the specified property removed.
|
Material |
withProperties(java.lang.String name1,
java.lang.String value1,
java.lang.String name2,
java.lang.String value2,
java.lang.String name3,
java.lang.String value3,
java.lang.String name4,
java.lang.String value4)
Returns a material identical to this one, except with the specified
properties set to the specified values.
|
<T> Material |
withProperty(Property<T> property,
T value)
Returns a material identical to this one, except with the specified
property set to the specified value.
|
Material |
withProperty(java.lang.String name,
java.lang.String value)
Returns a material identical to this one, except with the specified
property set to the specified value.
|
public final transient boolean air
public final transient int opacity
public final transient java.lang.String name
==
operator may be used to make comparisons against it.public final transient boolean transparent
opacity
== 0)public final transient boolean translucent
opacity
< 15)public final transient boolean opaque
opacity
== 15)public final transient boolean receivesLight
public final transient boolean terrain
public final transient boolean insubstantial
public final transient boolean veryInsubstantial
insubstantial
and adds air, water, lava and leaves.public final transient boolean solid
insubstantial
or
veryInsubstantial
).public final transient boolean resource
public final transient boolean tileEntity
public final transient java.lang.String tileEntityId
tileEntity
, the name of the tile entity.public final transient boolean treeRelated
public final transient boolean vegetation
treeRelated
blocks.public final transient int blockLight
public final transient boolean lightSource
blockLight
> 0).public final transient boolean natural
public final transient boolean watery
public final transient boolean empty
public final transient org.pepsoft.minecraft.HorizontalOrientationScheme[] horizontalOrientationSchemes
null
if this material has no horizontal orientation, or one could
not be determined.public final transient org.pepsoft.minecraft.VerticalOrientationScheme verticalOrientationScheme
null
if this material has no vertical orientation, or one could
not be determined.public final transient int category
public final int blockType
public final int data
public final transient int index
public final transient java.lang.String simpleName
==
operator may be used to make comparisons against it.public final transient java.lang.String namespace
==
operator may be used to make comparisons against it.public final transient boolean canSupportSnow
public final transient int colour
int
in ARGB format.public final transient java.util.SortedMap<java.lang.String,Material.PropertyDescriptor> propertyDescriptors
public final transient boolean modded
minecraft
.public final transient boolean leafBlock
public final transient boolean sustainsLeaves
public final transient boolean connectingBlock
public final transient boolean hasPropertySnowy
snowy
.public final Material.Identity identity
Material
s with the same identity
.public static final java.lang.String MINECRAFT
public static final java.lang.String LEGACY
public static final Material AIR
public static final Material DANDELION
public static final Material ROSE
public static final Material GRASS_BLOCK
public static final Material DIRT
public static final Material STONE
public static final Material GRANITE
public static final Material DIORITE
public static final Material ANDESITE
public static final Material COBBLESTONE
public static final Material SNOW
public static final Material SNOW_EIGHT_LAYERS
public static final Material DEAD_SHRUBS
public static final Material CACTUS
public static final Material SAND
public static final Material FIRE
public static final Material GLOWSTONE
public static final Material SOUL_SAND
public static final Material LAVA
public static final Material NETHERRACK
public static final Material END_STONE
public static final Material CHORUS_PLANT
public static final Material COAL
public static final Material GRAVEL
public static final Material REDSTONE_ORE
public static final Material IRON_ORE
public static final Material WATER
public static final Material GOLD_ORE
public static final Material LAPIS_LAZULI_ORE
public static final Material DIAMOND_ORE
public static final Material BEDROCK
public static final Material STATIONARY_WATER
public static final Material STATIONARY_LAVA
public static final Material SNOW_BLOCK
public static final Material SANDSTONE
public static final Material CLAY
public static final Material MOSSY_COBBLESTONE
public static final Material OBSIDIAN
public static final Material FENCE
public static final Material GLASS_PANE
public static final Material STONE_BRICKS
public static final Material BRICKS
public static final Material COBWEB
public static final Material DIAMOND_BLOCK
public static final Material GOLD_BLOCK
public static final Material IRON_BLOCK
public static final Material LAPIS_LAZULI_BLOCK
public static final Material MYCELIUM
public static final Material FARMLAND
public static final Material ICE
public static final Material FROSTED_ICE
public static final Material PACKED_ICE
public static final Material TORCH
public static final Material COBBLESTONE_STAIRS
public static final Material GLASS
public static final Material WOODEN_STAIRS
public static final Material CHEST_NORTH
public static final Material CHEST_SOUTH
public static final Material CHEST_WEST
public static final Material CHEST_EAST
public static final Material WALL_SIGN
public static final Material BRICK_STAIRS
public static final Material STONE_BRICK_STAIRS
public static final Material LADDER
public static final Material TRAPDOOR
public static final Material WHEAT
public static final Material LILY_PAD
public static final Material RED_MUSHROOM
public static final Material BROWN_MUSHROOM
public static final Material SUGAR_CANE
public static final Material EMERALD_ORE
public static final Material EMERALD_BLOCK
public static final Material PERMADIRT
public static final Material PODZOL
public static final Material RED_SAND
public static final Material HARDENED_CLAY
public static final Material WHITE_CLAY
public static final Material ORANGE_CLAY
public static final Material MAGENTA_CLAY
public static final Material LIGHT_BLUE_CLAY
public static final Material YELLOW_CLAY
public static final Material LIME_CLAY
public static final Material PINK_CLAY
public static final Material GREY_CLAY
public static final Material LIGHT_GREY_CLAY
public static final Material CYAN_CLAY
public static final Material PURPLE_CLAY
public static final Material BLUE_CLAY
public static final Material BROWN_CLAY
public static final Material GREEN_CLAY
public static final Material RED_CLAY
public static final Material BLACK_CLAY
public static final Material RED_SANDSTONE
public static final Material QUARTZ_ORE
public static final Material GRASS
public static final Material FERN
public static final Material WOOD_OAK
public static final Material WOOD_BIRCH
public static final Material WOOD_PINE
public static final Material WOOD_JUNGLE
public static final Material WOOD_ACACIA
public static final Material WOOD_DARK_OAK
public static final Material LEAVES_OAK
public static final Material LEAVES_BIRCH
public static final Material LEAVES_PINE
public static final Material LEAVES_JUNGLE
public static final Material LEAVES_ACACIA
public static final Material LEAVES_DARK_OAK
public static final Material WOODEN_PLANK_OAK
public static final Material WOODEN_PLANK_BIRCH
public static final Material WOODEN_PLANK_PINE
public static final Material WOODEN_PLANK_JUNGLE
public static final Material WOODEN_PLANK_ACACIA
public static final Material WOODEN_PLANK_DARK_WOOD
public static final Material WOOL_WHITE
public static final Material WOOL_ORANGE
public static final Material WOOL_MAGENTA
public static final Material WOOL_LIGHT_BLUE
public static final Material WOOL_YELLOW
public static final Material WOOL_LIME
public static final Material WOOL_PINK
public static final Material WOOL_GREY
public static final Material WOOL_LIGHT_GREY
public static final Material WOOL_CYAN
public static final Material WOOL_PURPLE
public static final Material WOOL_BLUE
public static final Material WOOL_BROWN
public static final Material WOOL_GREEN
public static final Material WOOL_RED
public static final Material WOOL_BLACK
public static final Material[] WOOLS
DATA_*
colour data constants (which correspond to the legacy data
values for the wool block).
PLEASE NOTE: Annotations
layer values do not correspond to indices into this
array!
public static final Material COBBLESTONE_SLAB
public static final Material DOOR_OPEN_LEFT_BOTTOM
public static final Material DOOR_OPEN_LEFT_TOP
public static final Material DOOR_OPEN_RIGHT_BOTTOM
public static final Material DOOR_OPEN_RIGHT_TOP
public static final Material DOOR_CLOSED_LEFT_BOTTOM
public static final Material DOOR_CLOSED_LEFT_TOP
public static final Material DOOR_CLOSED_RIGHT_BOTTOM
public static final Material DOOR_CLOSED_RIGHT_TOP
public static final Material BED_FOOT
public static final Material BED_HEAD
public static final Material COCOA_PLANT
public static final Material COCOA_PLANT_HALF_RIPE
public static final Material COCOA_PLANT_RIPE
@Deprecated public static final Material PUMPKIN_NO_FACE
public static final Material CARVED_PUMPKIN_NORTH_FACE
public static final Material CARVED_PUMPKIN_EAST_FACE
public static final Material CARVED_PUMPKIN_SOUTH_FACE
public static final Material CARVED_PUMPKIN_WEST_FACE
public static final Material MELON
public static final Material JACK_O_LANTERN_NORTH_FACE
public static final Material JACK_O_LANTERN_EAST_FACE
public static final Material JACK_O_LANTERN_SOUTH_FACE
public static final Material JACK_O_LANTERN_WEST_FACE
public static final Material FLOWING_LAVA
public static final Material FLOWING_WATER
public static final Material FALLING_LAVA
public static final Material FALLING_WATER
public static final Property<java.lang.Boolean> SNOWY
public static final Property<java.lang.Boolean> NORTH
public static final Property<java.lang.Boolean> EAST
public static final Property<java.lang.Boolean> SOUTH
public static final Property<java.lang.Boolean> WEST
public static final Property<java.lang.Boolean> UP
public static final Property<java.lang.Boolean> DOWN
public static final Property<java.lang.Integer> LAYERS
public static final Property<java.lang.String> HALF
public static final Property<java.lang.Integer> LEVEL
public static final Property<java.lang.Boolean> WATERLOGGED
public static final Property<java.lang.Integer> AGE
public static final Property<java.lang.Boolean> PERSISTENT
public static final Property<java.lang.String> AXIS
public static final Property<java.lang.String> TYPE
public static final Property<java.lang.Integer> PICKLES
public static final Property<java.lang.Integer> MOISTURE
public static final Property<java.lang.Integer> ROTATION
public static final Property<java.lang.String> SHAPE
public static final Property<java.lang.String> HINGE
public static final Property<java.lang.Boolean> BERRIES
public static final Property<java.lang.Integer> DISTANCE
public static final Property<java.lang.String> VERTICAL_DIRECTION
public static final Property<java.lang.Integer> FLOWER_AMOUNT
public static final Material VINE
public static final Material TERRACOTTA
public static final Material BLUE_ORCHID
public static final Material ALLIUM
public static final Material AZURE_BLUET
public static final Material RED_TULIP
public static final Material ORANGE_TULIP
public static final Material WHITE_TULIP
public static final Material PINK_TULIP
public static final Material OXEYE_DAISY
public static final Material SUNFLOWER_LOWER
public static final Material LILAC_LOWER
public static final Material TALL_GRASS_LOWER
public static final Material LARGE_FERN_LOWER
public static final Material ROSE_BUSH_LOWER
public static final Material PEONY_LOWER
public static final Material OAK_SAPLING
public static final Material DARK_OAK_SAPLING
public static final Material PINE_SAPLING
public static final Material BIRCH_SAPLING
public static final Material JUNGLE_SAPLING
public static final Material ACACIA_SAPLING
public static final Material CARROTS
public static final Material POTATOES
public static final Material PUMPKIN_STEM
public static final Material MELON_STEM
public static final Material BEETROOTS
public static final Material NETHER_WART
public static final Material CHORUS_FLOWER
public static final Material OAK_FENCE
public static final Material NETHER_BRICK_FENCE
public static final Material SPRUCE_FENCE
public static final Material BIRCH_FENCE
public static final Material JUNGLE_FENCE
public static final Material DARK_OAK_FENCE
public static final Material ACACIA_FENCE
public static final Material COBBLESTONE_WALL
public static final Material IRON_BARS
public static final Material TUBE_CORAL
public static final Material BRAIN_CORAL
public static final Material BUBBLE_CORAL
public static final Material FIRE_CORAL
public static final Material HORN_CORAL
public static final Material DEAD_TUBE_CORAL
public static final Material DEAD_BRAIN_CORAL
public static final Material DEAD_BUBBLE_CORAL
public static final Material DEAD_FIRE_CORAL
public static final Material DEAD_HORN_CORAL
public static final Material TUBE_CORAL_BLOCK
public static final Material BRAIN_CORAL_BLOCK
public static final Material BUBBLE_CORAL_BLOCK
public static final Material FIRE_CORAL_BLOCK
public static final Material HORN_CORAL_BLOCK
public static final Material DEAD_TUBE_CORAL_BLOCK
public static final Material DEAD_BRAIN_CORAL_BLOCK
public static final Material DEAD_BUBBLE_CORAL_BLOCK
public static final Material DEAD_FIRE_CORAL_BLOCK
public static final Material DEAD_HORN_CORAL_BLOCK
public static final Material TUBE_CORAL_FAN
public static final Material BRAIN_CORAL_FAN
public static final Material BUBBLE_CORAL_FAN
public static final Material FIRE_CORAL_FAN
public static final Material HORN_CORAL_FAN
public static final Material DEAD_TUBE_CORAL_FAN
public static final Material DEAD_BRAIN_CORAL_FAN
public static final Material DEAD_BUBBLE_CORAL_FAN
public static final Material DEAD_FIRE_CORAL_FAN
public static final Material DEAD_HORN_CORAL_FAN
public static final Material TUBE_CORAL_WALL_FAN
public static final Material BRAIN_CORAL_WALL_FAN
public static final Material BUBBLE_CORAL_WALL_FAN
public static final Material FIRE_CORAL_WALL_FAN
public static final Material HORN_CORAL_WALL_FAN
public static final Material DEAD_TUBE_CORAL_WALL_FAN
public static final Material DEAD_BRAIN_CORAL_WALL_FAN
public static final Material DEAD_BUBBLE_CORAL_WALL_FAN
public static final Material DEAD_FIRE_CORAL_WALL_FAN
public static final Material DEAD_HORN_CORAL_WALL_FAN
public static final Material KELP
public static final Material KELP_PLANT
public static final Material SEAGRASS
public static final Material TALL_SEAGRASS_LOWER
public static final Material SEA_PICKLE_1
public static final Material CORNFLOWER
public static final Material LILY_OF_THE_VALLEY
public static final Material WITHER_ROSE
public static final Material SWEET_BERRY_BUSH
public static final Material OAK_SIGN
public static final Material DEEPSLATE_X
public static final Material DEEPSLATE_Y
public static final Material DEEPSLATE_Z
public static final Material DEEPSLATE_COAL_ORE
public static final Material DEEPSLATE_COPPER_ORE
public static final Material DEEPSLATE_LAPIS_ORE
public static final Material DEEPSLATE_IRON_ORE
public static final Material DEEPSLATE_GOLD_ORE
public static final Material DEEPSLATE_REDSTONE_ORE
public static final Material DEEPSLATE_DIAMOND_ORE
public static final Material DEEPSLATE_EMERALD_ORE
public static final Material TUFF
public static final Material COPPER_ORE
public static final Material NETHER_GOLD_ORE
public static final Material ANCIENT_DEBRIS
public static final Material BASALT
public static final Material BLACKSTONE
public static final Material SOUL_SOIL
public static final Material GRASS_PATH
public static final Material DIRT_PATH
public static final Material WARPED_NYLIUM
public static final Material CRIMSON_NYLIUM
public static final Material ROOTED_DIRT
public static final Material INFESTED_DEEPSLATE
public static final Material BAMBOO_NO_LEAVES
public static final Material BAMBOO_SMALL_LEAVES
public static final Material BAMBOO_LARGE_LEAVES
public static final Material AZALEA
public static final Material FLOWERING_AZALEA
public static final Material CRIMSON_FUNGUS
public static final Material WARPED_FUNGUS
public static final Material CRIMSON_ROOTS
public static final Material WARPED_ROOTS
public static final Material NETHER_SPROUTS
public static final Material TWISTING_VINES_PLANT
public static final Material TWISTING_VINES_25
public static final Material GLOW_LICHEN_NONE
glow_lichen
block with none of the directions enabled. This is not a valid block; you must
enable at least one direction.public static final Material GLOW_LICHEN_DOWN
public static final Material GLOW_LICHEN_UP
public static final Material MOSS_CARPET
public static final Material BIG_DRIPLEAF_STEM_SOUTH
public static final Material BIG_DRIPLEAF_SOUTH
public static final Material PUMPKIN
public static final Material CALCITE
public static final Material SPORE_BLOSSOM
public static final Material WEEPING_VINES
public static final Material WEEPING_VINES_PLANT
public static final Material HANGING_ROOTS
public static final Material CAVE_VINES_NO_BERRIES
public static final Material CAVE_VINES_PLANT_NO_BERRIES
public static final Material SMALL_DRIPLEAF_SOUTH_LOWER
public static final Material BARRIER
public static final Material POINTED_DRIPSTONE_UP_TIP
public static final Material POINTED_DRIPSTONE_UP_FRUSTUM
public static final Material POINTED_DRIPSTONE_UP_MIDDLE
public static final Material POINTED_DRIPSTONE_UP_BASE
public static final Material POINTED_DRIPSTONE_DOWN_TIP
public static final Material POINTED_DRIPSTONE_DOWN_FRUSTUM
public static final Material POINTED_DRIPSTONE_DOWN_MIDDLE
public static final Material POINTED_DRIPSTONE_DOWN_BASE
public static final Material MOSS_BLOCK
public static final Material DRIPSTONE_BLOCK
public static final Material MUD
public static final Material INFESTED_STONE
public static final Material MANGROVE_PROPAGULE
public static final Material CHERRY_SAPLING
public static final Material PINK_PETALS_1
public static final Material PITCHER_CROP_0_LOWER
public static final Material PITCHER_PLANT_LOWER
public static final Material TORCHFLOWER_CROP
public static final Material TORCHFLOWER
public static final Material LEAVES_CHERRY
public static final Material LIGHT
public static final Material CAVE_AIR
public static final int CATEGORY_AIR
public static final int CATEGORY_FLUID
public static final int CATEGORY_INSUBSTANTIAL
public static final int CATEGORY_MAN_MADE
public static final int CATEGORY_RESOURCE
public static final int CATEGORY_NATURAL_SOLID
public static final int CATEGORY_UNKNOWN
public static final java.util.Set<Material> STONE_ORES
public static final java.util.Set<Material> DEEPSLATE_ORES
public static final java.util.Map<java.lang.String,java.util.Set<java.lang.String>> TILE_ENTITY_MAP
public java.util.Map<java.lang.String,java.lang.String> getProperties()
null
.public boolean hasProperty(Property<?> property)
property
- The property to check for presence.true
if the specified property is present on this type of material.public <T> T getProperty(Property<T> property)
Property
helper class.T
- The property type.property
- The property helper corresponding to the property of
which to get the value.null
if the property is not set.public <T> T getProperty(Property<T> property, T defaultValue)
Property
helper class.T
- The property type.property
- The property helper corresponding to the property of
which to get the value.defaultValue
- The default value to return if the specified property
is not set on the material.defaultValue
if the property is not set.public boolean is(Property<java.lang.Boolean> property)
property
- The property to check for.true
if the property is present and set to
true
.public <T> Material withProperty(Property<T> property, T value)
property
- The property that should be set.value
- The value to which it should be set.public boolean hasProperty(java.lang.String name)
name
- The name of the property to check for presence.true
if the specified property is present on this type of material.public boolean hasProperties(java.lang.String... names)
names
- The names of the property to check for presence.true
if the specified properties are all present on this type of material.public boolean isPropertySet(java.lang.String name)
name
- The name of the property to check for presence.true
if the specified property is currently set on this material.public java.lang.String getProperty(java.lang.String name)
name
- The name of the property of which to get the value.public Material withProperty(java.lang.String name, java.lang.String value)
name
- The name of the property that should be set.value
- The value to which it should be set.public Material withoutProperty(java.lang.String name)
name
- The name of the property that should be removed.public Material withProperties(java.lang.String name1, java.lang.String value1, java.lang.String name2, java.lang.String value2, java.lang.String name3, java.lang.String value3, java.lang.String name4, java.lang.String value4)
name1
- The name of the first property that should be set.value1
- The value to which the first property should be set.name2
- The name of the second property that should be set.value2
- The value to which the second property should be set.name3
- The name of the third property that should be set.value3
- The value to which the third property should be set.name4
- The name of the fourth property that should be set.value4
- The value to which the fourth property should be set.public Direction getDirection()
null
if it has no direction, or is not pointing in a
cardinal direction (but for instance up or down)public Material setDirection(Direction direction)
direction
- The direction in which the returned material should
pointjava.lang.IllegalArgumentException
- If this block type does not have the
concept of directionpublic Material rotate(int steps, Platform platform)
steps
- The number of 90 degree turns to turn the material clockwise
(when viewed from above). May be negative to turn the
material anti clockwiseplatform
- The platform for which to perform the transformation.
This ensures that only materials compatible with the
specified platform will be returned, and may mean that
the transformation is not performed to avoid returning an
incompatible material.public Material mirror(Direction axis, Platform platform)
axis
- Indicates the axis in which to mirror the material.platform
- The platform for which to perform the transformation.
This ensures that only materials compatible with the
specified platform will be returned, and may mean that
the transformation is not performed to avoid returning an
incompatible material.public Material invert(Platform platform)
platform
- The platform for which to perform the transformation.
This ensures that only materials compatible with the
specified platform will be returned, and may mean that
the transformation is not performed to avoid returning an
incompatible material.public boolean isNamed(java.lang.String name)
name
- The name to test this material for.true
if the material has the specified name.public boolean isNamedOneOf(java.lang.String name1, java.lang.String name2)
name1
- One name to test this material for.name2
- Another name to test this material for.true
if the material has one of the specified names.public boolean isNamedOneOf(java.lang.String name1, java.lang.String name2, java.lang.String name3)
name1
- One name to test this material for.name2
- Another name to test this material for.name3
- Another name to test this material for.true
if the material has one of the specified names.public boolean isNamedOneOf(java.lang.String name1, java.lang.String name2, java.lang.String name3, java.lang.String name4)
name1
- One name to test this material for.name2
- Another name to test this material for.name3
- Another name to test this material for.name4
- Another name to test this material for.true
if the material has one of the specified names.public boolean isNamedOneOf(java.lang.String name1, java.lang.String name2, java.lang.String name3, java.lang.String name4, java.lang.String name5)
name1
- One name to test this material for.name2
- Another name to test this material for.name3
- Another name to test this material for.name4
- Another name to test this material for.name5
- Another name to test this material for.true
if the material has one of the specified names.public boolean isNamedOneOf(java.lang.String... names)
names
- The names to test this material for.true
if the material has one of the specified names.public boolean isNamedOneOf(java.util.Collection<java.lang.String> names)
names
- The names to test this material for.true
if the material has one of the specified names.public boolean isNotNamed(java.lang.String name)
name
- The name to test this material for.true
if the material does not have the
specified name.public boolean isNotNamedOneOf(java.lang.String... names)
names
- The names to test this material for.true
if the material does not have any of
the specified names.public boolean isNamedSameAs(Material material)
material
- The material to compare this material with.true
if the specified material has the same name as
this one.public boolean isNotNamedSameAs(Material material)
material
- The material to compare this material with.true
if the specified material does not
have the same name as this one.public boolean containsWater()
public static Material get(int blockType)
blockType
- The block ID.get(String, Object...)
.public static Material get(int blockType, int data)
blockType
- The block ID.data
- The data value.get(String, Object...)
.public static Material getByCombinedIndex(int index)
index
- The combined index of the material to get.get(String, Object...)
.public static Material get(Material.Identity identity)
identity
- The identity of the material to get.public static Material get(java.lang.String name, java.util.Map<java.lang.String,java.lang.String> properties)
name
- The name of the material to get.properties
- The properties of the material to get. May be
null
.public static Material get(java.lang.String name, java.lang.Object... properties)
name
- The name of the material to get.properties
- The properties of the material to get, as a list of
key-value pairs. The keys must be String
s.
May be null
.public static Material getPrototype(java.lang.String name)
name
- The name of the material of which to get a prototype.public static java.util.Set<java.lang.String> getAllNamespaces()
public static java.util.Set<java.lang.String> getAllSimpleNamesForNamespace(java.lang.String namespace)
public static java.util.Set<java.lang.String> getAllNames()
public static java.util.Collection<Material> getAllMaterials()
public static java.util.Set<java.util.Map<java.lang.String,java.lang.Object>> getSpecs(java.lang.String name)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
minecraft
and
properties with value "false"
or "0"
are also
omitted.toString
in class java.lang.Object
public java.lang.String toLegacyString()
toString()
.public java.lang.String toFullString()
public static int guessOpacity(java.lang.String name)
public static boolean guessReceivesLight(java.lang.String name)
public static boolean guessResource(java.lang.String name)
public static boolean guessTreeRelated(java.lang.String name)