• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java StructureOceanMonument类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中net.minecraft.world.gen.structure.StructureOceanMonument的典型用法代码示例。如果您正苦于以下问题:Java StructureOceanMonument类的具体用法?Java StructureOceanMonument怎么用?Java StructureOceanMonument使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



StructureOceanMonument类属于net.minecraft.world.gen.structure包,在下文中一共展示了StructureOceanMonument类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: ChunkProviderOverworld

import net.minecraft.world.gen.structure.StructureOceanMonument; //导入依赖的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


示例2: MapGenOceanMonumentDeadzone

import net.minecraft.world.gen.structure.StructureOceanMonument; //导入依赖的package包/类
public MapGenOceanMonumentDeadzone(StructureOceanMonument base) {
    this.childGen = base;
}
 
开发者ID:Lumaceon,项目名称:ClockworkPhase2,代码行数:4,代码来源:MapGenOceanMonumentDeadzone.java



注:本文中的net.minecraft.world.gen.structure.StructureOceanMonument类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MendixObjectReference类代码示例发布时间:2022-05-23
下一篇:
Java Id类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap