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


Java Biomes.FOREST_HILLS属性代码示例

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


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

示例1: updateTick

@Override
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) {
    super.updateTick(worldIn, pos, state, rand);
    if (!worldIn.isRemote) {
        if (state.getValue(AGE) == 2) {
            EntityFaerie faerie = new EntityFaerie(worldIn, 4.0D, 0, 0.1F, 1);
            faerie.setPosition((double) pos.getX(), (double) pos.up().getY(), (double) pos.getZ());
            worldIn.spawnEntity(faerie);
        }
        if (!(worldIn.getBiome(pos) == Biomes.FOREST ||
                worldIn.getBiome(pos) == Biomes.FOREST_HILLS ||
                worldIn.getBiome(pos) == Biomes.TAIGA ||
                worldIn.getBiome(pos) == Biomes.TAIGA_HILLS) && state.getValue(AGE) >= 1) {
            worldIn.setBlockState(pos, state.withProperty(AGE, 0));
        }
    }

}
 
开发者ID:BenjaminSutter,项目名称:genera,代码行数:18,代码来源:BlockNightshadeCrop.java

示例2: generate

@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
		IChunkProvider chunkProvider) {
	if (random.nextInt(20) == 0){
		int x = chunkX * 16 + 2 + random.nextInt(12);
		int z = chunkZ * 16 + 2 + random.nextInt(12);
		BlockPos p = new BlockPos(x,0,z);
		p = world.getHeight(p);
		Biome b = world.getBiome(p);
		if (BiomeDictionary.hasType(b, BiomeDictionary.Type.FOREST) || b == Biomes.FOREST || b == Biomes.FOREST_HILLS){
			if (world.getBlockState(p.down()).getBlock() instanceof BlockGrass && world.isAirBlock(p)){
				BlockTeaSapling.generateTree(world, p, Blocks.AIR.getDefaultState(), random);
			}
		}
	}
}
 
开发者ID:elucent,项目名称:SimplyTea,代码行数:16,代码来源:SimplyTea.java

示例3: getDarklandsBiome

private Biome getDarklandsBiome(Biome b, boolean b1){
	if(b == Biomes.PLAINS || b == Biomes.MUTATED_PLAINS)
		return b1 ? ACBiomes.darklands_plains : ACBiomes.darklands;
	else if(b == Biomes.FOREST || b == Biomes.MUTATED_FOREST || b == Biomes.FOREST_HILLS)
		return ACBiomes.darklands_forest;
	else if(b == Biomes.ICE_MOUNTAINS || b == Biomes.MUTATED_EXTREME_HILLS && b1)
		return ACBiomes.darklands_mountains;
	else if(b == Biomes.EXTREME_HILLS || b == Biomes.MUTATED_EXTREME_HILLS)
		return ACBiomes.darklands_hills;
	return ACBiomes.darklands;
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:11,代码来源:DisruptionCorruption.java

示例4: canCompleteRitual

@Override
public boolean canCompleteRitual(World world, BlockPos pos, EntityPlayer player) {
	Biome b = world.getBiome(pos);
	return b == Biomes.PLAINS || b == Biomes.EXTREME_HILLS || b == Biomes.FOREST || b == Biomes.ICE_MOUNTAINS ||
			b == Biomes.MUTATED_PLAINS || b == Biomes.MUTATED_EXTREME_HILLS || b == Biomes.MUTATED_FOREST ||
			b == Biomes.FOREST_HILLS;
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:7,代码来源:NecronomiconCorruptionRitual.java

示例5: 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

示例6: isCorrectBiome

private boolean isCorrectBiome(World world, BlockPos pos) {
	Biome b = world.getBiome(pos);
	return b == Biomes.PLAINS || b == Biomes.EXTREME_HILLS || b == Biomes.FOREST || b == Biomes.ICE_MOUNTAINS ||
			b == Biomes.MUTATED_PLAINS || b == Biomes.MUTATED_EXTREME_HILLS || b == Biomes.MUTATED_FOREST ||
			b == Biomes.FOREST_HILLS;
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:6,代码来源:DisruptionCorruption.java


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