net.morbz.minecraft.blocks
Enum DirtBlock

java.lang.Object
  extended by java.lang.Enum<DirtBlock>
      extended by net.morbz.minecraft.blocks.DirtBlock
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DirtBlock>, IBlock

public enum DirtBlock
extends java.lang.Enum<DirtBlock>
implements IBlock

The class for the dirt and podzol blocks.

Author:
MorbZ

Enum Constant Summary
COARSE_DIRT
           
DIRT
           
PODZOL
           
 
Method Summary
 byte getBlockData()
          Returns the block data.
 byte getBlockId()
          Returns the block ID.
 int getTransparency()
          Returns the transparency level of this block. 0 means fully opaque, 1 means fully transparent and values > 1 mean transparent but the light level is decreased by n at this block.
static DirtBlock valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DirtBlock[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

DIRT

public static final DirtBlock DIRT

COARSE_DIRT

public static final DirtBlock COARSE_DIRT

PODZOL

public static final DirtBlock PODZOL
Method Detail

values

public static DirtBlock[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (DirtBlock c : DirtBlock.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static DirtBlock valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getBlockId

public byte getBlockId()
Returns the block ID. That is the basic ID of the material without additional data.

Specified by:
getBlockId in interface IBlock
Returns:
The block ID

getBlockData

public byte getBlockData()
Returns the block data. It can hold additional information about the block depending on the material.

Specified by:
getBlockData in interface IBlock
Returns:
The block data. Only the 4 rightmost bits are relevant.

getTransparency

public int getTransparency()
Returns the transparency level of this block. 0 means fully opaque, 1 means fully transparent and values > 1 mean transparent but the light level is decreased by n at this block.

Specified by:
getTransparency in interface IBlock
Returns:
The transparency level