當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。