Generate islands before deep oceans

This commit is contained in:
Adubbz 2019-05-24 19:41:53 +10:00
parent af85dd641b
commit 63389cb46d
2 changed files with 12 additions and 4 deletions

View File

@ -115,10 +115,6 @@ public class BOPLayerUtil
// and mushroom islands // and mushroom islands
IAreaFactory<T> landSeaFactory = createInitialLandAndSeaFactory(contextFactory); IAreaFactory<T> landSeaFactory = createInitialLandAndSeaFactory(contextFactory);
// Add mushroom islands and deep oceans
landSeaFactory = GenLayerAddMushroomIsland.INSTANCE.apply(contextFactory.apply(5L), landSeaFactory);
landSeaFactory = GenLayerDeepOcean.INSTANCE.apply(contextFactory.apply(4L), landSeaFactory);
// Determines positions for all of the new ocean subbiomes added in 1.13 // Determines positions for all of the new ocean subbiomes added in 1.13
IAreaFactory<T> oceanBiomeFactory = OceanLayer.INSTANCE.apply(contextFactory.apply(2L)); IAreaFactory<T> oceanBiomeFactory = OceanLayer.INSTANCE.apply(contextFactory.apply(2L));
oceanBiomeFactory = LayerUtil.repeat(2001L, GenLayerZoom.NORMAL, oceanBiomeFactory, 6, contextFactory); oceanBiomeFactory = LayerUtil.repeat(2001L, GenLayerZoom.NORMAL, oceanBiomeFactory, 6, contextFactory);
@ -134,7 +130,11 @@ public class BOPLayerUtil
// Create the climates // Create the climates
IAreaFactory<T> climateFactory = createClimateFactory(contextFactory, new BOPWorldSettings()); IAreaFactory<T> climateFactory = createClimateFactory(contextFactory, new BOPWorldSettings());
// Add islands and deep oceans
landSeaFactory = GenLayerAddMushroomIsland.INSTANCE.apply(contextFactory.apply(5L), landSeaFactory);
landSeaFactory = GenLayerLargeIsland.INSTANCE.apply(contextFactory.apply(5L), landSeaFactory, climateFactory); landSeaFactory = GenLayerLargeIsland.INSTANCE.apply(contextFactory.apply(5L), landSeaFactory, climateFactory);
landSeaFactory = GenLayerDeepOcean.INSTANCE.apply(contextFactory.apply(4L), landSeaFactory);
// Allocate the biomes // Allocate the biomes
IAreaFactory<T> biomesFactory = createBiomeFactory(landSeaFactory, climateFactory, contextFactory); IAreaFactory<T> biomesFactory = createBiomeFactory(landSeaFactory, climateFactory, contextFactory);

View File

@ -8,6 +8,7 @@
package biomesoplenty.common.world.layer; package biomesoplenty.common.world.layer;
import biomesoplenty.api.enums.BOPClimates; import biomesoplenty.api.enums.BOPClimates;
import biomesoplenty.core.BiomesOPlenty;
import net.minecraft.util.registry.IRegistry; import net.minecraft.util.registry.IRegistry;
import net.minecraft.world.biome.Biome; import net.minecraft.world.biome.Biome;
import net.minecraft.world.gen.IContext; import net.minecraft.world.gen.IContext;
@ -48,11 +49,18 @@ public enum GenLayerLargeIsland implements IAreaTransformer2, IDimOffset1Transfo
{ {
Biome islandBiome = climate.getRandomIslandBiome(context, null); Biome islandBiome = climate.getRandomIslandBiome(context, null);
BiomesOPlenty.logger.info("Helloooooo");
if (islandBiome == null) if (islandBiome == null)
{
return centerVal; return centerVal;
}
else else
{
BiomesOPlenty.logger.info("Setting " + x + " " + z + " to " + islandBiome.getRegistryName());
return IRegistry.BIOME.getId(islandBiome); return IRegistry.BIOME.getId(islandBiome);
} }
}
else return centerVal; else return centerVal;
} }
} }