本文整理汇总了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);
}
}