001package net.minecraft.world.gen.layer; 002 003import net.minecraft.world.biome.BiomeGenBase; 004 005public class GenLayerSwampRivers extends GenLayer 006{ 007 public GenLayerSwampRivers(long par1, GenLayer par3GenLayer) 008 { 009 super(par1); 010 this.parent = par3GenLayer; 011 } 012 013 /** 014 * Returns a list of integer values generated by this layer. These may be interpreted as temperatures, rainfall 015 * amounts, or biomeList[] indices based on the particular GenLayer subclass. 016 */ 017 public int[] getInts(int par1, int par2, int par3, int par4) 018 { 019 int[] aint = this.parent.getInts(par1 - 1, par2 - 1, par3 + 2, par4 + 2); 020 int[] aint1 = IntCache.getIntCache(par3 * par4); 021 022 for (int i1 = 0; i1 < par4; ++i1) 023 { 024 for (int j1 = 0; j1 < par3; ++j1) 025 { 026 this.initChunkSeed((long)(j1 + par1), (long)(i1 + par2)); 027 int k1 = aint[j1 + 1 + (i1 + 1) * (par3 + 2)]; 028 029 if ((k1 != BiomeGenBase.swampland.biomeID || this.nextInt(6) != 0) && (k1 != BiomeGenBase.jungle.biomeID && k1 != BiomeGenBase.jungleHills.biomeID || this.nextInt(8) != 0)) 030 { 031 aint1[j1 + i1 * par3] = k1; 032 } 033 else 034 { 035 aint1[j1 + i1 * par3] = BiomeGenBase.river.biomeID; 036 } 037 } 038 } 039 040 return aint1; 041 } 042}