From f1c400ed114ba2834c1270d811c8751d818bfbdd Mon Sep 17 00:00:00 2001 From: Adubbz Date: Tue, 7 Apr 2015 23:28:02 +1000 Subject: [PATCH] Added the arctic biome --- .../biomesoplenty/api/biome/BOPBiomes.java | 1 + .../biome/overworld/BiomeGenArctic.java | 49 +++++++++++++++++++ .../biomesoplenty/common/init/ModBiomes.java | 4 +- 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java diff --git a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java index 4520059f5..035163bfe 100644 --- a/src/main/java/biomesoplenty/api/biome/BOPBiomes.java +++ b/src/main/java/biomesoplenty/api/biome/BOPBiomes.java @@ -15,4 +15,5 @@ import net.minecraft.world.biome.BiomeGenBase; public class BOPBiomes { public static Optional alps = Optional.absent(); + public static Optional arctic = Optional.absent(); } diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java new file mode 100644 index 000000000..99740893d --- /dev/null +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenArctic.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright 2015, the Biomes O' Plenty Team + * + * This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License. + * + * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. + ******************************************************************************/ + +package biomesoplenty.common.biome.overworld; + +import net.minecraft.util.BlockPos; +import net.minecraftforge.common.BiomeManager.BiomeType; +import biomesoplenty.api.biome.BOPBiome; +import biomesoplenty.api.biome.generation.GeneratorStage; +import biomesoplenty.api.block.BOPBlocks; +import biomesoplenty.common.block.BlockGem; +import biomesoplenty.common.block.BlockGem.GemType; +import biomesoplenty.common.world.feature.GeneratorOreSingle; + +public class BiomeGenArctic extends BOPBiome +{ + private static final Height biomeHeight = new Height(0F, 0F); + + public BiomeGenArctic() + { + this.setHeight(biomeHeight); + this.setColor(14540253); + this.setEnableSnow(); + this.setTemperatureRainfall(0.05F, 0.5F); + + this.addWeight(BiomeType.ICY, 10); + + this.spawnableCreatureList.clear(); + + this.addGenerator("tanzanite", GeneratorStage.SAND, new GeneratorOreSingle(BOPBlocks.gem_ore.getDefaultState().withProperty(BlockGem.VARIANT, GemType.TANZANITE), 12, 4, 32)); + } + + @Override + public int getGrassColorAtPos(BlockPos pos) + { + return 11176526; + } + + @Override + public int getFoliageColorAtPos(BlockPos pos) + { + return 11903827; + } +} diff --git a/src/main/java/biomesoplenty/common/init/ModBiomes.java b/src/main/java/biomesoplenty/common/init/ModBiomes.java index 31db67d7f..f1d0a1b03 100644 --- a/src/main/java/biomesoplenty/common/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/common/init/ModBiomes.java @@ -8,7 +8,7 @@ package biomesoplenty.common.init; -import static biomesoplenty.api.biome.BOPBiomes.alps; +import static biomesoplenty.api.biome.BOPBiomes.*; import java.io.File; import java.io.IOException; @@ -18,6 +18,7 @@ import net.minecraft.world.biome.BiomeGenBase; import org.apache.commons.io.FileUtils; import biomesoplenty.common.biome.overworld.BiomeGenAlps; +import biomesoplenty.common.biome.overworld.BiomeGenArctic; import biomesoplenty.common.command.BOPCommand; import biomesoplenty.common.util.config.JsonBiome; import biomesoplenty.common.world.WorldTypeBOP; @@ -43,6 +44,7 @@ public class ModBiomes private static void registerBiomes() { alps = registerBiome(new BiomeGenAlps().setBiomeName("Alps"), "alps"); + arctic = registerBiome(new BiomeGenArctic().setBiomeName("Arctic"), "arctic"); } private static void registerExternalBiomes()