當前位置: 首頁>>代碼示例>>Java>>正文


Java World.setSeaLevel方法代碼示例

本文整理匯總了Java中net.minecraft.world.World.setSeaLevel方法的典型用法代碼示例。如果您正苦於以下問題:Java World.setSeaLevel方法的具體用法?Java World.setSeaLevel怎麽用?Java World.setSeaLevel使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在net.minecraft.world.World的用法示例。


在下文中一共展示了World.setSeaLevel方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ChunkProviderHell

import net.minecraft.world.World; //導入方法依賴的package包/類
public ChunkProviderHell(World worldIn, boolean p_i45637_2_, long seed)
{
    this.world = worldIn;
    this.generateStructures = p_i45637_2_;
    this.rand = new Random(seed);
    this.lperlinNoise1 = new NoiseGeneratorOctaves(this.rand, 16);
    this.lperlinNoise2 = new NoiseGeneratorOctaves(this.rand, 16);
    this.perlinNoise1 = new NoiseGeneratorOctaves(this.rand, 8);
    this.slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.rand, 4);
    this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.rand, 4);
    this.scaleNoise = new NoiseGeneratorOctaves(this.rand, 10);
    this.depthNoise = new NoiseGeneratorOctaves(this.rand, 16);
    worldIn.setSeaLevel(63);
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:15,代碼來源:ChunkProviderHell.java

示例2: ChunkProviderOverworld

import net.minecraft.world.World; //導入方法依賴的package包/類
public ChunkProviderOverworld(World worldIn, long seed, boolean mapFeaturesEnabledIn, String p_i46668_5_)
{
    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)(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);
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:33,代碼來源:ChunkProviderOverworld.java

示例3: ChunkProviderHell

import net.minecraft.world.World; //導入方法依賴的package包/類
public ChunkProviderHell(World worldIn, boolean p_i45637_2_, long seed)
{
    this.world = worldIn;
    this.generateStructures = p_i45637_2_;
    this.rand = new Random(seed);
    this.lperlinNoise1 = new NoiseGeneratorOctaves(this.rand, 16);
    this.lperlinNoise2 = new NoiseGeneratorOctaves(this.rand, 16);
    this.perlinNoise1 = new NoiseGeneratorOctaves(this.rand, 8);
    this.slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.rand, 4);
    this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.rand, 4);
    this.scaleNoise = new NoiseGeneratorOctaves(this.rand, 10);
    this.depthNoise = new NoiseGeneratorOctaves(this.rand, 16);
    worldIn.setSeaLevel(63);

    net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell ctx =
            new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell(lperlinNoise1, lperlinNoise2, perlinNoise1, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen, scaleNoise, depthNoise);
    ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, ctx);
    this.lperlinNoise1 = ctx.getLPerlin1();
    this.lperlinNoise2 = ctx.getLPerlin2();
    this.perlinNoise1 = ctx.getPerlin();
    this.slowsandGravelNoiseGen = ctx.getPerlin2();
    this.netherrackExculsivityNoiseGen = ctx.getPerlin3();
    this.scaleNoise = ctx.getScale();
    this.depthNoise = ctx.getDepth();
    this.genNetherBridge = (MapGenNetherBridge)net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(genNetherBridge, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_BRIDGE);
    this.genNetherCaves = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(genNetherCaves, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_CAVE);
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:28,代碼來源:ChunkProviderHell.java

示例4: PontusChunkProvider

import net.minecraft.world.World; //導入方法依賴的package包/類
public PontusChunkProvider(World worldIn, long seed)
{
    {
        caveGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(caveGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE);
        ravineGenerator = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(ravineGenerator, net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.RAVINE);
    }
    this.world = worldIn;
    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)(i * i + j * j) + 0.2F);
            this.biomeWeights[i + 2 + (j + 2) * 5] = f;
        }
    }

    this.oceanBlock = HarshenFluids.HARSHEN_DIMENSIONAL_FLUID_BLOCK.getDefaultState();
    worldIn.setSeaLevel(this.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();
}
 
開發者ID:kenijey,項目名稱:harshencastle,代碼行數:43,代碼來源:PontusChunkProvider.java

示例5: ChunkProviderOverworld

import net.minecraft.world.World; //導入方法依賴的package包/類
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();
}
 
開發者ID:F1r3w477,項目名稱:CustomWorldGen,代碼行數:53,代碼來源:ChunkProviderOverworld.java


注:本文中的net.minecraft.world.World.setSeaLevel方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。