Eternal fluid gen

Changes to be mmitted:
	modified:   src/main/java/org/dimdev/dimdoors/world/feature/ModFeatures.java
modified:   src/main/java/org/dimdev/dimdoors/world/limbo/LimboChunkGenerator.java
This commit is contained in:
SD 2020-09-29 09:43:50 +05:30
parent bf67cbf5a1
commit 2d488a63d1
No known key found for this signature in database
GPG key ID: E36B57EE08544BC5
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,7 @@
package org.dimdev.dimdoors.world.feature;
import org.dimdev.dimdoors.ModConfig;
import org.dimdev.dimdoors.block.ModBlocks;
import org.dimdev.dimdoors.world.feature.gateway.LimboGatewayFeature;
import org.dimdev.dimdoors.world.feature.gateway.schematic.SandstonePillarsV2Gateway;
import org.dimdev.dimdoors.world.feature.gateway.schematic.SchematicV2Gateway;
@ -10,10 +11,13 @@ import org.dimdev.dimdoors.world.feature.gateway.schematic.SchematicV2GatewayFea
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.BuiltinRegistries;
import net.minecraft.util.registry.Registry;
import net.minecraft.world.gen.decorator.Decorator;
import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
import net.minecraft.world.gen.feature.ConfiguredFeature;
import net.minecraft.world.gen.feature.ConfiguredFeatures;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.SingleStateFeatureConfig;
import net.fabricmc.loader.api.FabricLoader;
@ -23,6 +27,7 @@ public final class ModFeatures {
public static final SchematicV2Gateway SANDSTONE_PILLARS_GATEWAY = new SandstonePillarsV2Gateway();
public static final ConfiguredFeature<?, ?> SANDSTONE_PILLARS_FEATURE;
public static final ConfiguredFeature<?, ?> LIMBO_GATEWAY_CONFIGURED_FEATURE;
public static final ConfiguredFeature<?, ?> ETERNAL_FLUID_LAKE;
public static void init() {
SANDSTONE_PILLARS_GATEWAY.init();
@ -36,5 +41,6 @@ public final class ModFeatures {
.decorate(ConfiguredFeatures.Decorators.SQUARE_TOP_SOLID_HEIGHTMAP
.applyChance(gatewayChance));
LIMBO_GATEWAY_CONFIGURED_FEATURE = LIMBO_GATEWAY_FEATURE.configure(DefaultFeatureConfig.INSTANCE).decorate(ConfiguredFeatures.Decorators.SQUARE_TOP_SOLID_HEIGHTMAP.applyChance(gatewayChance));
ETERNAL_FLUID_LAKE = Feature.LAKE.configure(new SingleStateFeatureConfig(ModBlocks.ETERNAL_FLUID.getDefaultState())).decorate(Decorator.RANGE.configure(new RangeDecoratorConfig(5, 17, 128)).applyChance(20));
}
}

View file

@ -565,7 +565,7 @@ public class LimboChunkGenerator extends ChunkGenerator {
public void populateEntities(ChunkRegion region) {
int i = region.getCenterChunkX();
int j = region.getCenterChunkZ();
Biome biome = region.getBiome((new ChunkPos(i, j)).getStartPos());
Biome biome = region.getBiome(new ChunkPos(i, j).getStartPos());
ChunkRandom chunkRandom = new ChunkRandom();
chunkRandom.setPopulationSeed(region.getSeed(), i << 4, j << 4);
SpawnHelper.populateEntities(region, biome, i, j, chunkRandom);