本文整理汇总了Java中net.minecraft.world.storage.ISaveHandler.flush方法的典型用法代码示例。如果您正苦于以下问题:Java ISaveHandler.flush方法的具体用法?Java ISaveHandler.flush怎么用?Java ISaveHandler.flush使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraft.world.storage.ISaveHandler
的用法示例。
在下文中一共展示了ISaveHandler.flush方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: actionPerformed
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
@Override
protected void actionPerformed(GuiButton button) {
if(button.id == 3) {
mc.displayGuiScreen(new GuiCreateWorld(this));
} else if(button.id == 7) {
try {
GuiCreateWorld gui = new GuiCreateWorld(this);
ISaveHandler saveHandler = mc.getSaveLoader().getSaveLoader(func_146621_a(super_field_146640_r.getInt(this)), false);
WorldInfo worldInfo = saveHandler.loadWorldInfo();
saveHandler.flush();
gui.func_146318_a(worldInfo);
mc.displayGuiScreen(gui);
} catch(Exception e) {
e.printStackTrace();
}
} else {
super.actionPerformed(button);
}
}
示例2: recreateWorld
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
public void recreateWorld()
{
this.client.displayGuiScreen(new GuiScreenWorking());
GuiCreateWorld guicreateworld = new GuiCreateWorld(this.worldSelScreen);
ISaveHandler isavehandler = this.client.getSaveLoader().getSaveLoader(this.worldSummary.getFileName(), false);
WorldInfo worldinfo = isavehandler.loadWorldInfo();
isavehandler.flush();
if (worldinfo != null)
{
guicreateworld.recreateFromExistingWorld(worldinfo);
this.client.displayGuiScreen(guicreateworld);
}
}
示例3: recreateWorld
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
public void recreateWorld()
{
this.client.displayGuiScreen(new GuiScreenWorking());
GuiCreateWorld guicreateworld = new GuiCreateWorld(this.worldSelScreen);
ISaveHandler isavehandler = this.client.getSaveLoader().getSaveLoader(this.worldSummary.getFileName(), false);
WorldInfo worldinfo = isavehandler.loadWorldInfo();
isavehandler.flush();
guicreateworld.recreateFromExistingWorld(worldinfo);
this.client.displayGuiScreen(guicreateworld);
}
示例4: actionPerformed
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
/**
* Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
*/
protected void actionPerformed(GuiButton button) throws IOException
{
if (button.enabled)
{
if (button.id == 2)
{
String s = this.func_146614_d(this.field_146640_r);
if (s != null)
{
this.field_146643_x = true;
GuiYesNo guiyesno = func_152129_a(this, s, this.field_146640_r);
this.mc.displayGuiScreen(guiyesno);
}
}
else if (button.id == 1)
{
this.func_146615_e(this.field_146640_r);
}
else if (button.id == 3)
{
this.mc.displayGuiScreen(new GuiCreateWorld(this));
}
else if (button.id == 6)
{
this.mc.displayGuiScreen(new GuiRenameWorld(this, this.func_146621_a(this.field_146640_r)));
}
else if (button.id == 0)
{
this.mc.displayGuiScreen(this.parentScreen);
}
else if (button.id == 7)
{
GuiCreateWorld guicreateworld = new GuiCreateWorld(this);
ISaveHandler isavehandler = this.mc.getSaveLoader().getSaveLoader(this.func_146621_a(this.field_146640_r), false);
WorldInfo worldinfo = isavehandler.loadWorldInfo();
isavehandler.flush();
guicreateworld.func_146318_a(worldinfo);
this.mc.displayGuiScreen(guicreateworld);
}
else
{
this.field_146638_t.actionPerformed(button);
}
}
}
示例5: actionPerformed
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
protected void actionPerformed(GuiButton p_146284_1_)
{
if (p_146284_1_.enabled)
{
if (p_146284_1_.id == 2)
{
String var2 = this.func_146614_d(this.field_146640_r);
if (var2 != null)
{
this.field_146643_x = true;
GuiYesNo var3 = func_146623_a(this, var2, this.field_146640_r);
this.mc.displayGuiScreen(var3);
}
}
else if (p_146284_1_.id == 1)
{
this.func_146615_e(this.field_146640_r);
}
else if (p_146284_1_.id == 3)
{
this.mc.displayGuiScreen(new GuiCreateWorld(this));
}
else if (p_146284_1_.id == 6)
{
this.mc.displayGuiScreen(new GuiRenameWorld(this, this.func_146621_a(this.field_146640_r)));
}
else if (p_146284_1_.id == 0)
{
this.mc.displayGuiScreen(this.field_146632_a);
}
else if (p_146284_1_.id == 7)
{
GuiCreateWorld var5 = new GuiCreateWorld(this);
ISaveHandler var6 = this.mc.getSaveLoader().getSaveLoader(this.func_146621_a(this.field_146640_r), false);
WorldInfo var4 = var6.loadWorldInfo();
var6.flush();
var5.func_146318_a(var4);
this.mc.displayGuiScreen(var5);
}
else
{
this.field_146638_t.func_148147_a(p_146284_1_);
}
}
}
示例6: actionPerformed
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
protected void actionPerformed(GuiButton p_146284_1_)
{
if (p_146284_1_.enabled)
{
if (p_146284_1_.id == 2)
{
String s = this.func_146614_d(this.field_146640_r);
if (s != null)
{
this.field_146643_x = true;
GuiYesNo guiyesno = func_152129_a(this, s, this.field_146640_r);
this.mc.displayGuiScreen(guiyesno);
}
}
else if (p_146284_1_.id == 1)
{
this.func_146615_e(this.field_146640_r);
}
else if (p_146284_1_.id == 3)
{
this.mc.displayGuiScreen(new GuiCreateWorld(this));
}
else if (p_146284_1_.id == 6)
{
this.mc.displayGuiScreen(new GuiRenameWorld(this, this.func_146621_a(this.field_146640_r)));
}
else if (p_146284_1_.id == 0)
{
this.mc.displayGuiScreen(this.field_146632_a);
}
else if (p_146284_1_.id == 7)
{
GuiCreateWorld guicreateworld = new GuiCreateWorld(this);
ISaveHandler isavehandler = this.mc.getSaveLoader().getSaveLoader(this.func_146621_a(this.field_146640_r), false);
WorldInfo worldinfo = isavehandler.loadWorldInfo();
isavehandler.flush();
guicreateworld.func_146318_a(worldinfo);
this.mc.displayGuiScreen(guicreateworld);
}
else
{
this.field_146638_t.actionPerformed(p_146284_1_);
}
}
}
示例7: actionPerformed
import net.minecraft.world.storage.ISaveHandler; //导入方法依赖的package包/类
/**
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
*/
protected void actionPerformed(GuiButton par1GuiButton)
{
if (par1GuiButton.enabled)
{
if (par1GuiButton.id == 2)
{
String s = this.getSaveName(this.selectedWorld);
if (s != null)
{
this.deleting = true;
GuiYesNo guiyesno = getDeleteWorldScreen(this, s, this.selectedWorld);
this.mc.displayGuiScreen(guiyesno);
}
}
else if (par1GuiButton.id == 1)
{
this.selectWorld(this.selectedWorld);
}
else if (par1GuiButton.id == 3)
{
this.mc.displayGuiScreen(new GuiCreateWorld(this));
}
else if (par1GuiButton.id == 6)
{
this.mc.displayGuiScreen(new GuiRenameWorld(this, this.getSaveFileName(this.selectedWorld)));
}
else if (par1GuiButton.id == 0)
{
this.mc.displayGuiScreen(this.parentScreen);
}
else if (par1GuiButton.id == 7)
{
GuiCreateWorld guicreateworld = new GuiCreateWorld(this);
ISaveHandler isavehandler = this.mc.getSaveLoader().getSaveLoader(this.getSaveFileName(this.selectedWorld), false);
WorldInfo worldinfo = isavehandler.loadWorldInfo();
isavehandler.flush();
guicreateworld.func_82286_a(worldinfo);
this.mc.displayGuiScreen(guicreateworld);
}
else
{
this.worldSlotContainer.actionPerformed(par1GuiButton);
}
}
}