Search in sources :

Example 1 with BiomeProviderSingle

use of net.minecraft.world.biome.BiomeProviderSingle in project RFToolsDimensions by McJty.

the class GenericWorldProvider method createBiomeProviderInternal.

private void createBiomeProviderInternal() {
    getDimensionInformation();
    if (dimensionInformation != null) {
        ControllerType type = dimensionInformation.getControllerType();
        if (type == ControllerType.CONTROLLER_SINGLE) {
            this.biomeProvider = new BiomeProviderSingle(dimensionInformation.getBiomes().get(0));
        } else if (type == ControllerType.CONTROLLER_DEFAULT) {
            WorldInfo worldInfo = world.getWorldInfo();
            worldInfo = new WorldInfo(worldInfo) {

                @Override
                public long getSeed() {
                    return seed;
                }
            };
            this.biomeProvider = new BiomeProvider(worldInfo);
        } else {
            this.biomeProvider = new GenericBiomeProvider(world.getWorldInfo()) {

                @Override
                public DimensionInformation getDimensionInformation() {
                    // Hack to get the dimension information in the superclass.
                    return dimensionInformation;
                }
            };
        }
    } else {
        this.biomeProvider = new BiomeProvider(world.getWorldInfo());
    }
    if (dimensionInformation != null) {
        this.hasSkyLight = dimensionInformation.getTerrainType().hasSky();
        setupSkyRenderers();
    }
}
Also used : BiomeProvider(net.minecraft.world.biome.BiomeProvider) WorldInfo(net.minecraft.world.storage.WorldInfo) ControllerType(mcjty.rftoolsdim.dimensions.types.ControllerType) BiomeProviderSingle(net.minecraft.world.biome.BiomeProviderSingle)

Aggregations

ControllerType (mcjty.rftoolsdim.dimensions.types.ControllerType)1 BiomeProvider (net.minecraft.world.biome.BiomeProvider)1 BiomeProviderSingle (net.minecraft.world.biome.BiomeProviderSingle)1 WorldInfo (net.minecraft.world.storage.WorldInfo)1