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


Java ISaveFormat.flushCache方法代码示例

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


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

示例1: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id)
{
    if (this.field_146643_x)
    {
        this.field_146643_x = false;

        if (result)
        {
            ISaveFormat isaveformat = this.mc.getSaveLoader();
            isaveformat.flushCache();
            isaveformat.deleteWorldDirectory(this.func_146621_a(id));

            try
            {
                this.func_146627_h();
            }
            catch (AnvilConverterException anvilconverterexception)
            {
                logger.error((String)"Couldn\'t load level list", (Throwable)anvilconverterexception);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:26,代码来源:GuiSelectWorld.java

示例2: cleanupTemporaryWorlds

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Attempts to delete all Minecraft Worlds with "TEMP_" in front of the name
 * @param currentWorld excludes this world from deletion, can be null
 */
public static void cleanupTemporaryWorlds(String currentWorld){
    List<SaveFormatComparator> saveList;
    ISaveFormat isaveformat = Minecraft.getMinecraft().getSaveLoader();
    isaveformat.flushCache();

    try{
        saveList = isaveformat.getSaveList();
    } catch (AnvilConverterException e){
        e.printStackTrace();
        return;
    }

    String searchString = tempMark + AddressHelper.getMissionControlPort() + "_";

    for (SaveFormatComparator s: saveList){
        String folderName = s.getFileName();
        if (folderName.startsWith(searchString) && !folderName.equals(currentWorld)){
            isaveformat.deleteWorldDirectory(folderName);
        }
    }
}
 
开发者ID:Yarichi,项目名称:Proyecto-DASI,代码行数:26,代码来源:MapFileHelper.java

示例3: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id) {
	if (result && id == 12) {
		ISaveFormat isaveformat = this.mc.getSaveLoader();
		isaveformat.flushCache();
		isaveformat.deleteWorldDirectory("Demo_World");
		this.mc.displayGuiScreen(this);
	} else if (id == 12) {
		this.mc.displayGuiScreen(this);
	} else if (id == 13) {
		if (result) {
			try {
				Class<?> oclass = Class.forName("java.awt.Desktop");
				Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object) null, new Object[0]);
				oclass.getMethod("browse", new Class[] { URI.class }).invoke(object,
						new Object[] { new URI(this.openGLWarningLink) });
			} catch (Throwable throwable) {
				LOGGER.error("Couldn\'t open link", throwable);
			}
		}

		this.mc.displayGuiScreen(this);
	}
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:24,代码来源:GuiMainMenu.java

示例4: cleanupTemporaryWorlds

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
/**
 * Attempts to delete all Minecraft Worlds with "TEMP_" in front of the name
 * @param currentWorld excludes this world from deletion, can be null
 */
public static void cleanupTemporaryWorlds(String currentWorld){
    List<WorldSummary> saveList;
    ISaveFormat isaveformat = Minecraft.getMinecraft().getSaveLoader();
    isaveformat.flushCache();

    try{
        saveList = isaveformat.getSaveList();
    } catch (AnvilConverterException e){
        e.printStackTrace();
        return;
    }

    String searchString = tempMark + AddressHelper.getMissionControlPort() + "_";

    for (WorldSummary s: saveList){
        String folderName = s.getFileName();
        if (folderName.startsWith(searchString) && !folderName.equals(currentWorld)){
            isaveformat.deleteWorldDirectory(folderName);
        }
    }
}
 
开发者ID:Microsoft,项目名称:malmo,代码行数:26,代码来源:MapFileHelper.java

示例5: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean par1, int par2)
{
    if (this.field_146643_x)
    {
        this.field_146643_x = false;

        if (par1)
        {
            ISaveFormat var3 = this.mc.getSaveLoader();
            var3.flushCache();
            var3.deleteWorldDirectory(this.func_146621_a(par2));

            try
            {
                this.func_146627_h();
            }
            catch (AnvilConverterException var5)
            {
                logger.error("Couldn\'t load level list", var5);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:GuiSelectWorld.java

示例6: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean p_73878_1_, int p_73878_2_)
{
    if (this.field_146643_x)
    {
        this.field_146643_x = false;

        if (p_73878_1_)
        {
            ISaveFormat isaveformat = this.mc.getSaveLoader();
            isaveformat.flushCache();
            isaveformat.deleteWorldDirectory(this.func_146621_a(p_73878_2_));

            try
            {
                this.func_146627_h();
            }
            catch (AnvilConverterException anvilconverterexception)
            {
                logger.error("Couldn\'t load level list", anvilconverterexception);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:26,代码来源:GuiSelectWorld.java

示例7: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean par1, int par2)
{
    if (this.deleting)
    {
        this.deleting = false;

        if (par1)
        {
            ISaveFormat isaveformat = this.mc.getSaveLoader();
            isaveformat.flushCache();
            isaveformat.deleteWorldDirectory(this.getSaveFileName(par2));

            try
            {
                this.loadSaves();
            }
            catch (AnvilConverterException anvilconverterexception)
            {
                anvilconverterexception.printStackTrace();
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:26,代码来源:GuiSelectWorld.java

示例8: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id)
{
    if (result && id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        isaveformat.flushCache();
        isaveformat.deleteWorldDirectory("Demo_World");
        this.mc.displayGuiScreen(this);
    }
    else if (id == 13)
    {
        if (result)
        {
            try
            {
                Class<?> oclass = Class.forName("java.awt.Desktop");
                Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
                oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI(this.openGLWarningLink)});
            }
            catch (Throwable throwable)
            {
                logger.error("Couldn\'t open link", throwable);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:29,代码来源:GuiMainMenu.java

示例9: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id)
{
    if (result && id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        isaveformat.flushCache();
        isaveformat.deleteWorldDirectory("Demo_World");
        this.mc.displayGuiScreen(this);
    }
    else if (id == 13)
    {
        if (result)
        {
            try
            {
                Class<?> oclass = Class.forName("java.awt.Desktop");
                Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
                oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI(this.openGLWarningLink)});
            }
            catch (Throwable throwable)
            {
                LOGGER.error("Couldn\'t open link", throwable);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:29,代码来源:GuiMainMenu.java

示例10: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean p_73878_1_, int p_73878_2_)
{
    if (p_73878_1_ && p_73878_2_ == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        isaveformat.flushCache();
        isaveformat.deleteWorldDirectory("Demo_World");
        this.mc.displayGuiScreen(this);
    }
    else if (p_73878_2_ == 13)
    {
        if (p_73878_1_)
        {
            try
            {
                Class oclass = Class.forName("java.awt.Desktop");
                Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
                oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI(this.downloadUrl)});
            }
            catch (Throwable throwable)
            {
                logger.error("Couldn\'t open link", throwable);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:yeyaowei,项目名称:New-Menu,代码行数:29,代码来源:NewMenu.java

示例11: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean p_73878_1_, int p_73878_2_)
{
    if (p_73878_1_ && p_73878_2_ == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        isaveformat.flushCache();
        isaveformat.deleteWorldDirectory("Demo_World");
        this.mc.displayGuiScreen(this);
    }
    else if (p_73878_2_ == 13)
    {
        if (p_73878_1_)
        {
            try
            {
                Class oclass = Class.forName("java.awt.Desktop");
                Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
                oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI(this.field_104024_v)});
            }
            catch (Throwable throwable)
            {
                logger.error("Couldn\'t open link", throwable);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:jtrent238,项目名称:PopularMMOS-EpicProportions-Mod,代码行数:29,代码来源:GuiMainMenu.java

示例12: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean result, int id)
{
	if (result && id == 12)
	{
		ISaveFormat isaveformat = this.mc.getSaveLoader();
		isaveformat.flushCache();
		isaveformat.deleteWorldDirectory("Demo_World");
		this.mc.displayGuiScreen(this);
	}
	else if (id == 13)
	{
		if (result)
		{
			try
			{
				Class<?> oclass = Class.forName("java.awt.Desktop");
				Object object = oclass.getMethod("getDesktop", new Class[0]).invoke(
						(Object) null, new Object[0]);
				oclass.getMethod("browse", new Class[] { URI.class }).invoke(object,
						new Object[] { new URI(this.field_104024_v) });
			}
			catch (Throwable throwable)
			{
				logger.error("Couldn\'t open link", throwable);
			}
		}

		this.mc.displayGuiScreen(this);
	}
}
 
开发者ID:Archiving,项目名称:ARKCraft-Code,代码行数:31,代码来源:GuiMainMenuOverride.java

示例13: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean par1, int par2)
{
    if (par1 && par2 == 12)
    {
        ISaveFormat var6 = this.mc.getSaveLoader();
        var6.flushCache();
        var6.deleteWorldDirectory("Demo_World");
        this.mc.displayGuiScreen(this);
    }
    else if (par2 == 13)
    {
        if (par1)
        {
            try
            {
                Class var3 = Class.forName("java.awt.Desktop");
                Object var4 = var3.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
                var3.getMethod("browse", new Class[] {URI.class}).invoke(var4, new Object[] {new URI(this.field_104024_v)});
            }
            catch (Throwable var5)
            {
                logger.error("Couldn\'t open link", var5);
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:29,代码来源:GuiMainMenu.java

示例14: confirmClicked

import net.minecraft.world.storage.ISaveFormat; //导入方法依赖的package包/类
public void confirmClicked(boolean par1, int par2)
{
    if (par1 && par2 == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        isaveformat.flushCache();
        isaveformat.deleteWorldDirectory("Demo_World");
        this.mc.displayGuiScreen(this);
    }
    else if (par2 == 13)
    {
        if (par1)
        {
            try
            {
                Class oclass = Class.forName("java.awt.Desktop");
                Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]);
                oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI(this.field_104024_v)});
            }
            catch (Throwable throwable)
            {
                throwable.printStackTrace();
            }
        }

        this.mc.displayGuiScreen(this);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:29,代码来源:GuiMainMenu.java


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