    001    package net.minecraft.src;
    002
    003    public class GenLayerHills extends GenLayer
    004    {
    005        public GenLayerHills(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
    027                    if (this.nextInt(3) == 0)
    028                    {
    029                        int var10 = var9;
    030
    031                        if (var9 == BiomeGenBase.desert.biomeID)
    032                        {
    033                            var10 = BiomeGenBase.desertHills.biomeID;
    034                        }
    035                        else if (var9 == BiomeGenBase.forest.biomeID)
    036                        {
    037                            var10 = BiomeGenBase.forestHills.biomeID;
    038                        }
    039                        else if (var9 == BiomeGenBase.taiga.biomeID)
    040                        {
    041                            var10 = BiomeGenBase.taigaHills.biomeID;
    042                        }
    043                        else if (var9 == BiomeGenBase.plains.biomeID)
    044                        {
    045                            var10 = BiomeGenBase.forest.biomeID;
    046                        }
    047                        else if (var9 == BiomeGenBase.icePlains.biomeID)
    048                        {
    049                            var10 = BiomeGenBase.iceMountains.biomeID;
    050                        }
    051                        else if (var9 == BiomeGenBase.jungle.biomeID)
    052                        {
    053                            var10 = BiomeGenBase.jungleHills.biomeID;
    054                        }
    055
    056                        if (var10 == var9)
    057                        {
    058                            var6[var8 + var7 * par3] = var9;
    059                        }
    060                        else
    061                        {
    062                            int var11 = var5[var8 + 1 + (var7 + 1 - 1) * (par3 + 2)];
    063                            int var12 = var5[var8 + 1 + 1 + (var7 + 1) * (par3 + 2)];
    064                            int var13 = var5[var8 + 1 - 1 + (var7 + 1) * (par3 + 2)];
    065                            int var14 = var5[var8 + 1 + (var7 + 1 + 1) * (par3 + 2)];
    066
    067                            if (var11 == var9 && var12 == var9 && var13 == var9 && var14 == var9)
    068                            {
    069                                var6[var8 + var7 * par3] = var10;
    070                            }
    071                            else
    072                            {
    073                                var6[var8 + var7 * par3] = var9;
    074                            }
    075                        }
    076                    }
    077                    else
    078                    {
    079                        var6[var8 + var7 * par3] = var9;
    080                    }
    081                }
    082            }
    083
    084            return var6;
    085        }
    086    }