net.morbz.minecraft.blocks
Class QuartzBlock

java.lang.Object
  extended by net.morbz.minecraft.blocks.QuartzBlock
All Implemented Interfaces:
IBlock

public class QuartzBlock
extends java.lang.Object
implements IBlock

The class for a quartz block. There are two different constructors depending on what variant of the quartz block is needed.

Author:
MorbZ

Nested Class Summary
static class QuartzBlock.QuartzFacing
          The facing of the quartz block.
static class QuartzBlock.QuartzVariant
          The variant of the quartz block.
 
Constructor Summary
QuartzBlock(QuartzBlock.QuartzFacing facing)
          Creates a new instance.
QuartzBlock(QuartzBlock.QuartzVariant variant)
          Creates a new instance.
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuartzBlock

public QuartzBlock(QuartzBlock.QuartzVariant variant)
Creates a new instance. This constructor is used for the basic variants default and chiseled that don't have facing data.

Parameters:
variant - The variant of the quartz block

QuartzBlock

public QuartzBlock(QuartzBlock.QuartzFacing facing)
Creates a new instance. This constructor is used for the pillar variant which is the only variant that has facing data.

Parameters:
facing - The facing of the pillar quartz block
Method Detail

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