当前位置: 首页>>代码示例>>Java>>正文


Java SpawnerAnimals.performWorldGenSpawning方法代码示例

本文整理汇总了Java中net.minecraft.world.SpawnerAnimals.performWorldGenSpawning方法的典型用法代码示例。如果您正苦于以下问题:Java SpawnerAnimals.performWorldGenSpawning方法的具体用法?Java SpawnerAnimals.performWorldGenSpawning怎么用?Java SpawnerAnimals.performWorldGenSpawning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.world.SpawnerAnimals的用法示例。


在下文中一共展示了SpawnerAnimals.performWorldGenSpawning方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的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;
}
 
开发者ID:BlesseNtumble,项目名称:TRAPPIST-1,代码行数:19,代码来源:ChunkProviderSpaceLakes.java

示例2: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    BlockFalling.fallInstantly = true;
    int k = p_73153_2_ * 16;
    int l = p_73153_3_ * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long)p_73153_2_ * i1 + (long)p_73153_3_ * j1 ^ this.worldObj.getSeed());

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, false));

    int k1;
    int l1;
    int i2;

    if (this.rand.nextInt(4) == 0)
    {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(256);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2);
    }
    
    if (biomegenbase.theBiomeDecorator.currentWorld == null)
    	biomegenbase.decorate(this.worldObj, this.rand, k, l);
    
    if (TerrainGen.populate(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, false, ANIMALS))
    {
    	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
    }
    k += 8;
    l += 8;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(p_73153_1_, worldObj, rand, p_73153_2_, p_73153_3_, false));

    BlockFalling.fallInstantly = false;
}
 
开发者ID:GhostMonk3408,项目名称:MidgarCrusade,代码行数:43,代码来源:ChunkGeneratorSky.java

示例3: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
    net.minecraft.block.BlockSand.fallInstantly = true;
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    rand.setSeed(worldObj.getSeed());
    long var7 = rand.nextLong() / 2L * 2L + 1L;
    long var9 = rand.nextLong() / 2L * 2L + 1L;
    rand.setSeed(par2 * var7 + par3 * var9 ^ worldObj.getSeed());
    boolean var11 = false;
    if (mapFeaturesEnabled) {
        mineshaftGenerator.generateStructuresInChunk(worldObj, rand, par2,
                par3);
        var11 = villageGenerator.generateStructuresInChunk(worldObj, rand,
                par2, par3);
        strongholdGenerator.generateStructuresInChunk(worldObj, rand, par2,
                par3);
        scatteredFeatureGenerator.generateStructuresInChunk(worldObj, rand,
                par2, par3);
    }
    if (!var11 && rand.nextInt(4) == 0) {
        int var12 = var4 + rand.nextInt(16) + 8;
        int var13 = rand.nextInt(128);
        int var14 = var5 + rand.nextInt(16) + 8;
        new WorldGenLakes(Block.waterStill.blockID).generate(worldObj,
                rand, var12, var13, var14);
    }

    var6.decorate(worldObj, rand, var4, var5);
    SpawnerAnimals.performWorldGenSpawning(worldObj, var6, var4 + 8,
            var5 + 8, 16, 16, rand);
    var4 += 8;
    var5 += 8;
    net.minecraft.block.BlockSand.fallInstantly = false;
}
 
开发者ID:Minecraft4455,项目名称:MysticRPG,代码行数:37,代码来源:ChunkProviderYirawia.java

示例4: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(k + 16, l + 16);
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;
	MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	//Enable map features ??
	if (this.mapFeaturesEnabled) {
		this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
	}
	int k1;
	int l1;
	int i2;

	//Add Lakes ??
	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE)) {
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.water)).generate(this.worldObj, this.rand, k1, l1, i2);
	}

	//Add Lakes ??
	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0) {
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)  {
			(new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, k1, l1, i2);
		}
	}

	//Add Dungeons ??
	boolean doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, DUNGEON);
	for (k1 = 0; doGen && k1 < 8; ++k1) {
		l1 = k + this.rand.nextInt(16) + 8;
		i2 = this.rand.nextInt(256);
		int j2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2);
	}

	//Add Animals ??
	biomegenbase.decorate(this.worldObj, this.rand, k, l);
	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ANIMALS)) {
		SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	}
	k += 8;
	l += 8;

	//Creates snow and ice in world.
	doGen = TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, ICE);
	for (k1 = 0; doGen && k1 < 16; ++k1) {
		for (l1 = 0; l1 < 16; ++l1) {
			i2 = this.worldObj.getPrecipitationHeight(k + k1, l + l1);

			if (this.worldObj.isBlockFreezable(k1 + k, i2 - 1, l1 + l)) {
				this.worldObj.setBlock(k1 + k, i2 - 1, l1 + l, Blocks.ice, 0, 2);
			}

			if (this.worldObj.func_147478_e(k1 + k, i2, l1 + l, true)) {
				this.worldObj.setBlock(k1 + k, i2, l1 + l, Blocks.snow_layer, 0, 2);
			}
		}
	}
	MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));
	BlockFalling.fallInstantly = false;
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:80,代码来源:ChunkProviderEpic.java

示例5: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockFalling.fallInstantly = true;
    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));//warn
    this.rand.setSeed(this.worldObj.getSeed());
    long i1 = this.rand.nextLong() / 2L * 2L + 1L;
    long j1 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed((long)par2 * i1 + (long)par3 * j1 ^ this.worldObj.getSeed());
    boolean flag = false;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    int k1;
    int l1;
    int i2;

    if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0
        && TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
    {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(256);
        i2 = l + this.rand.nextInt(16) + 8;
        (new WorldGenLakes(Blocks.redstone_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
    }

    if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag && this.rand.nextInt(8) == 0)
    {
        k1 = k + this.rand.nextInt(16) + 8;
        l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
        i2 = l + this.rand.nextInt(16) + 8;

        if (l1 < 63 || this.rand.nextInt(10) == 0)
        {
            (new WorldGenLakes(Blocks.redstone_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
        }
    }
    biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
    SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
    k += 8;
    l += 8;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

    BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:51,代码来源:RedstoneDimension.java

示例6: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.emerald_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.emerald_block)).generate(this.worldObj, this.rand,
					new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:56,代码来源:EmeraldDimension.java

示例7: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.quartz_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.quartz_block)).generate(this.worldObj, this.rand,
					new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:56,代码来源:QuartzDimension.java

示例8: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.ice)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.ice)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:55,代码来源:SnowDimension.java

示例9: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.iron_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.iron_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:55,代码来源:IronDimension.java

示例10: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.lava)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:55,代码来源:ObsidianDimension.java

示例11: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.lapis_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.lapis_block)).generate(this.worldObj, this.rand,
					new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:56,代码来源:LapisDimension.java

示例12: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.gold_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.gold_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:55,代码来源:GoldDimension.java

示例13: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.glass)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.glass)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:55,代码来源:GlassDimension.java

示例14: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.log)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.log)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:55,代码来源:WoodDimension.java

示例15: populate

import net.minecraft.world.SpawnerAnimals; //导入方法依赖的package包/类
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockFalling.fallInstantly = true;
	int k = par2 * 16;
	int l = par3 * 16;
	BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(new BlockPos(k + 16, 0, l + 16));// warn
	this.rand.setSeed(this.worldObj.getSeed());
	long i1 = this.rand.nextLong() / 2L * 2L + 1L;
	long j1 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed((long) par2 * i1 + (long) par3 * j1 ^ this.worldObj.getSeed());
	boolean flag = false;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Pre(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	int k1;
	int l1;
	int i2;

	if (biomegenbase != BiomeGenBase.desert && biomegenbase != BiomeGenBase.desertHills && !flag
			&& this.rand.nextInt(4) == 0
			&& TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE))
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(256);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Blocks.diamond_block)).generate(this.worldObj, this.rand, new BlockPos(k1, l1, i2));
	}

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAVA) && !flag
			&& this.rand.nextInt(8) == 0)
	{
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(this.rand.nextInt(248) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

		if (l1 < 63 || this.rand.nextInt(10) == 0)
		{
			(new WorldGenLakes(Blocks.diamond_block)).generate(this.worldObj, this.rand,
					new BlockPos(k1, l1, i2));
		}
	}
	biomegenbase.decorate(this.worldObj, this.rand, new BlockPos(k, 0, l));
	SpawnerAnimals.performWorldGenSpawning(this.worldObj, biomegenbase, k + 8, l + 8, 16, 16, this.rand);
	k += 8;
	l += 8;

	MinecraftForge.EVENT_BUS
			.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, rand, par2, par3, flag));

	BlockFalling.fallInstantly = false;
}
 
开发者ID:sokratis12GR,项目名称:MoreDimensions,代码行数:56,代码来源:DiamondDimension.java


注:本文中的net.minecraft.world.SpawnerAnimals.performWorldGenSpawning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。