Java Code Examples for net.minecraft.block.BlockSand#fallInstantly()

The following examples show how to use net.minecraft.block.BlockSand#fallInstantly() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MoCChunkProviderWyvernLair.java    From mocreaturesdev with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Populates chunk with ores etc etc
 */
public void populate_old(IChunkProvider par1IChunkProvider, int par2, int par3)
{
    BlockSand.fallInstantly = true;

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

    int var4 = par2 * 16;
    int var5 = par3 * 16;
    BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
    var6.decorate(this.worldObj, this.worldObj.rand, var4, var5);

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

    BlockSand.fallInstantly = false;
}
 
Example 2
Source File: MoCChunkProviderWyvernLair.java    From mocreaturesdev with GNU General Public License v3.0 4 votes vote down vote up
/**
     * 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, worldObj, worldObj.rand, par2, par3, false));
        
        int var4 = par2 * 16;
        int var5 = par3 * 16;
        BiomeGenBase var6 = this.worldObj.getBiomeGenForCoords(var4 + 16, var5 + 16);
        
        
        //this.RNGa.setSeed(this.worldObj.getSeed());
        long var7 = this.RNGa.nextLong() / 2L * 2L + 1L;
        long var9 = this.RNGa.nextLong() / 2L * 2L + 1L;
        //this.RNGa.setSeed((long)par2 * var7 + (long)par3 * var9 ^ this.worldObj.getSeed());
        boolean var11 = false;

        
        int var12;
        int var13;
        int var14;

        if (!var11 && this.RNGa.nextInt(2) == 0)
        {
            var12 = var4 + this.RNGa.nextInt(16) + 8;
            var13 = this.RNGa.nextInt(128);
            var14 = var5 + this.RNGa.nextInt(16) + 8;
            (new WorldGenLakes(Block.waterStill.blockID)).generate(this.worldObj, this.RNGa, var12, var13, var14);
        }

        if (!var11 && this.RNGa.nextInt(8) == 0)
        {
            var12 = var4 + this.RNGa.nextInt(16) + 8;
            var13 = this.RNGa.nextInt(this.RNGa.nextInt(120) + 8);
            var14 = var5 + this.RNGa.nextInt(16) + 8;

            if (var13 < 63 || this.RNGa.nextInt(10) == 0)
            {
                (new WorldGenLakes(Block.lavaStill.blockID)).generate(this.worldObj, this.RNGa, var12, var13, var14);
            }
        }
        
        

        
        var6.decorate(this.worldObj, this.RNGa, var4, var5);
        SpawnerAnimals.performWorldGenSpawning(this.worldObj, var6, var4 + 8, var5 + 8, 16, 16, this.RNGa);

        if (!portalDone) createPortal(this.worldObj, this.RNGa);
        
/*        while(!portalDone)
        {
        	createPortal(this.worldObj, this.RNGa);
        }
*/
        MinecraftForge.EVENT_BUS.post(new PopulateChunkEvent.Post(par1IChunkProvider, worldObj, worldObj.rand, par2, par3, false));
        
        BlockSand.fallInstantly = false;
    }