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