|
|
|
@ -2,6 +2,7 @@ package net.minecraft.src;
|
|
|
|
|
|
|
|
|
|
import org.mcmodule.math.BigInteger;
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
import java.util.Stack;
|
|
|
|
|
|
|
|
|
|
public class BiomeDecorator
|
|
|
|
|
{
|
|
|
|
@ -131,6 +132,8 @@ public class BiomeDecorator
|
|
|
|
|
/** True if decorator should generate surface lava & water */
|
|
|
|
|
public boolean generateLakes;
|
|
|
|
|
|
|
|
|
|
private Stack<DecorateInfo> stack = new Stack<>();
|
|
|
|
|
|
|
|
|
|
public BiomeDecorator(BiomeGenBase par1BiomeGenBase)
|
|
|
|
|
{
|
|
|
|
|
this.sandGen = new WorldGenSand(7, Block.sand.blockID);
|
|
|
|
@ -172,20 +175,23 @@ public class BiomeDecorator
|
|
|
|
|
*/
|
|
|
|
|
public void decorate(World par1World, Random par2Random, BigInteger par3, BigInteger par4)
|
|
|
|
|
{
|
|
|
|
|
if (this.currentWorld != null)
|
|
|
|
|
{
|
|
|
|
|
throw new RuntimeException("Already decorating!!");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
DecorateInfo info = new DecorateInfo();
|
|
|
|
|
info.world = currentWorld;
|
|
|
|
|
info.rand = randomGenerator;
|
|
|
|
|
info.chunkX = chunk_X;
|
|
|
|
|
info.chunkZ = chunk_Z;
|
|
|
|
|
stack.push(info);
|
|
|
|
|
this.currentWorld = par1World;
|
|
|
|
|
this.randomGenerator = par2Random;
|
|
|
|
|
this.chunk_X = par3;
|
|
|
|
|
this.chunk_Z = par4;
|
|
|
|
|
this.decorate();
|
|
|
|
|
this.currentWorld = null;
|
|
|
|
|
this.randomGenerator = null;
|
|
|
|
|
}
|
|
|
|
|
info = stack.pop();
|
|
|
|
|
this.currentWorld = info.world;
|
|
|
|
|
this.randomGenerator = info.rand;
|
|
|
|
|
this.chunk_X = info.chunkX;
|
|
|
|
|
this.chunk_Z = info.chunkZ;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -422,4 +428,10 @@ public class BiomeDecorator
|
|
|
|
|
this.genStandardOre1(1, this.diamondGen, 0, 16);
|
|
|
|
|
this.genStandardOre2(1, this.lapisGen, 16, 16);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static class DecorateInfo {
|
|
|
|
|
BigInteger chunkX, chunkZ;
|
|
|
|
|
World world;
|
|
|
|
|
Random rand;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|