Java 类net.minecraft.world.gen.ChunkGeneratorSettings 实例源码

项目:ExPetrum    文件:WorldTypeExP.java   
public GenLayerBiomeMod(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, ChunkGeneratorSettings p_i45560_5_)
{
    super(p_i45560_1_);
    this.parent = p_i45560_3_;
    this.biomes.add(new BiomeEntry(ExPBiomes.plains, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.forest, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.mountains, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.dense_forest, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.swampland, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.rare_forest, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.hills, 10));
       this.biomes.add(new BiomeEntry(ExPBiomes.cold_forest, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.dense_cold_forest, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.cold_plains, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.savanna, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.warm_forest, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.warm_plains, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.dense_warm_forest, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.jungle, 10));
    this.biomes.add(new BiomeEntry(ExPBiomes.desert, 10));
    this.settings = p_i45560_5_;
}
项目:harshencastle    文件:PontusBiomeDecorator.java   
@Override
public void decorate(World worldIn, Random random, Biome biome, BlockPos pos) {
     if (this.decorating)
     {
         throw new RuntimeException("Already decorating");
     }
     else
     {
        this.chunkProviderSettings = ChunkGeneratorSettings.Factory.jsonToFactory(worldIn.getWorldInfo().getGeneratorOptions()).build();
        this.chunkPos = pos;
        this.genDecorations(biome, worldIn, random);
        decorating = false;
     }
}
项目:ExPetrum    文件:WorldTypeExP.java   
@Override
public GenLayer getBiomeLayer(long worldSeed, GenLayer parentLayer, ChunkGeneratorSettings chunkProviderSettings)
{
     net.minecraft.world.gen.layer.GenLayer ret = new GenLayerBiomeMod(200L, parentLayer, this, chunkProviderSettings);
     ret = net.minecraft.world.gen.layer.GenLayerZoom.magnify(1000L, ret, 2);
     ret = new net.minecraft.world.gen.layer.GenLayerBiomeEdge(1000L, ret);
     return ret;
}
项目:ExPetrum    文件:WorldTypeExP.java   
private BiomeProviderExP(long seed, WorldType worldTypeIn, String options)
{
    this();

    if (worldTypeIn == WorldType.CUSTOMIZED && !options.isEmpty())
    {
        this.settings = ChunkGeneratorSettings.Factory.jsonToFactory(options).build();
    }

    GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, worldTypeIn, this.settings);
    agenlayer = getModdedBiomeGenerators(worldTypeIn, seed, agenlayer);
    this.genBiomes = agenlayer[0];
    this.biomeIndexLayer = agenlayer[1];
    this.featureProvider = new FeatureProvider(seed);
}
项目:ExPetrum    文件:ExPHandlerServer.java   
public void handleWorldSettings(World w)
{
    try
    {
        if (w.getChunkProvider() instanceof ChunkProviderServer && w.getWorldType() instanceof WorldTypeExP)
        {
            ChunkProviderServer cps = (ChunkProviderServer) w.getChunkProvider();
            if (cps.chunkGenerator instanceof ChunkGeneratorOverworld)
            {
                ChunkGeneratorOverworld cpo = (ChunkGeneratorOverworld) cps.chunkGenerator;
                for (Field f : ChunkGeneratorOverworld.class.getDeclaredFields())
                {
                    if (f.getType() == ChunkGeneratorSettings.class)
                    {
                        f.setAccessible(true);
                        ChunkGeneratorSettings.Factory factory = new ChunkGeneratorSettings.Factory();
                        factory.seaLevel = 127;
                        factory.baseSize = 17.25f;
                        f.set(cpo, factory.build());
                        break;
                    }
                }
            }
        }
    }
    catch (Exception ex)
    {
        ex.printStackTrace();
    }
}
项目:Simple-Dimensions    文件:GuiCustomizeDimension.java   
public void func_175324_a(String p_175324_1_)
{
     if (p_175324_1_ != null && p_175324_1_.length() != 0)
     {
         this.field_175336_F = ChunkGeneratorSettings.Factory.jsonToFactory(p_175324_1_);
     }
     else
     {
         this.field_175336_F = new ChunkGeneratorSettings.Factory();
     }
}
项目:paintedbiomes    文件:PaintedBiomesEventHandler.java   
@SubscribeEvent(priority=EventPriority.LOW)
public void onInitBiomeGen(WorldTypeEvent.InitBiomeGens event)
{
    if (Configs.getEffectiveMainConfig().useGenLayer)
    {
        PaintedBiomes.logger.info("Registering Painted Biomes biome GenLayers");
        ImageHandler.getImageHandler(0).init(event.getSeed());
        GenLayer[] newGens = event.getNewBiomeGens().clone();
        newGens[0] = new GenLayerBiomeGeneration(event.getSeed(), newGens[0], event.getWorldType(), ChunkGeneratorSettings.Factory.jsonToFactory("").build());
        newGens[1] = new GenLayerBiomeIndex(event.getSeed(), newGens[1], event.getWorldType(), ChunkGeneratorSettings.Factory.jsonToFactory("").build());
        newGens[2] = newGens[0];
        event.setNewBiomeGens(newGens);
    }
}
项目:Simple-Dimensions    文件:GuiScreenCustomizeDimensionPresets.java   
public Info(String p_i45523_1_, ResourceLocation p_i45523_2_, ChunkGeneratorSettings.Factory p_i45523_3_)
{
    this.field_178955_a = p_i45523_1_;
    this.field_178953_b = p_i45523_2_;
    this.field_178954_c = p_i45523_3_;
}
项目:paintedbiomes    文件:GenLayerBiomeIndex.java   
public GenLayerBiomeIndex(long seed, GenLayer parent, WorldType worldType, ChunkGeneratorSettings chunkProviderSettings)
{
    super(seed, parent, worldType, chunkProviderSettings);
}
项目:paintedbiomes    文件:GenLayerBiomeGeneration.java   
public GenLayerBiomeGeneration(long seed, GenLayer parent, WorldType worldType, ChunkGeneratorSettings chunkProviderSettings)
{
    super(seed, parent, worldType, chunkProviderSettings);
}