@Hook(returnCondition = ReturnCondition.ALWAYS)
public static final void generateBiomeTerrain(Biome biome, World worldIn, Random rand, ChunkPrimer chunkPrimerIn, int x, int z, double noiseVal)
{
int i = worldIn.getSeaLevel();
IBlockState iblockstate = this.topBlock;
IBlockState iblockstate1 = this.fillerBlock;
int j = -1;
int k = (int)(noiseVal / 3.0D + 3.0D + rand.nextDouble() * 0.25D);
int l = x & 15;
int i1 = z & 15;
BlockPos.MutableBlockPos blockpos$mutableblockpos = new BlockPos.MutableBlockPos();
for (int j1 = 255; j1 >= 0; --j1)
{
if (j1 <= rand.nextInt(5))
{
chunkPrimerIn.setBlockState(i1, j1, l, Blocks.LAVA.getDefaultState();
}
else
{
IBlockState iblockstate2 = chunkPrimerIn.getBlockState(i1, j1, l);
if (iblockstate2.getMaterial() == Material.AIR)
{
j = -1;
}
else if (iblockstate2.getBlock() == Blocks.STONE)
{
if (j == -1)
{
if (k <= 0)
{
iblockstate = AIR;
iblockstate1 = STONE;
}
else if (j1 >= i - 4 && j1 <= i + 1)
{
iblockstate = this.topBlock;
iblockstate1 = this.fillerBlock;
}
if (j1 < i && (iblockstate == null || iblockstate.getMaterial() == Material.AIR))
{
if (this.getFloatTemperature(blockpos$mutableblockpos.setPos(x, j1, z)) < 0.15F)
{
iblockstate = ICE;
}
else
{
iblockstate = WATER;
}
}
j = k;
if (j1 >= i - 1)
{
chunkPrimerIn.setBlockState(i1, j1, l, iblockstate);
}
else if (j1 < i - 7 - k)
{
iblockstate = AIR;
iblockstate1 = STONE;
chunkPrimerIn.setBlockState(i1, j1, l, GRAVEL);
}
else
{
chunkPrimerIn.setBlockState(i1, j1, l, iblockstate1);
}
}
else if (j > 0)
{
--j;
chunkPrimerIn.setBlockState(i1, j1, l, iblockstate1);
if (j == 0 && iblockstate1.getBlock() == Blocks.SAND && k > 1)
{
j = rand.nextInt(4) + Math.max(0, j1 - 63);
iblockstate1 = iblockstate1.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? RED_SANDSTONE : SANDSTONE;
}
}
}
}
}
}