Java 类net.minecraft.world.gen.structure.StructureOceanMonument 实例源码

项目:CustomWorldGen    文件:ChunkProviderOverworld.java   
public ChunkProviderOverworld(World worldIn, long seed, boolean mapFeaturesEnabledIn, String p_i46668_5_)
{
    {
        caveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(caveGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
        strongholdGenerator = (MapGenStronghold)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(strongholdGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.STRONGHOLD);
        villageGenerator = (MapGenVillage)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(villageGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.VILLAGE);
        mineshaftGenerator = (MapGenMineshaft)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(mineshaftGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.MINESHAFT);
        scatteredFeatureGenerator = (MapGenScatteredFeature)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(scatteredFeatureGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.SCATTERED_FEATURE);
        ravineGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(ravineGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);
        oceanMonumentGenerator = (StructureOceanMonument)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(oceanMonumentGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.OCEAN_MONUMENT);
    }
    this.worldObj = worldIn;
    this.mapFeaturesEnabled = mapFeaturesEnabledIn;
    this.terrainType = worldIn.getWorldInfo().getTerrainType();
    this.rand = new Random(seed);
    this.minLimitPerlinNoise = new NoiseGeneratorOctaves(this.rand, 16);
    this.maxLimitPerlinNoise = new NoiseGeneratorOctaves(this.rand, 16);
    this.mainPerlinNoise = new NoiseGeneratorOctaves(this.rand, 8);
    this.surfaceNoise = new NoiseGeneratorPerlin(this.rand, 4);
    this.scaleNoise = new NoiseGeneratorOctaves(this.rand, 10);
    this.depthNoise = new NoiseGeneratorOctaves(this.rand, 16);
    this.forestNoise = new NoiseGeneratorOctaves(this.rand, 8);
    this.heightMap = new double[825];
    this.biomeWeights = new float[25];

    for (int i = -2; i <= 2; ++i)
    {
        for (int j = -2; j <= 2; ++j)
        {
            float f = 10.0F / MathHelper.sqrt_float((float)(i * i + j * j) + 0.2F);
            this.biomeWeights[i + 2 + (j + 2) * 5] = f;
        }
    }

    if (p_i46668_5_ != null)
    {
        this.settings = ChunkProviderSettings.Factory.jsonToFactory(p_i46668_5_).build();
        this.oceanBlock = this.settings.useLavaOceans ? Blocks.LAVA.getDefaultState() : Blocks.WATER.getDefaultState();
        worldIn.setSeaLevel(this.settings.seaLevel);
    }

    net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld ctx =
            new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld(minLimitPerlinNoise, maxLimitPerlinNoise, mainPerlinNoise, surfaceNoise, scaleNoise, depthNoise, forestNoise);
    ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, ctx);
    this.minLimitPerlinNoise = ctx.getLPerlin1();
    this.maxLimitPerlinNoise = ctx.getLPerlin2();
    this.mainPerlinNoise = ctx.getPerlin();
    this.surfaceNoise = ctx.getHeight();
    this.scaleNoise = ctx.getScale();
    this.depthNoise = ctx.getDepth();
    this.forestNoise = ctx.getForest();
}
项目:ClockworkPhase2    文件:MapGenOceanMonumentDeadzone.java   
public MapGenOceanMonumentDeadzone(StructureOceanMonument base) {
    this.childGen = base;
}