2013-05-03 13:00:44 +00:00
|
|
|
package biomesoplenty.worldgen;
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.world.World;
|
|
|
|
import net.minecraft.world.gen.feature.WorldGenerator;
|
|
|
|
|
|
|
|
public class WorldGenMoor extends WorldGenerator
|
|
|
|
{
|
2013-05-31 10:34:02 +00:00
|
|
|
@Override
|
|
|
|
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
|
|
|
|
{
|
|
|
|
int var6 = par3;
|
|
|
|
int var89;
|
2013-05-03 13:00:44 +00:00
|
|
|
int var90;
|
|
|
|
int var91;
|
|
|
|
int var92;
|
|
|
|
int var93;
|
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
for (int var7 = par5; par4 < 128; ++par4)
|
|
|
|
{
|
|
|
|
var89 = par1World.getBlockId(par3, par4, par5);
|
2013-05-03 13:00:44 +00:00
|
|
|
var90 = par1World.getBlockId(par3 - 1, par4, par5);
|
|
|
|
var91 = par1World.getBlockId(par3 + 1, par4, par5);
|
|
|
|
var92 = par1World.getBlockId(par3, par4, par5 - 1);
|
|
|
|
var93 = par1World.getBlockId(par3, par4, par5 + 1);
|
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
if ((var89 == Block.grass.blockID) && par4 < 256 - var6 - 1)
|
|
|
|
{
|
2013-05-03 13:00:44 +00:00
|
|
|
if (var90 == Block.grass.blockID)
|
|
|
|
{
|
|
|
|
if (var91 == Block.grass.blockID)
|
|
|
|
{
|
|
|
|
if (var92 == Block.grass.blockID)
|
|
|
|
{
|
|
|
|
if (var93 == Block.grass.blockID)
|
|
|
|
{
|
|
|
|
for (int var8 = 2; var8 <= 5; ++var8)
|
|
|
|
{
|
|
|
|
par1World.setBlock(par3, par4, par5, Block.waterStill.blockID);
|
|
|
|
par1World.setBlock(par3, par4 + 1, par5, 0);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-05-31 10:34:02 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
par3 = var6 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
|
|
|
par5 = var7 + par2Random.nextInt(4) - par2Random.nextInt(4);
|
|
|
|
}
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
|
2013-05-31 10:34:02 +00:00
|
|
|
return true;
|
|
|
|
}
|
2013-05-03 13:00:44 +00:00
|
|
|
}
|