Fixed which biomes can appear as Biome Essence, prevented the Cold Beach from generating alongside the Alps
This commit is contained in:
parent
d7928f8bb9
commit
67901ed0c2
15 changed files with 73 additions and 4 deletions
|
@ -39,6 +39,8 @@ public class BiomeCorruptedSands extends BOPHellBiome
|
|||
this.fillerBlock = Blocks.SOUL_SAND.getDefaultState();
|
||||
this.wallBlock = Blocks.SOUL_SAND.getDefaultState();
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
// quicksand
|
||||
this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(5.0F).liquid(BOPBlocks.sand).frozenLiquid((IBlockState)null).scatterYMethod(ScatterYMethod.NETHER_SURFACE).create());
|
||||
|
||||
|
|
|
@ -54,6 +54,8 @@ public class BiomeFungiForest extends BOPHellBiome
|
|||
|
||||
this.addWeight(BOPClimates.HELL, 75);
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.usualTopBlock = this.topBlock;
|
||||
this.alternateTopBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.MYCELIAL_NETHERRACK);
|
||||
|
||||
|
|
|
@ -31,6 +31,8 @@ public class BiomePhantasmagoricInferno extends BOPHellBiome
|
|||
|
||||
this.addWeight(BOPClimates.HELL, 75);
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.topBlock = BOPBlocks.ash_block.getDefaultState();
|
||||
this.fillerBlock = BOPBlocks.ash_block.getDefaultState();
|
||||
|
||||
|
|
|
@ -33,6 +33,8 @@ public class BiomePolarChasm extends BOPHellBiome
|
|||
this.fogColor = 0x86C9EF;
|
||||
this.fogDensity = 0.4F;
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.topBlock = BOPBlocks.hard_ice.getDefaultState();
|
||||
this.fillerBlock = BOPBlocks.hard_ice.getDefaultState();
|
||||
this.roofTopBlock = BOPBlocks.hard_ice.getDefaultState();
|
||||
|
|
|
@ -42,6 +42,8 @@ public class BiomeUndergarden extends BOPHellBiome
|
|||
|
||||
this.addWeight(BOPClimates.HELL, 75);
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.OVERGROWN_NETHERRACK);
|
||||
|
||||
// splatter top blocks
|
||||
|
|
|
@ -53,6 +53,8 @@ public class BiomeVisceralHeap extends BOPHellBiome
|
|||
|
||||
this.addWeight(BOPClimates.HELL, 75);
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.topBlock = BOPBlocks.flesh.getDefaultState();
|
||||
this.fillerBlock = BOPBlocks.flesh.getDefaultState();
|
||||
this.wallBlock = BOPBlocks.flesh.getDefaultState();
|
||||
|
|
|
@ -34,6 +34,8 @@ public class BiomeGenCoralReef extends BOPOverworldBiome
|
|||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.OCEAN);
|
||||
|
||||
clearWeights();
|
||||
|
|
|
@ -36,6 +36,7 @@ public class BiomeGenGlacier extends BOPOverworldBiome
|
|||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableCreatureList.add(new Biome.SpawnListEntry(EntityPolarBear.class, 1, 1, 2));
|
||||
|
|
|
@ -24,6 +24,7 @@ public class BiomeGenGravelBeach extends BOPOverworldBiome
|
|||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ public class BiomeGenKelpForest extends BOPOverworldBiome
|
|||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.OCEAN);
|
||||
|
||||
|
|
|
@ -76,6 +76,7 @@ public class BiomeGenMountain extends BOPOverworldBiome
|
|||
|
||||
case FOOTHILLS:
|
||||
this.terrainSettings.avgHeight(100).heightVariation(15, 30).octaves(0, 1, 1, 3, 1, 0).sidewaysNoise(0.1D);
|
||||
this.hasBiomeEssence = false;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ public class BiomeGenOasis extends BOPOverworldBiome
|
|||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.topBlock = Blocks.SAND.getDefaultState();
|
||||
this.fillerBlock = Blocks.SAND.getDefaultState();
|
||||
|
|
|
@ -25,6 +25,7 @@ public class BiomeGenWhiteBeach extends BOPOverworldBiome
|
|||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.hasBiomeEssence = false;
|
||||
|
||||
this.spawnableMonsterList.clear();
|
||||
this.spawnableCreatureList.clear();
|
||||
|
|
|
@ -13,6 +13,7 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.item.BOPItems;
|
||||
import biomesoplenty.common.biome.BOPBiome;
|
||||
import biomesoplenty.common.util.biome.BiomeUtils;
|
||||
|
@ -48,6 +49,7 @@ public class BlockBOPBiomeBlock extends BlockBOPGeneric
|
|||
|
||||
List<Biome> vanillaBiomesToExclude = Arrays.asList(
|
||||
new Biome[] {
|
||||
Biomes.DEFAULT,
|
||||
Biomes.SKY,
|
||||
Biomes.HELL,
|
||||
Biomes.BEACH,
|
||||
|
@ -57,7 +59,44 @@ public class BlockBOPBiomeBlock extends BlockBOPGeneric
|
|||
Biomes.FROZEN_OCEAN,
|
||||
Biomes.DEEP_OCEAN,
|
||||
Biomes.RIVER,
|
||||
Biomes.FROZEN_RIVER
|
||||
Biomes.FROZEN_RIVER,
|
||||
Biomes.VOID,
|
||||
Biomes.MUSHROOM_ISLAND_SHORE,
|
||||
Biomes.DESERT_HILLS,
|
||||
Biomes.BIRCH_FOREST_HILLS,
|
||||
Biomes.COLD_TAIGA_HILLS,
|
||||
Biomes.EXTREME_HILLS_EDGE,
|
||||
Biomes.EXTREME_HILLS_WITH_TREES,
|
||||
Biomes.FOREST_HILLS,
|
||||
Biomes.ICE_MOUNTAINS,
|
||||
Biomes.JUNGLE_EDGE,
|
||||
Biomes.JUNGLE_HILLS,
|
||||
Biomes.MESA_CLEAR_ROCK,
|
||||
Biomes.MESA_ROCK,
|
||||
Biomes.MUTATED_BIRCH_FOREST,
|
||||
Biomes.MUTATED_BIRCH_FOREST_HILLS,
|
||||
Biomes.MUTATED_DESERT,
|
||||
Biomes.MUTATED_EXTREME_HILLS,
|
||||
Biomes.MUTATED_EXTREME_HILLS_WITH_TREES,
|
||||
Biomes.MUTATED_FOREST,
|
||||
Biomes.MUTATED_ICE_FLATS,
|
||||
Biomes.MUTATED_JUNGLE,
|
||||
Biomes.MUTATED_JUNGLE_EDGE,
|
||||
Biomes.MUTATED_MESA,
|
||||
Biomes.MUTATED_MESA_CLEAR_ROCK,
|
||||
Biomes.MUTATED_MESA_ROCK,
|
||||
Biomes.MUTATED_PLAINS,
|
||||
Biomes.MUTATED_REDWOOD_TAIGA,
|
||||
Biomes.MUTATED_REDWOOD_TAIGA_HILLS,
|
||||
Biomes.MUTATED_ROOFED_FOREST,
|
||||
Biomes.MUTATED_SAVANNA,
|
||||
Biomes.MUTATED_SAVANNA_ROCK,
|
||||
Biomes.MUTATED_SWAMPLAND,
|
||||
Biomes.MUTATED_TAIGA,
|
||||
Biomes.MUTATED_TAIGA_COLD,
|
||||
Biomes.REDWOOD_TAIGA_HILLS,
|
||||
Biomes.SAVANNA_PLATEAU,
|
||||
Biomes.TAIGA_HILLS
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -85,7 +124,7 @@ public class BlockBOPBiomeBlock extends BlockBOPGeneric
|
|||
Random rand = world instanceof World ? ((World)world).rand : RANDOM;
|
||||
|
||||
List<Biome> biomes = this.getBiomesWithEssence();
|
||||
int numToDrop = rand.nextInt(fortune + 2) + 1;
|
||||
int numToDrop = rand.nextInt(fortune + 1) + 1;
|
||||
int numChoices = biomes.size();
|
||||
Biome biome;
|
||||
|
||||
|
|
|
@ -69,9 +69,19 @@ public class GenLayerShoreBOP extends BOPGenLayer
|
|||
if (biome != null && biome.isSnowyBiome()) //Snowy biomes should have cold beaches
|
||||
{
|
||||
//Frozen ocean should not have a beach
|
||||
if (isBiomeOceanic(biomeId)) out[x + z * areaWidth] = biomeId;
|
||||
if (isBiomeOceanic(biomeId))
|
||||
{
|
||||
out[x + z * areaWidth] = biomeId;
|
||||
}
|
||||
else
|
||||
setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, Biome.getIdForBiome(Biomes.COLD_BEACH), OCEANIC_PREDICATE);
|
||||
{
|
||||
if (biome != null && BOPBiomes.REG_INSTANCE.getExtendedBiome(biome) != null)
|
||||
{
|
||||
IExtendedBiome extBiome = BOPBiomes.REG_INSTANCE.getExtendedBiome(biome);
|
||||
Biome beachBiome = BiomeUtils.getBiomeForLoc(extBiome.getBeachLocation());
|
||||
setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, beachBiome == null ? biomeId : Biome.getIdForBiome(Biomes.COLD_BEACH), OCEANIC_PREDICATE);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (biomeId != Biome.getIdForBiome(Biomes.MESA) && biomeId != Biome.getIdForBiome(Biomes.MESA_ROCK))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue