From 896e059938e54694922ca213328b6951c566e99c Mon Sep 17 00:00:00 2001 From: Adubbz Date: Tue, 9 Feb 2016 13:22:04 +1100 Subject: [PATCH] Fixed removing beaches from certain biomes --- .../java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java | 2 -- .../biomesoplenty/common/biome/overworld/BiomeGenBayou.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenCanyon.java | 2 +- .../java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java | 2 +- .../common/biome/overworld/BiomeGenFungiForest.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenMarsh.java | 2 +- .../common/biome/overworld/BiomeGenMysticGrove.java | 2 +- .../common/biome/overworld/BiomeGenOminousWoods.java | 2 +- .../common/biome/overworld/BiomeGenOvergrownCliffs.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java | 2 +- .../common/biome/overworld/BiomeGenRainforest.java | 2 +- .../common/biome/overworld/BiomeGenSacredSprings.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenWasteland.java | 2 +- .../biomesoplenty/common/biome/overworld/BiomeGenWetland.java | 2 +- src/main/java/biomesoplenty/common/init/ModBiomes.java | 1 + .../java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java | 2 +- 18 files changed, 17 insertions(+), 18 deletions(-) diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java index 4d627d944..76c08f347 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenAlps.java @@ -36,8 +36,6 @@ public class BiomeGenAlps extends BOPBiome this.addWeight(BOPClimates.TUNDRA, 3); this.addWeight(BOPClimates.ICE_CAP, 5); - this.beachBiomeId = this.biomeID; - this.topBlock = Blocks.snow.getDefaultState(); this.fillerBlock = Blocks.snow.getDefaultState(); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java index 0fdfee74a..13ddd4887 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenBayou.java @@ -60,7 +60,7 @@ public class BiomeGenBayou extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.HOT_SWAMP, 10); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCanyon.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCanyon.java index e17677470..7943f9873 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCanyon.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCanyon.java @@ -50,7 +50,7 @@ public class BiomeGenCanyon extends BOPBiome this.canSpawnInBiome = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.spawnableCreatureList.clear(); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java index 8fc174337..e68e78653 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenCrag.java @@ -30,7 +30,7 @@ public class BiomeGenCrag extends BOPBiome this.canGenerateVillages = false; this.canGenerateRivers = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.COLD_SWAMP, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java index eb5e59169..d492b3c18 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenDeadSwamp.java @@ -59,7 +59,7 @@ public class BiomeGenDeadSwamp extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.COLD_SWAMP, 3); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFungiForest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFungiForest.java index 427c7c2e3..1e8620482 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFungiForest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenFungiForest.java @@ -57,7 +57,7 @@ public class BiomeGenFungiForest extends BOPBiome this.canSpawnInBiome = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.TROPICAL, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java index 248a15c84..6f72683ea 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenLushSwamp.java @@ -64,7 +64,7 @@ public class BiomeGenLushSwamp extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.WET_TEMPERATE, 10); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java index 439291525..3bce64772 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMarsh.java @@ -56,7 +56,7 @@ public class BiomeGenMarsh extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.WET_TEMPERATE, 7); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java index 77366fb45..e1daeb854 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenMysticGrove.java @@ -59,7 +59,7 @@ public class BiomeGenMysticGrove extends BOPBiome this.canGenerateVillages = false; this.canSpawnInBiome = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.WET_TEMPERATE, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java index 333032eda..4f8abd479 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOminousWoods.java @@ -69,7 +69,7 @@ public class BiomeGenOminousWoods extends BOPBiome this.canGenerateVillages = false; this.canSpawnInBiome = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.COLD_SWAMP, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java index 333a6e2d9..9a5236c92 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenOvergrownCliffs.java @@ -47,7 +47,7 @@ public class BiomeGenOvergrownCliffs extends BOPBiome this.addWeight(BOPClimates.TROPICAL, 2); - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.spawnableCreatureList.clear(); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java index 4f6fca55b..c6d6c122e 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenQuagmire.java @@ -53,7 +53,7 @@ public class BiomeGenQuagmire extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.COLD_SWAMP, 2); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java index a3c1c4f3a..3636b14b3 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenRainforest.java @@ -47,7 +47,7 @@ public class BiomeGenRainforest extends BOPBiome this.canGenerateVillages = false; this.canGenerateRivers = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1)); this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4)); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java index dc5d78845..2e85ca036 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenSacredSprings.java @@ -45,7 +45,7 @@ public class BiomeGenSacredSprings extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.TROPICAL, 1); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java index 7dcb9f7ec..feaf12780 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWasteland.java @@ -62,7 +62,7 @@ public class BiomeGenWasteland extends BOPBiome this.canGenerateVillages = false; this.canSpawnInBiome = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.WASTELAND, 50); diff --git a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java index c12da96fa..4bb04bc85 100644 --- a/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java +++ b/src/main/java/biomesoplenty/common/biome/overworld/BiomeGenWetland.java @@ -61,7 +61,7 @@ public class BiomeGenWetland extends BOPBiome this.canGenerateRivers = false; this.canGenerateVillages = false; - this.beachBiomeId = this.biomeID; + this.beachBiomeId = -1; this.addWeight(BOPClimates.WET_TEMPERATE, 7); this.addWeight(BOPClimates.COLD_SWAMP, 5); diff --git a/src/main/java/biomesoplenty/common/init/ModBiomes.java b/src/main/java/biomesoplenty/common/init/ModBiomes.java index 2c60979f7..abfd72e93 100644 --- a/src/main/java/biomesoplenty/common/init/ModBiomes.java +++ b/src/main/java/biomesoplenty/common/init/ModBiomes.java @@ -244,6 +244,7 @@ public class ModBiomes implements BOPBiomes.IBiomeRegistry registerBiomes(); registerBiomeDictionaryTags(); + //After normal biomes to account for adding custom beaches initExtendedBiomes(); // save the biome ids to the config file (creating it if it doesn't exist) diff --git a/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java b/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java index 94ca8ff17..603c66491 100644 --- a/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java +++ b/src/main/java/biomesoplenty/common/world/layer/GenLayerShoreBOP.java @@ -76,7 +76,7 @@ public class GenLayerShoreBOP extends BOPGenLayer if (biome != null && BOPBiomes.REG_INSTANCE.getExtendedBiome(biome) != null) { IExtendedBiome extBiome = BOPBiomes.REG_INSTANCE.getExtendedBiome(biome); - setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, extBiome.getBeachId(), OCEANIC_PREDICATE); + setBiomeWithAdjacent(biomeIds, out, x, z, areaWidth, biomeId, extBiome.getBeachId() == -1 ? biomeId : extBiome.getBeachId(), OCEANIC_PREDICATE); } else {