本文整理汇总了C#中Chunk.UNCHECKEDPlaceBlock方法的典型用法代码示例。如果您正苦于以下问题:C# Chunk.UNCHECKEDPlaceBlock方法的具体用法?C# Chunk.UNCHECKEDPlaceBlock怎么用?C# Chunk.UNCHECKEDPlaceBlock使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Chunk
的用法示例。
在下文中一共展示了Chunk.UNCHECKEDPlaceBlock方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Generate
/// <summary>
///
/// </summary>
/// <param name="c"></param>
public override void Generate(Chunk c)
{
//DateTime start = DateTime.Now;
//int cx = c.x << 4, cz = c.z << 4;
//int waterLevel = 64 + 15 / 2 - 4;
if (worldObj.seed == 0)
{
for (int x = 0; x < 16; ++x)
for (int z = 0; z < 16; ++z)
{
for (int y = 0; y < 1; ++y)
c.UNCHECKEDPlaceBlock(x, y, z, 0x07);
for (int y = 1; y < 50; ++y)
c.UNCHECKEDPlaceBlock(x, y, z, 0x01);
for (int y = 50; y < 65; ++y)
c.UNCHECKEDPlaceBlock(x, y, z, 0x03);
c.UNCHECKEDPlaceBlock(x, 65, z, 0x02);
}
}
else
{
lock (this.Lock) // We have to do this otherwise shit gets fucked.
{
random.setSeed((long)c.x * 0x4f9939f508L + (long)c.z * 0x1ef1565bd5L);
generateTerrain(c.x, c.z, c.blocks);
biomesForGeneration = worldObj.chunkManager.loadBlockGeneratorData(biomesForGeneration, c.x * 16, c.z * 16, 16, 16);
replaceBlocksForBiome(c.x, c.z, c.blocks, biomesForGeneration);
caveGenerator.generate(worldObj, c.x, c.z, c.blocks);
if (mapFeaturesEnabled)
{
//mineshaftGenerator.generate(this, worldObj, i, j, abyte0);
//villageGenerator.generate(this, worldObj, i, j, abyte0);
//strongholdGenerator.generate(this, worldObj, i, j, abyte0);
}
ravineGenerator.generate(worldObj, c.x, c.z, c.blocks);
c.GenerateHeightMap();
}
}
//TimeSpan took = DateTime.Now - start;
//Console.WriteLine(took.TotalMilliseconds);
}