当前位置: 首页>>代码示例>>Java>>正文


Java WorldType.CUSTOMIZED属性代码示例

本文整理汇总了Java中net.minecraft.world.WorldType.CUSTOMIZED属性的典型用法代码示例。如果您正苦于以下问题:Java WorldType.CUSTOMIZED属性的具体用法?Java WorldType.CUSTOMIZED怎么用?Java WorldType.CUSTOMIZED使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraft.world.WorldType的用法示例。


在下文中一共展示了WorldType.CUSTOMIZED属性的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: GenLayerBiome

public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
    super(p_i45560_1_);
    this.parent = p_i45560_3_;

    if (p_i45560_4_ == WorldType.DEFAULT_1_1)
    {
        this.field_151623_c = new BiomeGenBase[] {BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills, BiomeGenBase.swampland, BiomeGenBase.plains, BiomeGenBase.taiga};
        this.field_175973_g = null;
    }
    else if (p_i45560_4_ == WorldType.CUSTOMIZED)
    {
        this.field_175973_g = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).func_177864_b();
    }
    else
    {
        this.field_175973_g = null;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:19,代码来源:GenLayerBiome.java

示例2: BiomeProvider

private BiomeProvider(long seed, WorldType worldTypeIn, String options)
{
    this();

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

    GenLayer[] agenlayer = GenLayer.initializeAllBiomeGenerators(seed, worldTypeIn, this.field_190945_a);
    this.genBiomes = agenlayer[0];
    this.biomeIndexLayer = agenlayer[1];
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:13,代码来源:BiomeProvider.java

示例3: GenLayerBiome

public GenLayerBiome(long p_i45560_1_, GenLayer p_i45560_3_, WorldType p_i45560_4_, String p_i45560_5_)
{
    super(p_i45560_1_);
    this.parent = p_i45560_3_;

    for (net.minecraftforge.common.BiomeManager.BiomeType type : net.minecraftforge.common.BiomeManager.BiomeType.values())
    {
        com.google.common.collect.ImmutableList<net.minecraftforge.common.BiomeManager.BiomeEntry> biomesToAdd = net.minecraftforge.common.BiomeManager.getBiomes(type);
        int idx = type.ordinal();

        if (biomes[idx] == null) biomes[idx] = new java.util.ArrayList<net.minecraftforge.common.BiomeManager.BiomeEntry>();
        if (biomesToAdd != null) biomes[idx].addAll(biomesToAdd);
    }

    int desertIdx = net.minecraftforge.common.BiomeManager.BiomeType.DESERT.ordinal();

    biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.DESERT, 30));
    biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.SAVANNA, 20));
    biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.PLAINS, 10));

    if (p_i45560_4_ == WorldType.DEFAULT_1_1)
    {
        biomes[desertIdx].clear();
        biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.DESERT, 10));
        biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.FOREST, 10));
        biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.EXTREME_HILLS, 10));
        biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.SWAMPLAND, 10));
        biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.PLAINS, 10));
        biomes[desertIdx].add(new net.minecraftforge.common.BiomeManager.BiomeEntry(Biomes.TAIGA, 10));
        this.settings = null;
    }
    else if (p_i45560_4_ == WorldType.CUSTOMIZED)
    {
        this.settings = ChunkProviderSettings.Factory.jsonToFactory(p_i45560_5_).build();
    }
    else
    {
        this.settings = null;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:40,代码来源:GenLayerBiome.java

示例4: BiomeProviderExP

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);
}
 
开发者ID:V0idWa1k3r,项目名称:ExPetrum,代码行数:15,代码来源:WorldTypeExP.java

示例5: initializeAllBiomeGenerators

public static GenLayer[] initializeAllBiomeGenerators(long seed, WorldType p_180781_2_, String p_180781_3_)
{
    GenLayer genlayer = new GenLayerIsland(1L);
    genlayer = new GenLayerFuzzyZoom(2000L, genlayer);
    GenLayerAddIsland genlayeraddisland = new GenLayerAddIsland(1L, genlayer);
    GenLayerZoom genlayerzoom = new GenLayerZoom(2001L, genlayeraddisland);
    GenLayerAddIsland genlayeraddisland1 = new GenLayerAddIsland(2L, genlayerzoom);
    genlayeraddisland1 = new GenLayerAddIsland(50L, genlayeraddisland1);
    genlayeraddisland1 = new GenLayerAddIsland(70L, genlayeraddisland1);
    GenLayerRemoveTooMuchOcean genlayerremovetoomuchocean = new GenLayerRemoveTooMuchOcean(2L, genlayeraddisland1);
    GenLayerAddSnow genlayeraddsnow = new GenLayerAddSnow(2L, genlayerremovetoomuchocean);
    GenLayerAddIsland genlayeraddisland2 = new GenLayerAddIsland(3L, genlayeraddsnow);
    GenLayerEdge genlayeredge = new GenLayerEdge(2L, genlayeraddisland2, GenLayerEdge.Mode.COOL_WARM);
    genlayeredge = new GenLayerEdge(2L, genlayeredge, GenLayerEdge.Mode.HEAT_ICE);
    genlayeredge = new GenLayerEdge(3L, genlayeredge, GenLayerEdge.Mode.SPECIAL);
    GenLayerZoom genlayerzoom1 = new GenLayerZoom(2002L, genlayeredge);
    genlayerzoom1 = new GenLayerZoom(2003L, genlayerzoom1);
    GenLayerAddIsland genlayeraddisland3 = new GenLayerAddIsland(4L, genlayerzoom1);
    GenLayerAddMushroomIsland genlayeraddmushroomisland = new GenLayerAddMushroomIsland(5L, genlayeraddisland3);
    GenLayerDeepOcean genlayerdeepocean = new GenLayerDeepOcean(4L, genlayeraddmushroomisland);
    GenLayer genlayer4 = GenLayerZoom.magnify(1000L, genlayerdeepocean, 0);
    ChunkProviderSettings chunkprovidersettings = null;
    int i = 4;
    int j = i;

    if (p_180781_2_ == WorldType.CUSTOMIZED && p_180781_3_.length() > 0)
    {
        chunkprovidersettings = ChunkProviderSettings.Factory.jsonToFactory(p_180781_3_).func_177864_b();
        i = chunkprovidersettings.biomeSize;
        j = chunkprovidersettings.riverSize;
    }

    if (p_180781_2_ == WorldType.LARGE_BIOMES)
    {
        i = 6;
    }

    GenLayer lvt_8_1_ = GenLayerZoom.magnify(1000L, genlayer4, 0);
    GenLayerRiverInit genlayerriverinit = new GenLayerRiverInit(100L, lvt_8_1_);
    GenLayerBiome lvt_9_1_ = new GenLayerBiome(200L, genlayer4, p_180781_2_, p_180781_3_);
    GenLayer genlayer6 = GenLayerZoom.magnify(1000L, lvt_9_1_, 2);
    GenLayerBiomeEdge genlayerbiomeedge = new GenLayerBiomeEdge(1000L, genlayer6);
    GenLayer lvt_10_1_ = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
    GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_10_1_);
    GenLayer genlayer5 = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
    genlayer5 = GenLayerZoom.magnify(1000L, genlayer5, j);
    GenLayerRiver genlayerriver = new GenLayerRiver(1L, genlayer5);
    GenLayerSmooth genlayersmooth = new GenLayerSmooth(1000L, genlayerriver);
    genlayerhills = new GenLayerRareBiome(1001L, genlayerhills);

    for (int k = 0; k < i; ++k)
    {
        genlayerhills = new GenLayerZoom((long)(1000 + k), genlayerhills);

        if (k == 0)
        {
            genlayerhills = new GenLayerAddIsland(3L, genlayerhills);
        }

        if (k == 1 || i == 1)
        {
            genlayerhills = new GenLayerShore(1000L, genlayerhills);
        }
    }

    GenLayerSmooth genlayersmooth1 = new GenLayerSmooth(1000L, genlayerhills);
    GenLayerRiverMix genlayerrivermix = new GenLayerRiverMix(100L, genlayersmooth1, genlayersmooth);
    GenLayer genlayer3 = new GenLayerVoronoiZoom(10L, genlayerrivermix);
    genlayerrivermix.initWorldGenSeed(seed);
    genlayer3.initWorldGenSeed(seed);
    return new GenLayer[] {genlayerrivermix, genlayer3, genlayerrivermix};
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:72,代码来源:GenLayer.java

示例6: func_146316_a

private void func_146316_a(boolean p_146316_1_)
{
    this.field_146344_y = p_146316_1_;

    if (WorldType.worldTypes[this.selectedIndex] == WorldType.DEBUG_WORLD)
    {
        this.btnGameMode.visible = !this.field_146344_y;
        this.btnGameMode.enabled = false;

        if (this.field_175300_s == null)
        {
            this.field_175300_s = this.gameMode;
        }

        this.gameMode = "spectator";
        this.btnMapFeatures.visible = false;
        this.btnBonusItems.visible = false;
        this.btnMapType.visible = this.field_146344_y;
        this.btnAllowCommands.visible = false;
        this.btnCustomizeType.visible = false;
    }
    else
    {
        this.btnGameMode.visible = !this.field_146344_y;
        this.btnGameMode.enabled = true;

        if (this.field_175300_s != null)
        {
            this.gameMode = this.field_175300_s;
            this.field_175300_s = null;
        }

        this.btnMapFeatures.visible = this.field_146344_y && WorldType.worldTypes[this.selectedIndex] != WorldType.CUSTOMIZED;
        this.btnBonusItems.visible = this.field_146344_y;
        this.btnMapType.visible = this.field_146344_y;
        this.btnAllowCommands.visible = this.field_146344_y;
        this.btnCustomizeType.visible = this.field_146344_y && (WorldType.worldTypes[this.selectedIndex] == WorldType.FLAT || WorldType.worldTypes[this.selectedIndex] == WorldType.CUSTOMIZED);
    }

    this.func_146319_h();

    if (this.field_146344_y)
    {
        this.btnMoreOptions.displayString = I18n.format("gui.done", new Object[0]);
    }
    else
    {
        this.btnMoreOptions.displayString = I18n.format("selectWorld.moreWorldOptions", new Object[0]);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:50,代码来源:GuiCreateWorld.java

示例7: showMoreWorldOptions

/**
 * Shows additional world-creation options if toggle is true, otherwise shows main world-creation elements
 */
private void showMoreWorldOptions(boolean toggle)
{
    this.inMoreWorldOptionsDisplay = toggle;

    if (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.DEBUG_WORLD)
    {
        this.btnGameMode.visible = !this.inMoreWorldOptionsDisplay;
        this.btnGameMode.enabled = false;

        if (this.savedGameMode == null)
        {
            this.savedGameMode = this.gameMode;
        }

        this.gameMode = "spectator";
        this.btnMapFeatures.visible = false;
        this.btnBonusItems.visible = false;
        this.btnMapType.visible = this.inMoreWorldOptionsDisplay;
        this.btnAllowCommands.visible = false;
        this.btnCustomizeType.visible = false;
    }
    else
    {
        this.btnGameMode.visible = !this.inMoreWorldOptionsDisplay;
        this.btnGameMode.enabled = true;

        if (this.savedGameMode != null)
        {
            this.gameMode = this.savedGameMode;
            this.savedGameMode = null;
        }

        this.btnMapFeatures.visible = this.inMoreWorldOptionsDisplay && WorldType.WORLD_TYPES[this.selectedIndex] != WorldType.CUSTOMIZED;
        this.btnBonusItems.visible = this.inMoreWorldOptionsDisplay;
        this.btnMapType.visible = this.inMoreWorldOptionsDisplay;
        this.btnAllowCommands.visible = this.inMoreWorldOptionsDisplay;
        this.btnCustomizeType.visible = this.inMoreWorldOptionsDisplay && (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.FLAT || WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.CUSTOMIZED);
    }

    this.updateDisplayState();

    if (this.inMoreWorldOptionsDisplay)
    {
        this.btnMoreOptions.displayString = I18n.format("gui.done", new Object[0]);
    }
    else
    {
        this.btnMoreOptions.displayString = I18n.format("selectWorld.moreWorldOptions", new Object[0]);
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:53,代码来源:GuiCreateWorld.java

示例8: initializeAllBiomeGenerators

public static GenLayer[] initializeAllBiomeGenerators(long seed, WorldType p_180781_2_, String p_180781_3_)
{
    GenLayer genlayer = new GenLayerIsland(1L);
    genlayer = new GenLayerFuzzyZoom(2000L, genlayer);
    GenLayerAddIsland genlayeraddisland = new GenLayerAddIsland(1L, genlayer);
    GenLayerZoom genlayerzoom = new GenLayerZoom(2001L, genlayeraddisland);
    GenLayerAddIsland genlayeraddisland1 = new GenLayerAddIsland(2L, genlayerzoom);
    genlayeraddisland1 = new GenLayerAddIsland(50L, genlayeraddisland1);
    genlayeraddisland1 = new GenLayerAddIsland(70L, genlayeraddisland1);
    GenLayerRemoveTooMuchOcean genlayerremovetoomuchocean = new GenLayerRemoveTooMuchOcean(2L, genlayeraddisland1);
    GenLayerAddSnow genlayeraddsnow = new GenLayerAddSnow(2L, genlayerremovetoomuchocean);
    GenLayerAddIsland genlayeraddisland2 = new GenLayerAddIsland(3L, genlayeraddsnow);
    GenLayerEdge genlayeredge = new GenLayerEdge(2L, genlayeraddisland2, GenLayerEdge.Mode.COOL_WARM);
    genlayeredge = new GenLayerEdge(2L, genlayeredge, GenLayerEdge.Mode.HEAT_ICE);
    genlayeredge = new GenLayerEdge(3L, genlayeredge, GenLayerEdge.Mode.SPECIAL);
    GenLayerZoom genlayerzoom1 = new GenLayerZoom(2002L, genlayeredge);
    genlayerzoom1 = new GenLayerZoom(2003L, genlayerzoom1);
    GenLayerAddIsland genlayeraddisland3 = new GenLayerAddIsland(4L, genlayerzoom1);
    GenLayerAddMushroomIsland genlayeraddmushroomisland = new GenLayerAddMushroomIsland(5L, genlayeraddisland3);
    GenLayerDeepOcean genlayerdeepocean = new GenLayerDeepOcean(4L, genlayeraddmushroomisland);
    GenLayer genlayer4 = GenLayerZoom.magnify(1000L, genlayerdeepocean, 0);
    int i = 4;
    int j = i;

    if (p_180781_2_ == WorldType.CUSTOMIZED && !p_180781_3_.isEmpty())
    {
        ChunkProviderSettings chunkprovidersettings = ChunkProviderSettings.Factory.jsonToFactory(p_180781_3_).build();
        i = chunkprovidersettings.biomeSize;
        j = chunkprovidersettings.riverSize;
    }

    if (p_180781_2_ == WorldType.LARGE_BIOMES)
    {
        i = 6;
    }

    i = getModdedBiomeSize(p_180781_2_, i);

    GenLayer lvt_8_1_ = GenLayerZoom.magnify(1000L, genlayer4, 0);
    GenLayerRiverInit genlayerriverinit = new GenLayerRiverInit(100L, lvt_8_1_);
    GenLayer lvt_10_1_ = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
    GenLayer genlayerbiomeedge = p_180781_2_.getBiomeLayer(seed, genlayer4, p_180781_3_);
    GenLayer genlayerhills = new GenLayerHills(1000L, genlayerbiomeedge, lvt_10_1_);
    GenLayer genlayer5 = GenLayerZoom.magnify(1000L, genlayerriverinit, 2);
    genlayer5 = GenLayerZoom.magnify(1000L, genlayer5, j);
    GenLayerRiver genlayerriver = new GenLayerRiver(1L, genlayer5);
    GenLayerSmooth genlayersmooth = new GenLayerSmooth(1000L, genlayerriver);
    genlayerhills = new GenLayerRareBiome(1001L, genlayerhills);

    for (int k = 0; k < i; ++k)
    {
        genlayerhills = new GenLayerZoom((long)(1000 + k), genlayerhills);

        if (k == 0)
        {
            genlayerhills = new GenLayerAddIsland(3L, genlayerhills);
        }

        if (k == 1 || i == 1)
        {
            genlayerhills = new GenLayerShore(1000L, genlayerhills);
        }
    }

    GenLayerSmooth genlayersmooth1 = new GenLayerSmooth(1000L, genlayerhills);
    GenLayerRiverMix genlayerrivermix = new GenLayerRiverMix(100L, genlayersmooth1, genlayersmooth);
    GenLayer genlayer3 = new GenLayerVoronoiZoom(10L, genlayerrivermix);
    genlayerrivermix.initWorldGenSeed(seed);
    genlayer3.initWorldGenSeed(seed);
    return new GenLayer[] {genlayerrivermix, genlayer3, genlayerrivermix};
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:71,代码来源:GenLayer.java

示例9: showMoreWorldOptions

/**
 * Shows additional world-creation options if toggle is true, otherwise shows main world-creation elements
 */
private void showMoreWorldOptions(boolean toggle)
{
    this.inMoreWorldOptionsDisplay = toggle;

    if (WorldType.WORLD_TYPES[this.selectedIndex] == WorldType.DEBUG_WORLD)
    {
        this.btnGameMode.visible = !this.inMoreWorldOptionsDisplay;
        this.btnGameMode.enabled = false;

        if (this.savedGameMode == null)
        {
            this.savedGameMode = this.gameMode;
        }

        this.gameMode = "spectator";
        this.btnMapFeatures.visible = false;
        this.btnBonusItems.visible = false;
        this.btnMapType.visible = this.inMoreWorldOptionsDisplay;
        this.btnAllowCommands.visible = false;
        this.btnCustomizeType.visible = false;
    }
    else
    {
        this.btnGameMode.visible = !this.inMoreWorldOptionsDisplay;
        this.btnGameMode.enabled = true;

        if (this.savedGameMode != null)
        {
            this.gameMode = this.savedGameMode;
            this.savedGameMode = null;
        }

        this.btnMapFeatures.visible = this.inMoreWorldOptionsDisplay && WorldType.WORLD_TYPES[this.selectedIndex] != WorldType.CUSTOMIZED;
        this.btnBonusItems.visible = this.inMoreWorldOptionsDisplay;
        this.btnMapType.visible = this.inMoreWorldOptionsDisplay;
        this.btnAllowCommands.visible = this.inMoreWorldOptionsDisplay;
        this.btnCustomizeType.visible = this.inMoreWorldOptionsDisplay && WorldType.WORLD_TYPES[this.selectedIndex].isCustomizable();
    }

    this.updateDisplayState();

    if (this.inMoreWorldOptionsDisplay)
    {
        this.btnMoreOptions.displayString = I18n.format("gui.done", new Object[0]);
    }
    else
    {
        this.btnMoreOptions.displayString = I18n.format("selectWorld.moreWorldOptions", new Object[0]);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:53,代码来源:GuiCreateWorld.java


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