本文整理匯總了Java中net.minecraft.world.biome.BiomeGenBase.decorate方法的典型用法代碼示例。如果您正苦於以下問題:Java BiomeGenBase.decorate方法的具體用法?Java BiomeGenBase.decorate怎麽用?Java BiomeGenBase.decorate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.world.biome.BiomeGenBase
的用法示例。
在下文中一共展示了BiomeGenBase.decorate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: populate
import net.minecraft.world.biome.BiomeGenBase; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider chunk, int x, int z)
{
BlockFalling.fallInstantly = true;
int var4 = x * 16;
int var5 = z * 16;
BiomeGenBase biomeGen = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
this.rand.setSeed(this.worldObj.getSeed());
long var7 = this.rand.nextLong() / 2L * 2L + 1L;
long var9 = this.rand.nextLong() / 2L * 2L + 1L;
this.rand.setSeed(x * var7 + z * var9 ^ this.worldObj.getSeed());
biomeGen.decorate(this.worldObj, this.rand, var4, var5);
this.decoratePlanet(this.worldObj, this.rand, var4, var5);
SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomeGen, var4 + 8, var5 + 8, 16, 16, this.rand);
this.onPopulate(chunk, x, z);
BlockFalling.fallInstantly = false;
}
示例2: populate
import net.minecraft.world.biome.BiomeGenBase; //導入方法依賴的package包/類
/**
* Populates chunk with ores etc etc
*/
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
int i = p_73153_2_ * 16;
int j = p_73153_3_ * 16;
BlockPos blockpos = new BlockPos(i, 0, j);
BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(i + 16, 0, j + 16));
boolean flag = false;
this.random.setSeed(this.worldObj.getSeed());
long k = this.random.nextLong() / 2L * 2L + 1L;
long l = this.random.nextLong() / 2L * 2L + 1L;
this.random.setSeed((long)p_73153_2_ * k + (long)p_73153_3_ * l ^ this.worldObj.getSeed());
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(p_73153_2_, p_73153_3_);
for (MapGenStructure mapgenstructure : this.structureGenerators)
{
boolean flag1 = mapgenstructure.generateStructure(this.worldObj, this.random, chunkcoordintpair);
if (mapgenstructure instanceof MapGenVillage)
{
flag |= flag1;
}
}
if (this.waterLakeGenerator != null && !flag && this.random.nextInt(4) == 0)
{
this.waterLakeGenerator.generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
}
if (this.lavaLakeGenerator != null && !flag && this.random.nextInt(8) == 0)
{
BlockPos blockpos1 = blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(this.random.nextInt(248) + 8), this.random.nextInt(16) + 8);
if (blockpos1.getY() < this.worldObj.func_181545_F() || this.random.nextInt(10) == 0)
{
this.lavaLakeGenerator.generate(this.worldObj, this.random, blockpos1);
}
}
if (this.hasDungeons)
{
for (int i1 = 0; i1 < 8; ++i1)
{
(new WorldGenDungeons()).generate(this.worldObj, this.random, blockpos.add(this.random.nextInt(16) + 8, this.random.nextInt(256), this.random.nextInt(16) + 8));
}
}
if (this.hasDecoration)
{
biomegenbase.decorate(this.worldObj, this.random, blockpos);
}
}