Fix broken nether/end void generation
This commit is contained in:
parent
ecf3980fb6
commit
7b8eac5da8
|
|
@ -66,12 +66,14 @@ public class VoidChunkGenerator extends NoiseBasedChunkGenerator {
|
||||||
private final Holder<NoiseGeneratorSettings> settings;
|
private final Holder<NoiseGeneratorSettings> settings;
|
||||||
private final TagKey<StructureSet> allowedStructureSets;
|
private final TagKey<StructureSet> allowedStructureSets;
|
||||||
private final boolean generateNormal;
|
private final boolean generateNormal;
|
||||||
|
private final boolean allowBiomeDecoration;
|
||||||
|
|
||||||
public VoidChunkGenerator(BiomeSource biomeSource, Holder<NoiseGeneratorSettings> settings, TagKey<StructureSet> allowedStructureSets) {
|
public VoidChunkGenerator(BiomeSource biomeSource, Holder<NoiseGeneratorSettings> settings, TagKey<StructureSet> allowedStructureSets) {
|
||||||
super(biomeSource, settings);
|
super(biomeSource, settings);
|
||||||
this.settings = settings;
|
this.settings = settings;
|
||||||
this.allowedStructureSets = allowedStructureSets;
|
this.allowedStructureSets = allowedStructureSets;
|
||||||
this.generateNormal = (settings.is(new ResourceLocation("minecraft:end")) && !EConfig.COMMON.voidEndGeneration.get()) || (settings.is(new ResourceLocation("minecraft:nether")) && !EConfig.COMMON.voidNetherGeneration.get());
|
this.generateNormal = (settings.is(new ResourceLocation("minecraft:end")) && !EConfig.COMMON.voidEndGeneration.get()) || (settings.is(new ResourceLocation("minecraft:nether")) && !EConfig.COMMON.voidNetherGeneration.get());
|
||||||
|
this.allowBiomeDecoration = !settings.is(new ResourceLocation("minecraft:overworld"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -142,7 +144,7 @@ public class VoidChunkGenerator extends NoiseBasedChunkGenerator {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyBiomeDecoration(WorldGenLevel pLevel, ChunkAccess pChunk, StructureManager pStructureManager) {
|
public void applyBiomeDecoration(WorldGenLevel pLevel, ChunkAccess pChunk, StructureManager pStructureManager) {
|
||||||
if (this.generateNormal) {
|
if (this.generateNormal || this.allowBiomeDecoration) {
|
||||||
super.applyBiomeDecoration(pLevel, pChunk, pStructureManager);
|
super.applyBiomeDecoration(pLevel, pChunk, pStructureManager);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user