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


Java WorldInfo.isHardcoreModeEnabled方法代碼示例

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


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

示例1: func_146318_a

import net.minecraft.world.storage.WorldInfo; //導入方法依賴的package包/類
public void func_146318_a(WorldInfo p_146318_1_)
{
    this.field_146330_J = I18n.format("selectWorld.newWorld.copyOf", new Object[] {p_146318_1_.getWorldName()});
    this.field_146329_I = p_146318_1_.getSeed() + "";
    this.selectedIndex = p_146318_1_.getTerrainType().getWorldTypeID();
    this.chunkProviderSettingsJson = p_146318_1_.getGeneratorOptions();
    this.field_146341_s = p_146318_1_.isMapFeaturesEnabled();
    this.allowCheats = p_146318_1_.areCommandsAllowed();

    if (p_146318_1_.isHardcoreModeEnabled())
    {
        this.gameMode = "hardcore";
    }
    else if (p_146318_1_.getGameType().isSurvivalOrAdventure())
    {
        this.gameMode = "survival";
    }
    else if (p_146318_1_.getGameType().isCreative())
    {
        this.gameMode = "creative";
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:23,代碼來源:GuiCreateWorld.java

示例2: recreateFromExistingWorld

import net.minecraft.world.storage.WorldInfo; //導入方法依賴的package包/類
/**
 * Set the initial values of a new world to create, from the values from an existing world.
 *  
 * Called after construction when a user selects the "Recreate" button.
 */
public void recreateFromExistingWorld(WorldInfo original)
{
    this.worldName = I18n.format("selectWorld.newWorld.copyOf", new Object[] {original.getWorldName()});
    this.worldSeed = original.getSeed() + "";
    this.selectedIndex = original.getTerrainType().getWorldTypeID();
    this.chunkProviderSettingsJson = original.getGeneratorOptions();
    this.generateStructuresEnabled = original.isMapFeaturesEnabled();
    this.allowCheats = original.areCommandsAllowed();

    if (original.isHardcoreModeEnabled())
    {
        this.gameMode = "hardcore";
    }
    else if (original.getGameType().isSurvivalOrAdventure())
    {
        this.gameMode = "survival";
    }
    else if (original.getGameType().isCreative())
    {
        this.gameMode = "creative";
    }
}
 
開發者ID:sudofox,項目名稱:Backmemed,代碼行數:28,代碼來源:GuiCreateWorld.java

示例3: WorldSettings

import net.minecraft.world.storage.WorldInfo; //導入方法依賴的package包/類
public WorldSettings(WorldInfo info)
{
    this(info.getSeed(), info.getGameType(), info.isMapFeaturesEnabled(), info.isHardcoreModeEnabled(), info.getTerrainType());
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:5,代碼來源:WorldSettings.java


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