• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java WorldGenMelon类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.world.gen.feature.WorldGenMelon的典型用法代码示例。如果您正苦于以下问题:Java WorldGenMelon类的具体用法?Java WorldGenMelon怎么用?Java WorldGenMelon使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



WorldGenMelon类属于net.minecraft.world.gen.feature包,在下文中一共展示了WorldGenMelon类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: decorate

import net.minecraft.world.gen.feature.WorldGenMelon; //导入依赖的package包/类
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));
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:BiomeGenJungle.java


示例2: decorate

import net.minecraft.world.gen.feature.WorldGenMelon; //导入依赖的package包/类
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));
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:22,代码来源:BiomeJungle.java


示例3: decorate

import net.minecraft.world.gen.feature.WorldGenMelon; //导入依赖的package包/类
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);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:18,代码来源:BiomeGenJungle.java


示例4: decorate

import net.minecraft.world.gen.feature.WorldGenMelon; //导入依赖的package包/类
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);
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:20,代码来源:BiomeGenNileJungle.java


示例5: decorate

import net.minecraft.world.gen.feature.WorldGenMelon; //导入依赖的package包/类
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));
    }
}
 
开发者ID:NovaViper,项目名称:ZeroQuest,代码行数:20,代码来源:BiomeGenNileJungle.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WGS84Point类代码示例发布时间:2022-05-23
下一篇:
Java ListSequence类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap