Java Code Examples for net.minecraft.init.Biomes#DESERT_HILLS

The following examples show how to use net.minecraft.init.Biomes#DESERT_HILLS . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WorldGenLoader.java    From Sakura_mod with MIT License 5 votes vote down vote up
@SubscribeEvent
   public void HotSpringGen(Decorate event) {
   	if(Loader.isModLoaded("tfc"))
   		return;
   	BlockPos pos = event.getChunkPos().getBlock(event.getRand().nextInt(16) + 8, 0, event.getRand().nextInt(16) + 8);
   	BlockPos newPos = WorldUtil.findGround(event.getWorld(),pos, true, false, true);
   	Biome biome = event.getWorld().getBiome(pos);
       
   	if (newPos != null&&event.getWorld().provider instanceof WorldProviderSurface&&biome != Biomes.DESERT && biome != Biomes.DESERT_HILLS && event.getRand().nextFloat() < SakuraConfig.hotspring_weight / 10000.0F) {
           new WorldGenHotSpring().generate(event.getWorld(), event.getRand(), newPos);
       }
}