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


Java Biomes.JUNGLE属性代码示例

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


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

示例1: Start

public Start(World worldIn, Random random, int chunkX, int chunkZ, Biome biomeIn)
{
    super(chunkX, chunkZ);

    if (biomeIn != Biomes.JUNGLE && biomeIn != Biomes.JUNGLE_HILLS)
    {
        if (biomeIn == Biomes.SWAMPLAND)
        {
            ComponentScatteredFeaturePieces.SwampHut componentscatteredfeaturepieces$swamphut = new ComponentScatteredFeaturePieces.SwampHut(random, chunkX * 16, chunkZ * 16);
            this.components.add(componentscatteredfeaturepieces$swamphut);
        }
        else if (biomeIn != Biomes.DESERT && biomeIn != Biomes.DESERT_HILLS)
        {
            if (biomeIn == Biomes.ICE_PLAINS || biomeIn == Biomes.COLD_TAIGA)
            {
                ComponentScatteredFeaturePieces.Igloo componentscatteredfeaturepieces$igloo = new ComponentScatteredFeaturePieces.Igloo(random, chunkX * 16, chunkZ * 16);
                this.components.add(componentscatteredfeaturepieces$igloo);
            }
        }
        else
        {
            ComponentScatteredFeaturePieces.DesertPyramid componentscatteredfeaturepieces$desertpyramid = new ComponentScatteredFeaturePieces.DesertPyramid(random, chunkX * 16, chunkZ * 16);
            this.components.add(componentscatteredfeaturepieces$desertpyramid);
        }
    }
    else
    {
        ComponentScatteredFeaturePieces.JunglePyramid componentscatteredfeaturepieces$junglepyramid = new ComponentScatteredFeaturePieces.JunglePyramid(random, chunkX * 16, chunkZ * 16);
        this.components.add(componentscatteredfeaturepieces$junglepyramid);
    }

    this.updateBoundingBox();
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:33,代码来源:MapGenScatteredFeature.java

示例2: generateSurface

private void generateSurface(World world, Random random, int x, int z) {
    for (int i = 0; i < 3; i++) {
        int Xcoord1 = x + random.nextInt(16); //where in chuck it generates
        int Ycoord1 = random.nextInt(89) + 49; //arg = randge + = min
        int Zcoord1 = z + random.nextInt(16); //where in chunk it generates


        final Biome biome = world.getBiomeGenForCoords(new BlockPos(Xcoord1, Ycoord1, Zcoord1));
        BlockPos blockPos = new BlockPos(Xcoord1, Ycoord1, Zcoord1);
        if (world.isAirBlock(blockPos.up()) && world.isAirBlock(blockPos)) {
            new OrangeTreeGenerator().generate(world, random, new BlockPos(Xcoord1, Ycoord1, Zcoord1));
        }

        if(biome == Biomes.JUNGLE || biome == Biomes.JUNGLE_EDGE || biome == Biomes.JUNGLE_HILLS) {
            Xcoord1 = x + random.nextInt(16); //where in chuck it generates
            Ycoord1 = random.nextInt(89) + 49; //arg = randge + = min
            Zcoord1 = z + random.nextInt(16); //where in chunk it generates
            new BananaWorldGenTrees(false, 6, 3, 0, true).generate(world, random, new BlockPos(Xcoord1, Ycoord1, Zcoord1));
        }else if(shouldTreesSpawn(biome)){
            Xcoord1 = x + random.nextInt(16); //where in chuck it generates
            Ycoord1 = random.nextInt(89) + 49; //arg = randge + = min
            Zcoord1 = z + random.nextInt(16); //where in chunk it generates
            int rand = random.nextInt(100);
            if(rand > 75) {
                new OliveWorldGenTrees(false).generate(world, random, new BlockPos(Xcoord1, Ycoord1, Zcoord1));
            }
        }

    }

}
 
开发者ID:TeamDmfMM,项目名称:Extra-Food,代码行数:31,代码来源:TreeManager.java

示例3: swapHackBiome

public Biome swapHackBiome(Biome b)
{
	return b == Biomes.RIVER || b == Biomes.FROZEN_RIVER ? ExPBiomes.river : b == Biomes.OCEAN || b == Biomes.DEEP_OCEAN || b == Biomes.FROZEN_OCEAN ? ExPBiomes.ocean : b == Biomes.BEACH ? ExPBiomes.beach : b == Biomes.PLAINS ? ExPBiomes.plains : b == Biomes.FOREST_HILLS ? ExPBiomes.hills : b == Biomes.JUNGLE || b == Biomes.JUNGLE_EDGE || b == Biomes.JUNGLE_HILLS ? ExPBiomes.jungle : b == Biomes.FOREST ? ExPBiomes.forest : b;
}
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:4,代码来源:WorldTypeExP.java


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