public class Material
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static Material |
air |
static Material |
anvil |
static Material |
barrier |
static Material |
cactus |
static Material |
cake |
private boolean |
canBurn
Bool defining if the block can burn or not.
|
static Material |
carpet |
static Material |
circuits |
static Material |
clay |
static Material |
cloth |
static Material |
coral |
static Material |
craftedSnow
The material for crafted snow.
|
static Material |
dragonEgg |
static Material |
fire |
static Material |
glass |
static Material |
gourd |
static Material |
grass |
static Material |
ground |
static Material |
ice |
static Material |
iron |
private boolean |
isAdventureModeExempt |
private boolean |
isTranslucent
Indicates if the material is translucent
|
static Material |
lava |
static Material |
leaves |
private MapColor |
materialMapColor
The color index used to draw the blocks of this material on maps.
|
private int |
mobilityFlag
Mobility information flag.
|
static Material |
packedIce |
static Material |
piston
Pistons' material.
|
static Material |
plants |
static Material |
portal |
static Material |
redstoneLight |
private boolean |
replaceable
Determines whether blocks with this material can be "overwritten" by other blocks when placed - eg snow, vines
and tall grass.
|
private boolean |
requiresNoTool
Determines if the material can be harvested without a tool (or with the wrong tool)
|
static Material |
rock |
static Material |
sand |
static Material |
snow |
static Material |
sponge |
static Material |
tnt |
static Material |
vine |
static Material |
water |
static Material |
web |
static Material |
wood |
Modifier and Type | Method and Description |
---|---|
boolean |
blocksLight()
Will prevent grass from growing on dirt underneath and kill any grass below it if it returns true
|
boolean |
blocksMovement()
Returns if this material is considered solid or not
|
boolean |
getCanBurn()
Returns if the block can burn or not.
|
MapColor |
getMaterialMapColor()
Retrieves the color index of the block.
|
int |
getMaterialMobility()
Returns the mobility information of the material, 0 = free, 1 = can't push but can move over, 2 = total
immobility and stop pistons.
|
boolean |
isLiquid()
Returns if blocks of these materials are liquids.
|
boolean |
isOpaque()
Indicate if the material is opaque
|
boolean |
isReplaceable()
Returns whether the material can be replaced by other blocks when placed - eg snow, vines and tall grass.
|
boolean |
isSolid()
Returns true if the block is a considered solid.
|
boolean |
isToolNotRequired()
Returns true if the material can be harvested without a tool (or with the wrong tool)
|
protected Material |
setAdventureModeExempt() |
protected Material |
setBurning()
Set the canBurn bool to True and return the current object.
|
protected Material |
setImmovableMobility()
This type of material can't be pushed, and pistons are blocked to move.
|
protected Material |
setNoPushMobility()
This type of material can't be pushed, but pistons can move over it.
|
Material |
setReplaceable()
Sets
replaceable to true. |
protected Material |
setRequiresTool()
Makes blocks with this material require the correct tool to be harvested.
|
private Material |
setTranslucent()
Marks the material as translucent
|
public static final Material air
public static final Material grass
public static final Material ground
public static final Material wood
public static final Material rock
public static final Material iron
public static final Material anvil
public static final Material water
public static final Material lava
public static final Material leaves
public static final Material plants
public static final Material vine
public static final Material sponge
public static final Material cloth
public static final Material fire
public static final Material sand
public static final Material circuits
public static final Material carpet
public static final Material glass
public static final Material redstoneLight
public static final Material tnt
public static final Material coral
public static final Material ice
public static final Material packedIce
public static final Material snow
public static final Material craftedSnow
public static final Material cactus
public static final Material clay
public static final Material gourd
public static final Material dragonEgg
public static final Material portal
public static final Material cake
public static final Material web
public static final Material piston
public static final Material barrier
private boolean canBurn
private boolean replaceable
private boolean isTranslucent
private final MapColor materialMapColor
private boolean requiresNoTool
private int mobilityFlag
private boolean isAdventureModeExempt
public Material(MapColor color)
public boolean isLiquid()
public boolean isSolid()
public boolean blocksLight()
public boolean blocksMovement()
private Material setTranslucent()
protected Material setRequiresTool()
protected Material setBurning()
public boolean getCanBurn()
public Material setReplaceable()
replaceable
to true.public boolean isReplaceable()
public boolean isOpaque()
public boolean isToolNotRequired()
public int getMaterialMobility()
protected Material setNoPushMobility()
protected Material setImmovableMobility()
protected Material setAdventureModeExempt()
#isAdventureModeExempt()
public MapColor getMaterialMapColor()