Java 类net.minecraft.world.gen.feature.WorldGenMelon 实例源码

项目:DecompiledMinecraft    文件:BiomeGenJungle.java   
public void decorate(World worldIn, Random rand, BlockPos pos)
{
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    int k = rand.nextInt(worldIn.getHeight(pos.add(i, 0, j)).getY() * 2);
    (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    for (j = 0; j < 50; ++j)
    {
        k = rand.nextInt(16) + 8;
        int l = 128;
        int i1 = rand.nextInt(16) + 8;
        worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
    }
}
项目:DecompiledMinecraft    文件:BiomeGenJungle.java   
public void decorate(World worldIn, Random rand, BlockPos pos)
{
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    int k = rand.nextInt(worldIn.getHeight(pos.add(i, 0, j)).getY() * 2);
    (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    for (j = 0; j < 50; ++j)
    {
        k = rand.nextInt(16) + 8;
        int l = 128;
        int i1 = rand.nextInt(16) + 8;
        worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
    }
}
项目:BaseClient    文件:BiomeGenJungle.java   
public void decorate(World worldIn, Random rand, BlockPos pos)
{
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    int k = rand.nextInt(worldIn.getHeight(pos.add(i, 0, j)).getY() * 2);
    (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    for (j = 0; j < 50; ++j)
    {
        k = rand.nextInt(16) + 8;
        int l = 128;
        int i1 = rand.nextInt(16) + 8;
        worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
    }
}
项目:BaseClient    文件:BiomeGenJungle.java   
public void decorate(World worldIn, Random rand, BlockPos pos)
{
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    int k = rand.nextInt(worldIn.getHeight(pos.add(i, 0, j)).getY() * 2);
    (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    for (j = 0; j < 50; ++j)
    {
        k = rand.nextInt(16) + 8;
        int l = 128;
        int i1 = rand.nextInt(16) + 8;
        worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
    }
}
项目:Backmemed    文件:BiomeJungle.java   
public void decorate(World worldIn, Random rand, BlockPos pos)
{
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    int k = rand.nextInt(worldIn.getHeight(pos.add(i, 0, j)).getY() * 2);
    (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    for (j = 0; j < 50; ++j)
    {
        k = rand.nextInt(16) + 8;
        int l = 128;
        int i1 = rand.nextInt(16) + 8;
        worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
    }
}
项目:CustomWorldGen    文件:BiomeJungle.java   
public void decorate(World worldIn, Random rand, BlockPos pos)
{
    super.decorate(worldIn, rand, pos);
    int i = rand.nextInt(16) + 8;
    int j = rand.nextInt(16) + 8;
    int height = worldIn.getHeight(pos.add(i, 0, j)).getY() * 2; // could == 0, which crashes nextInt
    if (height < 1) height = 1;
    int k = rand.nextInt(height);
    if(net.minecraftforge.event.terraingen.TerrainGen.decorate(worldIn, rand, pos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.PUMPKIN))
    (new WorldGenMelon()).generate(worldIn, rand, pos.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    if(net.minecraftforge.event.terraingen.TerrainGen.decorate(worldIn, rand, pos, net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate.EventType.GRASS))
    for (j = 0; j < 50; ++j)
    {
        k = rand.nextInt(16) + 8;
        int l = 128;
        int i1 = rand.nextInt(16) + 8;
        worldgenvines.generate(worldIn, rand, pos.add(k, 128, i1));
    }
}
项目:Resilience-Client-Source    文件:BiomeGenJungle.java   
public void decorate(World par1World, Random par2Random, int par3, int par4)
{
    super.decorate(par1World, par2Random, par3, par4);
    int var5 = par3 + par2Random.nextInt(16) + 8;
    int var6 = par4 + par2Random.nextInt(16) + 8;
    int var7 = par2Random.nextInt(par1World.getHeightValue(var5, var6) * 2);
    (new WorldGenMelon()).generate(par1World, par2Random, var5, var7, var6);
    WorldGenVines var10 = new WorldGenVines();

    for (var6 = 0; var6 < 50; ++var6)
    {
        var7 = par3 + par2Random.nextInt(16) + 8;
        short var8 = 128;
        int var9 = par4 + par2Random.nextInt(16) + 8;
        var10.generate(par1World, par2Random, var7, var8, var9);
    }
}
项目:ZeroQuest    文件:BiomeGenNileJungle.java   
public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_)
{
    super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_);
    int k = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
    int l = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
    int height = p_76728_1_.getHeightValue(k, l) * 2; //This was the original input for the nextInt below.  But it could == 0, which crashes nextInt
    if (height < 1) height = 1;
    int i1 = p_76728_2_.nextInt(height);
    (new WorldGenMelon()).generate(p_76728_1_, p_76728_2_, k, i1, l);
    WorldGenVines worldgenvines = new WorldGenVines();

    for (l = 0; l < 50; ++l)
    {
        i1 = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
        short short1 = 128;
        int j1 = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
        worldgenvines.generate(p_76728_1_, p_76728_2_, i1, short1, j1);
    }
}
项目:ZeroQuest    文件:BiomeGenNileJungle.java   
public void decorate(World worldIn, Random p_180624_2_, BlockPos p_180624_3_)
{
    super.decorate(worldIn, p_180624_2_, p_180624_3_);
    int i = p_180624_2_.nextInt(16) + 8;
    int j = p_180624_2_.nextInt(16) + 8;
    int height = worldIn.getHeight(p_180624_3_.add(i, 0, j)).getY() * 2; // could == 0, which crashes nextInt
    if (height < 1) height = 1;
    int k = p_180624_2_.nextInt(height);
    (new WorldGenMelon()).generate(worldIn, p_180624_2_, p_180624_3_.add(i, k, j));
    WorldGenVines worldgenvines = new WorldGenVines();

    for (j = 0; j < 50; ++j)
    {
        k = p_180624_2_.nextInt(16) + 8;
        boolean flag = true;
        int l = p_180624_2_.nextInt(16) + 8;
        worldgenvines.generate(worldIn, p_180624_2_, p_180624_3_.add(k, 128, l));
    }
}
项目:Cauldron    文件:BiomeGenJungle.java   
public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_)
{
    super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_);
    int k = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
    int l = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
    int height = p_76728_1_.getHeightValue(k, l) * 2; //This was the original input for the nextInt below.  But it could == 0, which crashes nextInt
    if (height < 1) height = 1;
    int i1 = p_76728_2_.nextInt(height);
    (new WorldGenMelon()).generate(p_76728_1_, p_76728_2_, k, i1, l);
    WorldGenVines worldgenvines = new WorldGenVines();

    for (l = 0; l < 50; ++l)
    {
        i1 = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
        short short1 = 128;
        int j1 = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
        worldgenvines.generate(p_76728_1_, p_76728_2_, i1, short1, j1);
    }
}
项目:Cauldron    文件:BiomeGenJungle.java   
public void decorate(World p_76728_1_, Random p_76728_2_, int p_76728_3_, int p_76728_4_)
{
    super.decorate(p_76728_1_, p_76728_2_, p_76728_3_, p_76728_4_);
    int k = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
    int l = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
    int height = p_76728_1_.getHeightValue(k, l) * 2; //This was the original input for the nextInt below.  But it could == 0, which crashes nextInt
    if (height < 1) height = 1;
    int i1 = p_76728_2_.nextInt(height);
    (new WorldGenMelon()).generate(p_76728_1_, p_76728_2_, k, i1, l);
    WorldGenVines worldgenvines = new WorldGenVines();

    for (l = 0; l < 50; ++l)
    {
        i1 = p_76728_3_ + p_76728_2_.nextInt(16) + 8;
        short short1 = 128;
        int j1 = p_76728_4_ + p_76728_2_.nextInt(16) + 8;
        worldgenvines.generate(p_76728_1_, p_76728_2_, i1, short1, j1);
    }
}