本文整理汇总了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));
}
}
}
示例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);
}
}
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}