net.morbz.minecraft.world
Class DefaultLayers

java.lang.Object
  extended by net.morbz.minecraft.world.DefaultLayers

public class DefaultLayers
extends java.lang.Object

This class can be used to define the default block layers of the part of the world that was created by J2Blocks. This results in a flat world where the blocks of each Y-coordinate are the same until they get overwritten. It is recommended to combine the DefaultLayers with the FlatGenerator to get a consistent world.

Author:
MorbZ

Constructor Summary
DefaultLayers()
           
 
Method Summary
 Material getLayer(int y)
          Get the material at the given Y-coordinate.
 void setLayer(int y, Material material)
          Sets the layer at the given Y-coordinate with the given material.
 void setLayers(int y1, int y2, Material material)
          Sets the layers of the given range of Y-coordinates (including y1 and y2) with the given material.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayers

public DefaultLayers()
Method Detail

setLayer

public void setLayer(int y,
                     Material material)
Sets the layer at the given Y-coordinate with the given material.

Parameters:
y - The Y-coordinate
material - The material

setLayers

public void setLayers(int y1,
                      int y2,
                      Material material)
Sets the layers of the given range of Y-coordinates (including y1 and y2) with the given material.

Parameters:
y1 - The lower Y-coordinate
y2 - The higher Y-coordinate
material - The material

getLayer

public Material getLayer(int y)
Get the material at the given Y-coordinate.

Parameters:
y - The Y-coordinate
Returns:
The material. Can be 'null'