    001package net.minecraft.world.gen;
    002
    003public class FlatLayerInfo
    004{
    005    /** Amount of layers for this set of layers. */
    006    private int layerCount;
    007
    008    /** Block type used on this set of layers. */
    009    private int layerFillBlock;
    010
    011    /** Block metadata used on this set of laeyrs. */
    012    private int layerFillBlockMeta;
    013    private int layerMinimumY;
    014
    015    public FlatLayerInfo(int par1, int par2)
    016    {
    017        this.layerCount = 1;
    018        this.layerFillBlock = 0;
    019        this.layerFillBlockMeta = 0;
    020        this.layerMinimumY = 0;
    021        this.layerCount = par1;
    022        this.layerFillBlock = par2;
    023    }
    024
    025    public FlatLayerInfo(int par1, int par2, int par3)
    026    {
    027        this(par1, par2);
    028        this.layerFillBlockMeta = par3;
    029    }
    030
    031    /**
    032     * Return the amount of layers for this set of layers.
    033     */
    034    public int getLayerCount()
    035    {
    036        return this.layerCount;
    037    }
    038
    039    /**
    040     * Return the block type used on this set of layers.
    041     */
    042    public int getFillBlock()
    043    {
    044        return this.layerFillBlock;
    045    }
    046
    047    /**
    048     * Return the block metadata used on this set of layers.
    049     */
    050    public int getFillBlockMeta()
    051    {
    052        return this.layerFillBlockMeta;
    053    }
    054
    055    /**
    056     * Return the minimum Y coordinate for this layer, set during generation.
    057     */
    058    public int getMinY()
    059    {
    060        return this.layerMinimumY;
    061    }
    062
    063    /**
    064     * Set the minimum Y coordinate for this layer.
    065     */
    066    public void setMinY(int par1)
    067    {
    068        this.layerMinimumY = par1;
    069    }
    070
    071    public String toString()
    072    {
    073        String var1 = Integer.toString(this.layerFillBlock);
    074
    075        if (this.layerCount > 1)
    076        {
    077            var1 = this.layerCount + "x" + var1;
    078        }
    079
    080        if (this.layerFillBlockMeta > 0)
    081        {
    082            var1 = var1 + ":" + this.layerFillBlockMeta;
    083        }
    084
    085        return var1;
    086    }
    087}