    001    package net.minecraft.src;
    002
    003    public class GenLayerShore extends GenLayer
    004    {
    005        public GenLayerShore(long par1, GenLayer par3GenLayer)
    006        {
    007            super(par1);
    008            this.parent = par3GenLayer;
    009        }
    010
    011        /**
    012         * Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall
    013         * amounts, or biomeList[] indices based on the particular GenLayer subclass.
    014         */
    015        public int[] getInts(int par1, int par2, int par3, int par4)
    016        {
    017            int[] var5 = this.parent.getInts(par1 - 1, par2 - 1, par3 + 2, par4 + 2);
    018            int[] var6 = IntCache.getIntCache(par3 * par4);
    019
    020            for (int var7 = 0; var7 < par4; ++var7)
    021            {
    022                for (int var8 = 0; var8 < par3; ++var8)
    023                {
    024                    this.initChunkSeed((long)(var8 + par1), (long)(var7 + par2));
    025                    int var9 = var5[var8 + 1 + (var7 + 1) * (par3 + 2)];
    026                    int var10;
    027                    int var11;
    028                    int var12;
    029                    int var13;
    030
    031                    if (var9 == BiomeGenBase.mushroomIsland.biomeID)
    032                    {
    033                        var10 = var5[var8 + 1 + (var7 + 1 - 1) * (par3 + 2)];
    034                        var11 = var5[var8 + 1 + 1 + (var7 + 1) * (par3 + 2)];
    035                        var12 = var5[var8 + 1 - 1 + (var7 + 1) * (par3 + 2)];
    036                        var13 = var5[var8 + 1 + (var7 + 1 + 1) * (par3 + 2)];
    037
    038                        if (var10 != BiomeGenBase.ocean.biomeID && var11 != BiomeGenBase.ocean.biomeID && var12 != BiomeGenBase.ocean.biomeID && var13 != BiomeGenBase.ocean.biomeID)
    039                        {
    040                            var6[var8 + var7 * par3] = var9;
    041                        }
    042                        else
    043                        {
    044                            var6[var8 + var7 * par3] = BiomeGenBase.mushroomIslandShore.biomeID;
    045                        }
    046                    }
    047                    else if (var9 != BiomeGenBase.ocean.biomeID && var9 != BiomeGenBase.river.biomeID && var9 != BiomeGenBase.swampland.biomeID && var9 != BiomeGenBase.extremeHills.biomeID)
    048                    {
    049                        var10 = var5[var8 + 1 + (var7 + 1 - 1) * (par3 + 2)];
    050                        var11 = var5[var8 + 1 + 1 + (var7 + 1) * (par3 + 2)];
    051                        var12 = var5[var8 + 1 - 1 + (var7 + 1) * (par3 + 2)];
    052                        var13 = var5[var8 + 1 + (var7 + 1 + 1) * (par3 + 2)];
    053
    054                        if (var10 != BiomeGenBase.ocean.biomeID && var11 != BiomeGenBase.ocean.biomeID && var12 != BiomeGenBase.ocean.biomeID && var13 != BiomeGenBase.ocean.biomeID)
    055                        {
    056                            var6[var8 + var7 * par3] = var9;
    057                        }
    058                        else
    059                        {
    060                            var6[var8 + var7 * par3] = BiomeGenBase.beach.biomeID;
    061                        }
    062                    }
    063                    else if (var9 == BiomeGenBase.extremeHills.biomeID)
    064                    {
    065                        var10 = var5[var8 + 1 + (var7 + 1 - 1) * (par3 + 2)];
    066                        var11 = var5[var8 + 1 + 1 + (var7 + 1) * (par3 + 2)];
    067                        var12 = var5[var8 + 1 - 1 + (var7 + 1) * (par3 + 2)];
    068                        var13 = var5[var8 + 1 + (var7 + 1 + 1) * (par3 + 2)];
    069
    070                        if (var10 == BiomeGenBase.extremeHills.biomeID && var11 == BiomeGenBase.extremeHills.biomeID && var12 == BiomeGenBase.extremeHills.biomeID && var13 == BiomeGenBase.extremeHills.biomeID)
    071                        {
    072                            var6[var8 + var7 * par3] = var9;
    073                        }
    074                        else
    075                        {
    076                            var6[var8 + var7 * par3] = BiomeGenBase.extremeHillsEdge.biomeID;
    077                        }
    078                    }
    079                    else
    080                    {
    081                        var6[var8 + var7 * par3] = var9;
    082                    }
    083                }
    084            }
    085
    086            return var6;
    087        }
    088    }