當前位置: 首頁>>代碼示例>>Java>>正文


Java BlockSand.fallInstantly方法代碼示例

本文整理匯總了Java中net.minecraft.block.BlockSand.fallInstantly方法的典型用法代碼示例。如果您正苦於以下問題:Java BlockSand.fallInstantly方法的具體用法?Java BlockSand.fallInstantly怎麽用?Java BlockSand.fallInstantly使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.block.BlockSand的用法示例。


在下文中一共展示了BlockSand.fallInstantly方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(par1IChunkProvider, endWorld, endWorld.rand, par2, par3, false));

    int k = par2 * 16;
    int l = par3 * 16;
    BiomeGenBase biomegenbase = this.endWorld.getBiomeGenForCoords(k + 16, l + 16);
    biomegenbase.decorate(this.endWorld, this.endWorld.rand, k, l);

    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, endWorld, endWorld.rand, par2, par3, false));

    BlockSand.fallInstantly = false;
}
 
開發者ID:HATB0T,項目名稱:RuneCraftery,代碼行數:19,代碼來源:ChunkProviderEnd.java

示例2: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;
    final int var4 = par2 * 16;
    final int var5 = par3 * 16;
    this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());

    {
    }

    this.decoratePlanet(this.worldObj, this.rand, var4, var5);
    BlockSand.fallInstantly = false;
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:19,代碼來源:SCEuropaChunkProvider.java

示例3: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockSand.fallInstantly = true;
    int var4 = par2 * 16;
    int var5 = par3 * 16;
    this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());
    this.decoratePlanet(this.worldObj, this.rand, var4, var5);
    var4 += 8;
    var5 += 8;
    this.dungeonGenerator.handleTileEntities(this.rand);

    if (!SCMercuryConfigManager.disableMercuryVillageGen)
    {
    	;
    }
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:22,代碼來源:SCMercuryChunkProvider.java

示例4: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;
    final int var4 = par2 * 16;
    final int var5 = par3 * 16;
    this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());

    this.dungeonGenerator.handleTileEntities(this.rand);

    {
    	;
    }

    this.decoratePlanet(this.worldObj, this.rand, var4, var5);
    BlockSand.fallInstantly = false;
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:22,代碼來源:SCErisChunkProvider.java

示例5: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;
    final int var4 = par2 * 16;
    final int var5 = par3 * 16;
    this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());

    this.decoratePlanet(this.worldObj, this.rand, var4, var5);
    this.blazeNest.generateStructuresInChunk(this.worldObj, new Random(), par2, par3);
    
    this.dungeonGenerator.handleTileEntities(this.rand);

    if (!SCVenusConfigManager.disableVenusVillageGen)
    {
        this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
    }
   
    BlockSand.fallInstantly = false;
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:25,代碼來源:SCVenusChunkProvider.java

示例6: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;
    final int var4 = par2 * 16;
    final int var5 = par3 * 16;
    this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());

    this.dungeonGenerator.handleTileEntities(this.rand);

    {
    }

    this.decoratePlanet(this.worldObj, this.rand, var4, var5);
    BlockSand.fallInstantly = false;
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:21,代碼來源:SCPlutoChunkProvider.java

示例7: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
	BlockSand.fallInstantly = true;
	int var4 = par2 * 16;
	int var5 = par3 * 16;
	this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
	this.rand.setSeed(this.worldObj.getSeed());
	final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
	final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
	this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());
	this.decoratePlanet(this.worldObj, this.rand, var4, var5);
	var4 += 8;
	var5 += 8;

	BlockSand.fallInstantly = false;
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:18,代碼來源:GCChunkProvider.java

示例8: populateDistributions

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
public static void populateDistributions(Collection<IOreDistribution> distributions, World world, int chunkX, int chunkZ)
{
    SimpleProfiler.globalProfiler.startSection("Populate");
    BlockSand.fallInstantly = true;
    ReflectionHelper.setPrivateValue(World.class, world, true, "scheduledUpdatesAreImmediate","field_72999_e");
    
    for (IOreDistribution dist : distributions) {
    	dist.generate(world, chunkX, chunkZ);
        dist.populate(world, chunkX, chunkZ);
        dist.cull();
    }
    
    ReflectionHelper.setPrivateValue(World.class, world, false, "scheduledUpdatesAreImmediate","field_72999_e");
    BlockSand.fallInstantly = false;
    if (Loader.isModLoaded("UndergroundBiomes")) {
    	// FIXME: API not yet available for 1.8.x
    	// UBAPIHook.ubAPIHook.ubOreTexturizer.redoOres(chunkX*16, chunkZ*16, world);
    }
    SimpleProfiler.globalProfiler.endSection();
}
 
開發者ID:lawremi,項目名稱:CustomOreGen,代碼行數:21,代碼來源:ServerState.java

示例9: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider ichunkprovider, int i, int j) {
	BlockSand.fallInstantly = true;
	int k = i * 16;
	int l = j * 16;
	BiomeGenBase biome = 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)i*i1 + (long)j*j1 ^ this.worldObj.getSeed());
	boolean flag = false;
	
	MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(ichunkprovider, worldObj, rand, i, j, flag));

	if(mapFeaturesEnabled){
		this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, rand, i, j);
		this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, rand, i, j);
	}
	
	int k1;
	int l1;
	int i2;
	
	if(biome != BiomeGenBase.desert && biome != BiomeGenBase.desertHills && !flag && this.rand.nextInt(4) == 0 && TerrainGen.populate(ichunkprovider, this.worldObj, rand, i, j, flag, LAKE)){
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(128);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Block.waterStill.blockID)).generate(this.worldObj, this.rand, k1, l1, i2);
	}
	
	biome.decorate(worldObj, rand, k, j);
	 	k+=8;
		l+=8;
		
		MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(ichunkprovider, worldObj, rand, i, j, flag));

		BlockSand.fallInstantly = false;
}
 
開發者ID:MinecraftModArchive,項目名稱:Runes-And-Silver,代碼行數:39,代碼來源:ChunkProviderCustomDimension.java

示例10: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@Override
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;
    final int var4 = par2 * 16;
    final int var5 = par3 * 16;
    this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    this.rand.setSeed(this.worldObj.getSeed());
    final long var7 = this.rand.nextLong() / 2L * 2L + 1L;
    final long var9 = this.rand.nextLong() / 2L * 2L + 1L;
    this.rand.setSeed(par2 * var7 + par3 * var9 ^ this.worldObj.getSeed());

    this.decoratePlanet(this.worldObj, this.rand, var4, var5);
    BlockSand.fallInstantly = false;
}
 
開發者ID:4Space,項目名稱:4-Space-Legacy,代碼行數:16,代碼來源:SCIoChunkProvider.java

示例11: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;
    int x = par2 * 16;
    int z = par3 * 16;
    BiomeGenBase biomegenbase = this.worldObj.getBiomeGenForCoords(x + 16, z + 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));


    int i;
    int j;
    int k;
    
    if (this.rand.nextInt(4) == 0)
    {
        i = x + this.rand.nextInt(16) + 8;
        k = z + this.rand.nextInt(16) + 8;
        j = this.worldObj.getTopSolidOrLiquidBlock(i, k);
        this.essenceSpikeGen.generate(this.worldObj, this.rand, i, j, k);
    }

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

    BlockSand.fallInstantly = false;
}
 
開發者ID:Hologuardian,項目名稱:Sojourn,代碼行數:35,代碼來源:AracoriaChunkProvider.java

示例12: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
/** Populates chunk with ores, plants, etc */
public void populate(IChunkProvider provider, int xCoord, int zCoord) {
    BlockSand.fallInstantly = true;
    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Pre(provider, world, xarRNG, xCoord, zCoord, false));

    int chunkX = xCoord * 16;
    int chunkZ = zCoord * 16;
    BiomeGenBase biomeGen = world.getBiomeGenForCoords(chunkX + 16, chunkZ + 16);
    biomeGen.decorate(world, world.rand, chunkX, chunkZ);
    
    //Add structure generation here i.e. villages, mineshafts, strongholds, etc
    
    MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(provider, world, xarRNG, xCoord, zCoord, false));
    BlockSand.fallInstantly = false;
}
 
開發者ID:Aurilux,項目名稱:Xth-uoth,代碼行數:16,代碼來源:ChunkProviderXthuoth.java

示例13: prePopulate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
@SubscribeEvent
public void prePopulate(PopulateChunkEvent.Pre event) {
	BlockSand.fallInstantly = false;
}
 
開發者ID:TeNNoX-Mods,項目名稱:Planetoids,代碼行數:5,代碼來源:Planetoid.java

示例14: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
public void populate(IChunkProvider p_73153_1_, int p_73153_2_, int p_73153_3_)
{
    Chunk chunk = this.provideChunk(p_73153_2_, p_73153_3_);

    if (!chunk.isTerrainPopulated)
    {
        chunk.func_150809_p();

        if (this.currentChunkProvider != null)
        {
            this.currentChunkProvider.populate(p_73153_1_, p_73153_2_, p_73153_3_);
            // CraftBukkit start
            BlockSand.fallInstantly = true;
            Random random = new Random();
            random.setSeed(worldObj.getSeed());
            long xRand = random.nextLong() / 2L * 2L + 1L;
            long zRand = random.nextLong() / 2L * 2L + 1L;
            random.setSeed((long) p_73153_2_ * xRand + (long) p_73153_3_ * zRand ^ worldObj.getSeed());
            org.bukkit.World world = this.worldObj.getWorld();

            if (world != null)
            {
                this.worldObj.populating = true;

                try
                {
                    for (org.bukkit.generator.BlockPopulator populator : world.getPopulators())
                    {
                        populator.populate(world, random, chunk.bukkitChunk);
                    }
                }
                finally
                {
                    this.worldObj.populating = false;
                }
            }

            BlockSand.fallInstantly = false;
            this.worldObj.getServer().getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(chunk.bukkitChunk));
            // CraftBukkit end
            GameRegistry.generateWorld(p_73153_2_, p_73153_3_, worldObj, currentChunkProvider, p_73153_1_);
            chunk.setChunkModified();
        }
    }
}
 
開發者ID:xtrafrancyz,項目名稱:Cauldron,代碼行數:46,代碼來源:ChunkProviderServer.java

示例15: populate

import net.minecraft.block.BlockSand; //導入方法依賴的package包/類
/**
 * Populates chunk with ores etc etc
 */
public void populate(IChunkProvider par1IChunkProvider, int par2, int par3) {
	BlockSand.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));

	if (this.mapFeaturesEnabled) {
		//	this.mineshaftGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
		flag = this.villageGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
		System.out.println("flag is " + flag);
		this.strongholdGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
		this.scatteredFeatureGenerator.generateStructuresInChunk(this.worldObj, this.rand, par2, par3);
	}

	int k1;
	int l1;
	int i2;

	if (TerrainGen.populate(par1IChunkProvider, worldObj, rand, par2, par3, flag, LAKE) && !flag && this.rand.nextInt(4) == 0) {
		k1 = k + this.rand.nextInt(16) + 8;
		l1 = this.rand.nextInt(128);
		i2 = l + this.rand.nextInt(16) + 8;
		(new WorldGenLakes(Fluids.blockRasterWasser.blockID)).generate(this.worldObj, this.rand, 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(120) + 8);
		i2 = l + this.rand.nextInt(16) + 8;

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

	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(128);
		int j2 = l + this.rand.nextInt(16) + 8;

		if ((new WorldGenDungeons()).generate(this.worldObj, this.rand, l1, i2, j2)) {
			;
		}
	}

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

	BlockSand.fallInstantly = false;
}
 
開發者ID:mrgregfinch,項目名稱:powell.cellarium,代碼行數:61,代碼來源:RasterlandChunkProvider.java


注:本文中的net.minecraft.block.BlockSand.fallInstantly方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。