Don't ignore endCityFailChance config value. Fixes quiqueck/BetterEnd#92

This commit is contained in:
Necrontyr 2022-10-12 08:50:36 +02:00
parent ac96841372
commit 01a4bdbe8e
2 changed files with 22 additions and 21 deletions

View file

@ -24,12 +24,12 @@ public class EndCityFeatureMixin {
) {
final ChunkPos pos = context.chunkPos();
WorldgenRandom chunkRandom = new WorldgenRandom(new XoroshiroRandomSource(pos.x, pos.z));
chunkRandom.consumeCount(1);
if (GeneratorOptions.useNewGenerator()) {
int chance = GeneratorOptions.getEndCityFailChance();
if (chance > 0 && chunkRandom.nextInt(chance) != 0) {
info.setReturnValue(Optional.empty());
info.cancel();
}
}
}