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


Java ISaveFormat.getWorldInfo方法代码示例

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


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

示例1: func_146317_a

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public static String func_146317_a(ISaveFormat p_146317_0_, String p_146317_1_)
{
    p_146317_1_ = p_146317_1_.replaceAll("[\\./\"]", "_");

    for (String s : disallowedFilenames)
    {
        if (p_146317_1_.equalsIgnoreCase(s))
        {
            p_146317_1_ = "_" + p_146317_1_ + "_";
        }
    }

    while (p_146317_0_.getWorldInfo(p_146317_1_) != null)
    {
        p_146317_1_ = p_146317_1_ + "-";
    }

    return p_146317_1_;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:20,代码来源:GuiCreateWorld.java

示例2: getUncollidingSaveDirName

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Ensures that a proposed directory name doesn't collide with existing names.
 * Returns the name, possibly modified to avoid collisions.
 */
public static String getUncollidingSaveDirName(ISaveFormat saveLoader, String name)
{
    name = name.replaceAll("[\\./\"]", "_");

    for (String s : DISALLOWED_FILENAMES)
    {
        if (name.equalsIgnoreCase(s))
        {
            name = "_" + name + "_";
        }
    }

    while (saveLoader.getWorldInfo(name) != null)
    {
        name = name + "-";
    }

    return name;
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:24,代码来源:GuiCreateWorld.java

示例3: initGui

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format("selectWorld.edit.resetIcon", new Object[0])));
    this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format("selectWorld.edit.openFolder", new Object[0])));
    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format("selectWorld.edit.save", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format("gui.cancel", new Object[0])));
    guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, "icon.png").isFile();
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);
    String s = worldinfo == null ? "" : worldinfo.getWorldName();
    this.nameEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 60, 200, 20);
    this.nameEdit.setFocused(true);
    this.nameEdit.setText(s);
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:21,代码来源:GuiWorldEdit.java

示例4: initGui

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    GuiButton guibutton = this.addButton(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format("selectWorld.edit.resetIcon", new Object[0])));
    this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format("selectWorld.edit.openFolder", new Object[0])));
    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format("selectWorld.edit.save", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format("gui.cancel", new Object[0])));
    guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, "icon.png").isFile();
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);
    String s = worldinfo.getWorldName();
    this.nameEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 60, 200, 20);
    this.nameEdit.setFocused(true);
    this.nameEdit.setText(s);
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:GuiWorldEdit.java

示例5: func_146317_a

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public static String func_146317_a(ISaveFormat p_146317_0_, String p_146317_1_)
{
	p_146317_1_ = p_146317_1_.replaceAll("[\\./\"]", "_");
	String[] astring = disallowedFilenames;
	int i = astring.length;

	for (int j = 0; j < i; ++j)
	{
		String s1 = astring[j];

		if (p_146317_1_.equalsIgnoreCase(s1))
		{
			p_146317_1_ = "_" + p_146317_1_ + "_";
		}
	}

	while (p_146317_0_.getWorldInfo(p_146317_1_) != null)
	{
		p_146317_1_ = p_146317_1_ + "-";
	}

	return p_146317_1_;
}
 
开发者ID:lumien231,项目名称:Simple-Dimensions,代码行数:24,代码来源:GuiCreateDimension.java

示例6: func_146317_a

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public static String func_146317_a(ISaveFormat p_146317_0_, String p_146317_1_)
{
    p_146317_1_ = p_146317_1_.replaceAll("[\\./\"]", "_");
    String[] var2 = field_146327_L;
    int var3 = var2.length;

    for (int var4 = 0; var4 < var3; ++var4)
    {
        String var5 = var2[var4];

        if (p_146317_1_.equalsIgnoreCase(var5))
        {
            p_146317_1_ = "_" + p_146317_1_ + "_";
        }
    }

    while (p_146317_0_.getWorldInfo(p_146317_1_) != null)
    {
        p_146317_1_ = p_146317_1_ + "-";
    }

    return p_146317_1_;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:24,代码来源:GuiCreateWorld.java

示例7: initGui

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    GuiButton guibutton = this.func_189646_b(new GuiButton(3, this.width / 2 - 100, this.height / 4 + 24 + 12, I18n.format("selectWorld.edit.resetIcon", new Object[0])));
    this.buttonList.add(new GuiButton(4, this.width / 2 - 100, this.height / 4 + 48 + 12, I18n.format("selectWorld.edit.openFolder", new Object[0])));
    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format("selectWorld.edit.save", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format("gui.cancel", new Object[0])));
    guibutton.enabled = this.mc.getSaveLoader().getFile(this.worldId, "icon.png").isFile();
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo(this.worldId);
    String s = worldinfo.getWorldName();
    this.nameEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 60, 200, 20);
    this.nameEdit.setFocused(true);
    this.nameEdit.setText(s);
}
 
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:21,代码来源:GuiWorldEdit.java

示例8: func_146317_a

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public static String func_146317_a(ISaveFormat p_146317_0_, String p_146317_1_)
{
    p_146317_1_ = p_146317_1_.replaceAll("[\\./\"]", "_");
    String[] astring = field_146327_L;
    int i = astring.length;

    for (int j = 0; j < i; ++j)
    {
        String s1 = astring[j];

        if (p_146317_1_.equalsIgnoreCase(s1))
        {
            p_146317_1_ = "_" + p_146317_1_ + "_";
        }
    }

    while (p_146317_0_.getWorldInfo(p_146317_1_) != null)
    {
        p_146317_1_ = p_146317_1_ + "-";
    }

    return p_146317_1_;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:24,代码来源:GuiCreateWorld.java

示例9: func_73913_a

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public static String func_73913_a(ISaveFormat par0ISaveFormat, String par1Str)
{
    par1Str = par1Str.replaceAll("[\\./\"]", "_");
    String[] astring = ILLEGAL_WORLD_NAMES;
    int i = astring.length;

    for (int j = 0; j < i; ++j)
    {
        String s1 = astring[j];

        if (par1Str.equalsIgnoreCase(s1))
        {
            par1Str = "_" + par1Str + "_";
        }
    }

    while (par0ISaveFormat.getWorldInfo(par1Str) != null)
    {
        par1Str = par1Str + "-";
    }

    return par1Str;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:24,代码来源:GuiCreateWorld.java

示例10: func_73913_a

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public static String func_73913_a(ISaveFormat saveFormat, String str)
{
	str = str.replaceAll("[\\./\"]", "_");
	String[] word = ILLEGAL_WORLD_NAMES;
	int i = word.length;

	for (String s1 : word)
	{
		if (str.equalsIgnoreCase(s1))
		{
			str = "_" + str + "_";
		}
	}

	while (saveFormat.getWorldInfo(str) != null)
	{
		str = str + "-";
	}

	return str;
}
 
开发者ID:Ubiquitous-Spice,项目名称:Modjam-3,代码行数:22,代码来源:HackedCreateWorld.java

示例11: initGui

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    Keyboard.enableRepeatEvents(true);
    this.buttonList.clear();
    this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format("selectWorld.renameButton", new Object[0])));
    this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format("gui.cancel", new Object[0])));
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo(this.saveName);
    String s = worldinfo.getWorldName();
    this.field_146583_f = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 60, 200, 20);
    this.field_146583_f.setFocused(true);
    this.field_146583_f.setText(s);
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:GuiRenameWorld.java

示例12: addDemoButtons

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds Demo buttons on Main Menu for players who are playing Demo.
 */
private void addDemoButtons(int p_73972_1_, int p_73972_2_)
{
    this.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format("menu.playdemo", new Object[0])));
    this.buttonList.add(this.buttonResetDemo = new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format("menu.resetdemo", new Object[0])));
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

    if (worldinfo == null)
    {
        this.buttonResetDemo.enabled = false;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:16,代码来源:GuiMainMenu.java

示例13: addDemoButtons

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds Demo buttons on Main Menu for players who are playing Demo.
 */
private void addDemoButtons(int p_73972_1_, int p_73972_2_) {
	this.buttonList
			.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format("menu.playdemo", new Object[0])));
	this.buttonResetDemo = this.addButton(new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1,
			I18n.format("menu.resetdemo", new Object[0])));
	ISaveFormat isaveformat = this.mc.getSaveLoader();
	WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

	if (worldinfo == null) {
		this.buttonResetDemo.enabled = false;
	}
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:16,代码来源:GuiMainMenu.java

示例14: addDemoButtons

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Adds Demo buttons on Main Menu for players who are playing Demo.
 */
private void addDemoButtons(int p_73972_1_, int p_73972_2_)
{
    this.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format("menu.playdemo", new Object[0])));
    this.buttonResetDemo = this.addButton(new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format("menu.resetdemo", new Object[0])));
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

    if (worldinfo == null)
    {
        this.buttonResetDemo.enabled = false;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:16,代码来源:GuiMainMenu.java

示例15: addDemoButtons

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
private void addDemoButtons(int p_73972_1_, int p_73972_2_)
{
    this.buttonList.add(new GuiButton(11, this.width / 2 - 100, p_73972_1_, I18n.format("menu.playdemo", new Object[0])));
    this.buttonList.add(this.buttonResetDemo = new GuiButton(12, this.width / 2 - 100, p_73972_1_ + p_73972_2_ * 1, I18n.format("menu.resetdemo", new Object[0])));
    ISaveFormat isaveformat = this.mc.getSaveLoader();
    WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

    if (worldinfo == null)
    {
        this.buttonResetDemo.enabled = false;
    }
}
 
开发者ID:yeyaowei,项目名称:New-Menu,代码行数:13,代码来源:NewMenu.java


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