Update ChunkGeneratorOverworldBOP.java

Lava lake event should not be posted unless checks of hasVillageGenerated, lavaLakeChance and useLavaLakes pass for consistency with vanilla chunk generation. Event subscribers will assume those checks have already passed.
This commit is contained in:
lyricalreverie 2018-05-26 22:22:39 -07:00 committed by GitHub
parent 63de307f82
commit 433ee183dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -541,7 +541,7 @@ public class ChunkGeneratorOverworldBOP implements IChunkGenerator
}
// add lava lakes
if (TerrainGen.populate(this, world, rand, chunkX, chunkZ, hasVillageGenerated, LAVA) && !hasVillageGenerated && this.rand.nextInt(this.settings.lavaLakeChance / 10) == 0 && this.settings.useLavaLakes)
if (!hasVillageGenerated && this.rand.nextInt(this.settings.lavaLakeChance / 10) == 0 && this.settings.useLavaLakes && TerrainGen.populate(this, world, rand, chunkX, chunkZ, hasVillageGenerated, LAVA))
{
target = decorateStart.add(this.rand.nextInt(16), this.rand.nextInt(248) + 8, this.rand.nextInt(16));
if (target.getY() < 63 || this.rand.nextInt(this.settings.lavaLakeChance / 8) == 0)