Java源码示例:net.minecraft.world.biome.source.BiomeSource
示例1
private static Thing setupCustomStructure(StructureFeature structure, FeatureConfig conf, Biome biome, boolean wireOnly)
{
//if (1+2==3)
// throw new RuntimeException("rebuild me");
return (w, p) -> {
ChunkGenerator chunkgen = new OverworldChunkGenerator(w, w.getChunkManager().getChunkGenerator().getBiomeSource(), new OverworldChunkGeneratorConfig()) // BiomeSourceType.VANILLA_LAYERED.applyConfig((BiomeSourceType.VANILLA_LAYERED.getConfig())), ChunkGeneratorType.SURFACE.createSettings())
{
@Override
public <C extends FeatureConfig> C getStructureConfig(Biome biome_1, StructureFeature<C> structureFeature_1)
{
return (C)conf;
}
@Override
public BiomeSource getBiomeSource()
{
return new VanillaLayeredBiomeSource(new VanillaLayeredBiomeSourceConfig(w.getLevelProperties()))
{
@Override
public Biome getBiomeForNoiseGen(int i, int j, int k)
{
return biome;
}
@Override
public Set<Biome> getBiomesInArea(int int_1, int int_2, int int_3, int int_4)
{
return Sets.newHashSet(biome);
}
};
}
};
return ((StructureFeatureInterface)structure).plopAnywhere(w, p, chunkgen, wireOnly);
};
}
示例2
@Override
protected Codec<? extends BiomeSource> method_28442() {
return CODEC;
}
示例3
@Environment(EnvType.CLIENT)
public BiomeSource withSeed(long seed) {
return new MoonBiomeSource(seed, this.biomeSize);
}
示例4
@Override
public HallowedChunkGenerator create(World world, BiomeSource biomeSource, HallowedChunkGeneratorConfig config) {
return new HallowedChunkGenerator(world, biomeSource, config);
}
示例5
public HallowedChunkGenerator(IWorld world, BiomeSource biomeSource, HallowedChunkGeneratorConfig chunkGeneratorConfig) {
super(world, biomeSource, 4, 8, 256, chunkGeneratorConfig, true);
this.random.consume(2620);
this.noiseSampler = new OctavePerlinNoiseSampler(this.random, 15, 0);
}
示例6
public OverworldChunkGeneratorMixin(IWorld world, BiomeSource biomeSource, int verticalNoiseResolution, int horizontalNoiseResolution, int worldHeight, OverworldChunkGeneratorConfig config, boolean useSimplexNoise)
{
super(world, biomeSource, verticalNoiseResolution, horizontalNoiseResolution, worldHeight, config, useSimplexNoise);
}
示例7
public FlatChunkGeneratorMixin(IWorld world, BiomeSource biomeSource, FlatChunkGeneratorConfig config)
{
super(world, biomeSource, config);
}
示例8
public OverworldChunkGeneratorMixin(IWorld iWorld_1, BiomeSource biomeSource_1, int int_1, int int_2, int int_3, OverworldChunkGeneratorConfig chunkGeneratorConfig_1, boolean boolean_1)
{
super(iWorld_1, biomeSource_1, int_1, int_2, int_3, chunkGeneratorConfig_1, boolean_1);
}
示例9
public FlatChunkGeneratorMixin(IWorld iWorld, BiomeSource biome, FlatChunkGeneratorConfig chunkGeneratorConfig)
{
super(iWorld, biome, chunkGeneratorConfig);
}
示例10
public FloatingIslandsChunkGeneratorMixin(IWorld iWorld_1, BiomeSource biomeSource_1, int int_1, int int_2, int int_3, FloatingIslandsChunkGeneratorConfig chunkGeneratorConfig_1, boolean boolean_1)
{
super(iWorld_1, biomeSource_1, int_1, int_2, int_3, chunkGeneratorConfig_1, boolean_1);
}