    001    package net.minecraft.src;
    002
    003    public class GenLayerRiverMix extends GenLayer
    004    {
    005        private GenLayer biomePatternGeneratorChain;
    006        private GenLayer riverPatternGeneratorChain;
    007
    008        public GenLayerRiverMix(long par1, GenLayer par3GenLayer, GenLayer par4GenLayer)
    009        {
    010            super(par1);
    011            this.biomePatternGeneratorChain = par3GenLayer;
    012            this.riverPatternGeneratorChain = par4GenLayer;
    013        }
    014
    015        /**
    016         * Initialize layer's local worldGenSeed based on its own baseSeed and the world's global seed (passed in as an
    017         * argument).
    018         */
    019        public void initWorldGenSeed(long par1)
    020        {
    021            this.biomePatternGeneratorChain.initWorldGenSeed(par1);
    022            this.riverPatternGeneratorChain.initWorldGenSeed(par1);
    023            super.initWorldGenSeed(par1);
    024        }
    025
    026        /**
    027         * Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall
    028         * amounts, or biomeList[] indices based on the particular GenLayer subclass.
    029         */
    030        public int[] getInts(int par1, int par2, int par3, int par4)
    031        {
    032            int[] var5 = this.biomePatternGeneratorChain.getInts(par1, par2, par3, par4);
    033            int[] var6 = this.riverPatternGeneratorChain.getInts(par1, par2, par3, par4);
    034            int[] var7 = IntCache.getIntCache(par3 * par4);
    035
    036            for (int var8 = 0; var8 < par3 * par4; ++var8)
    037            {
    038                if (var5[var8] == BiomeGenBase.ocean.biomeID)
    039                {
    040                    var7[var8] = var5[var8];
    041                }
    042                else if (var6[var8] >= 0)
    043                {
    044                    if (var5[var8] == BiomeGenBase.icePlains.biomeID)
    045                    {
    046                        var7[var8] = BiomeGenBase.frozenRiver.biomeID;
    047                    }
    048                    else if (var5[var8] != BiomeGenBase.mushroomIsland.biomeID && var5[var8] != BiomeGenBase.mushroomIslandShore.biomeID)
    049                    {
    050                        var7[var8] = var6[var8];
    051                    }
    052                    else
    053                    {
    054                        var7[var8] = BiomeGenBase.mushroomIslandShore.biomeID;
    055                    }
    056                }
    057                else
    058                {
    059                    var7[var8] = var5[var8];
    060                }
    061            }
    062
    063            return var7;
    064        }
    065    }