Java 类net.minecraft.world.demo.DemoWorldServer 实例源码

项目:Cauldron    文件:IntegratedServer.java   
protected void loadAllWorlds(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_)
{
    this.convertMapIfNeeded(p_71247_1_);
    ISaveHandler isavehandler = this.getActiveAnvilConverter().getSaveLoader(p_71247_1_, true);

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, p_71247_2_, 0, theProfiler) : new WorldServer(this, isavehandler, p_71247_2_, 0, theWorldSettings, theProfiler));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, p_71247_2_, dim, theWorldSettings, overWorld, theProfiler));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(getGameType());
        }

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.getConfigurationManager().setPlayerManager(new WorldServer[]{ overWorld });
    this.func_147139_a(this.func_147135_j());
    this.initialWorldChunkLoad();
}
项目:Cauldron    文件:IntegratedServer.java   
protected void loadAllWorlds(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_)
{
    this.convertMapIfNeeded(p_71247_1_);
    ISaveHandler isavehandler = this.getActiveAnvilConverter().getSaveLoader(p_71247_1_, true);

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, p_71247_2_, 0, theProfiler) : new WorldServer(this, isavehandler, p_71247_2_, 0, theWorldSettings, theProfiler));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, p_71247_2_, dim, theWorldSettings, overWorld, theProfiler));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(getGameType());
        }

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.getConfigurationManager().setPlayerManager(new WorldServer[]{ overWorld });
    this.func_147139_a(this.func_147135_j());
    this.initialWorldChunkLoad();
}
项目:RuneCraftery    文件:IntegratedServer.java   
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType, String par6Str)
{
    this.convertMapIfNeeded(par1Str);
    ISaveHandler isavehandler = this.getActiveAnvilConverter().getSaveLoader(par1Str, true);

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, theWorldSettings, theProfiler, getLogAgent()));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, theWorldSettings, overWorld, theProfiler, getLogAgent()));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(this.getGameType());
        }

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.getConfigurationManager().setPlayerManager(new WorldServer[]{ overWorld });
    this.setDifficultyForAllWorlds(this.getDifficulty());
    this.initialWorldChunkLoad();
}
项目:BetterNutritionMod    文件:IntegratedServer.java   
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType, String par6Str)
{
    this.convertMapIfNeeded(par1Str);
    ISaveHandler isavehandler = this.getActiveAnvilConverter().getSaveLoader(par1Str, true);

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, theWorldSettings, theProfiler, getLogAgent()));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, theWorldSettings, overWorld, theProfiler, getLogAgent()));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(this.getGameType());
        }

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.getConfigurationManager().setPlayerManager(new WorldServer[]{ overWorld });
    this.setDifficultyForAllWorlds(this.getDifficulty());
    this.initialWorldChunkLoad();
}
项目:DecompiledMinecraft    文件:IntegratedServer.java   
public IntegratedServer(Minecraft mcIn, String folderName, String worldName, WorldSettings settings)
{
    super(new File(mcIn.mcDataDir, "saves"), mcIn.getProxy(), new File(mcIn.mcDataDir, USER_CACHE_FILE.getName()));
    this.setServerOwner(mcIn.getSession().getUsername());
    this.setFolderName(folderName);
    this.setWorldName(worldName);
    this.setDemo(mcIn.isDemo());
    this.canCreateBonusChest(settings.isBonusChestEnabled());
    this.setBuildLimit(256);
    this.setConfigManager(new IntegratedPlayerList(this));
    this.mc = mcIn;
    this.theWorldSettings = this.isDemo() ? DemoWorldServer.demoWorldSettings : settings;
}
项目:BaseClient    文件:IntegratedServer.java   
public IntegratedServer(Minecraft mcIn, String folderName, String worldName, WorldSettings settings)
{
    super(new File(mcIn.mcDataDir, "saves"), mcIn.getProxy(), new File(mcIn.mcDataDir, USER_CACHE_FILE.getName()));
    this.setServerOwner(mcIn.getSession().getUsername());
    this.setFolderName(folderName);
    this.setWorldName(worldName);
    this.setDemo(mcIn.isDemo());
    this.canCreateBonusChest(settings.isBonusChestEnabled());
    this.setBuildLimit(256);
    this.setConfigManager(new IntegratedPlayerList(this));
    this.mc = mcIn;
    this.theWorldSettings = this.isDemo() ? DemoWorldServer.demoWorldSettings : settings;
}
项目:BaseClient    文件:IntegratedServer.java   
public IntegratedServer(Minecraft mcIn, String folderName, String worldName, WorldSettings settings)
{
    super(new File(mcIn.mcDataDir, "saves"), mcIn.getProxy(), new File(mcIn.mcDataDir, USER_CACHE_FILE.getName()));
    this.setServerOwner(mcIn.getSession().getUsername());
    this.setFolderName(folderName);
    this.setWorldName(worldName);
    this.setDemo(mcIn.isDemo());
    this.canCreateBonusChest(settings.isBonusChestEnabled());
    this.setBuildLimit(256);
    this.setConfigManager(new IntegratedPlayerList(this));
    this.mc = mcIn;
    this.theWorldSettings = this.isDemo() ? DemoWorldServer.demoWorldSettings : settings;
    Reflector.callVoid(Reflector.ModLoader_registerServer, new Object[] {this});
}
项目:Backmemed    文件:IntegratedServer.java   
public IntegratedServer(Minecraft clientIn, String folderNameIn, String worldNameIn, WorldSettings worldSettingsIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
    super(new File(clientIn.mcDataDir, "saves"), clientIn.getProxy(), clientIn.getDataFixer(), authServiceIn, sessionServiceIn, profileRepoIn, profileCacheIn);
    this.setServerOwner(clientIn.getSession().getUsername());
    this.setFolderName(folderNameIn);
    this.setWorldName(worldNameIn);
    this.setDemo(clientIn.isDemo());
    this.canCreateBonusChest(worldSettingsIn.isBonusChestEnabled());
    this.setBuildLimit(256);
    this.setPlayerList(new IntegratedPlayerList(this));
    this.mc = clientIn;
    this.theWorldSettings = this.isDemo() ? DemoWorldServer.DEMO_WORLD_SETTINGS : worldSettingsIn;
}
项目:CustomWorldGen    文件:IntegratedServer.java   
public IntegratedServer(Minecraft clientIn, String folderNameIn, String worldNameIn, WorldSettings worldSettingsIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
    super(new File(clientIn.mcDataDir, "saves"), clientIn.getProxy(), clientIn.getDataFixer(), authServiceIn, sessionServiceIn, profileRepoIn, profileCacheIn);
    this.setServerOwner(clientIn.getSession().getUsername());
    this.setFolderName(folderNameIn);
    this.setWorldName(worldNameIn);
    this.setDemo(clientIn.isDemo());
    this.canCreateBonusChest(worldSettingsIn.isBonusChestEnabled());
    this.setBuildLimit(256);
    this.setPlayerList(new IntegratedPlayerList(this));
    this.mc = clientIn;
    this.theWorldSettings = this.isDemo() ? DemoWorldServer.DEMO_WORLD_SETTINGS : worldSettingsIn;
}
项目:RuneCraftery    文件:GuiMainMenu.java   
protected void func_73875_a(GuiButton p_73875_1_) {
   if(p_73875_1_.field_73741_f == 0) {
      this.field_73882_e.func_71373_a(new GuiOptions(this, this.field_73882_e.field_71474_y));
   }

   if(p_73875_1_.field_73741_f == 5) {
      this.field_73882_e.func_71373_a(new GuiLanguage(this, this.field_73882_e.field_71474_y, this.field_73882_e.func_135016_M()));
   }

   if(p_73875_1_.field_73741_f == 1) {
      this.field_73882_e.func_71373_a(new GuiSelectWorld(this));
   }

   if(p_73875_1_.field_73741_f == 2) {
      this.field_73882_e.func_71373_a(new GuiMultiplayer(this));
   }

   if(p_73875_1_.field_73741_f == 14 && this.field_130023_H.field_73748_h) {
      this.func_140005_i();
   }

   if(p_73875_1_.field_73741_f == 4) {
      this.field_73882_e.func_71400_g();
   }

   if(p_73875_1_.field_73741_f == 11) {
      this.field_73882_e.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a);
   }

   if(p_73875_1_.field_73741_f == 12) {
      ISaveFormat var2 = this.field_73882_e.func_71359_d();
      WorldInfo var3 = var2.func_75803_c("Demo_World");
      if(var3 != null) {
         GuiYesNo var4 = GuiSelectWorld.func_74061_a(this, var3.func_76065_j(), 12);
         this.field_73882_e.func_71373_a(var4);
      }
   }

}
项目:RuneCraftery    文件:IntegratedServer.java   
protected void func_71247_a(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_) {
   this.func_71237_c(p_71247_1_);
   this.field_71305_c = new WorldServer[3];
   this.field_71312_k = new long[this.field_71305_c.length][100];
   ISaveHandler var7 = this.func_71254_M().func_75804_a(p_71247_1_, true);

   for(int var8 = 0; var8 < this.field_71305_c.length; ++var8) {
      byte var9 = 0;
      if(var8 == 1) {
         var9 = -1;
      }

      if(var8 == 2) {
         var9 = 1;
      }

      if(var8 == 0) {
         if(this.func_71242_L()) {
            this.field_71305_c[var8] = new DemoWorldServer(this, var7, p_71247_2_, var9, this.field_71304_b, this.func_98033_al());
         } else {
            this.field_71305_c[var8] = new WorldServer(this, var7, p_71247_2_, var9, this.field_71350_m, this.field_71304_b, this.func_98033_al());
         }
      } else {
         this.field_71305_c[var8] = new WorldServerMulti(this, var7, p_71247_2_, var9, this.field_71350_m, this.field_71305_c[0], this.field_71304_b, this.func_98033_al());
      }

      this.field_71305_c[var8].func_72954_a(new WorldManager(this, this.field_71305_c[var8]));
      this.func_71203_ab().func_72364_a(this.field_71305_c);
   }

   this.func_71226_c(this.func_71232_g());
   this.func_71222_d();
}
项目:DecompiledMinecraft    文件:GuiMainMenu.java   
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    if (button.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (button.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (button.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible)
    {
        this.switchToRealms();
    }

    if (button.id == 4)
    {
        this.mc.shutdown();
    }

    if (button.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (button.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:BaseClient    文件:GuiMainMenu.java   
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    if (button.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (button.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (button.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible)
    {
        this.switchToRealms();
    }

    if (button.id == 4)
    {
        this.mc.shutdown();
    }

    if (button.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (button.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }

    if (button.id == 420)
    {
        mc.displayGuiScreen(Client.accountScreen);
    }
}
项目:BaseClient    文件:GuiMainMenu.java   
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    if (button.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (button.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (button.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible)
    {
        this.switchToRealms();
    }

    if (button.id == 4)
    {
        this.mc.shutdown();
    }

    if (button.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (button.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:Backmemed    文件:GuiMainMenu.java   
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed
 * for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException {
    if (button.id == 0) {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5) {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (button.id == 1) {
        this.mc.displayGuiScreen(new GuiWorldSelection(this));
    }

    if (button.id == 2) {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible) {
        this.switchToRealms();
    }

    if (button.id == 4) {
        this.mc.shutdown();
    }

    if (button.id == 6 && Reflector.GuiModList_Constructor.exists()) {
        this.mc.displayGuiScreen(
                (GuiScreen) Reflector.newInstance(Reflector.GuiModList_Constructor, new Object[] { this }));
    }

    if (button.id == 11) {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.DEMO_WORLD_SETTINGS);
    }

    if (button.id == 12) {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null) {
            this.mc.displayGuiScreen(new GuiYesNo(this, I18n.format("selectWorld.deleteQuestion", new Object[0]),
                    "\'" + worldinfo.getWorldName() + "\' "
                            + I18n.format("selectWorld.deleteWarning", new Object[0]),
                    I18n.format("selectWorld.deleteButton", new Object[0]),
                    I18n.format("gui.cancel", new Object[0]), 12));
        }
    }

    if (button.id == 3) {
        this.mc.displayGuiScreen(Manager.altScreen);
    }

    if (button.id == 15) {
        this.mc.displayGuiScreen(new XdolfUpdateGui(this));
    }
}
项目:CustomWorldGen    文件:GuiMainMenu.java   
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    if (button.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (button.id == 1)
    {
        this.mc.displayGuiScreen(new GuiWorldSelection(this));
    }

    if (button.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible)
    {
        this.switchToRealms();
    }

    if (button.id == 4)
    {
        this.mc.shutdown();
    }

    if (button.id == 6)
    {
        this.mc.displayGuiScreen(new net.minecraftforge.fml.client.GuiModList(this));
    }

    if (button.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.DEMO_WORLD_SETTINGS);
    }

    if (button.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            this.mc.displayGuiScreen(new GuiYesNo(this, I18n.format("selectWorld.deleteQuestion", new Object[0]), "\'" + worldinfo.getWorldName() + "\' " + I18n.format("selectWorld.deleteWarning", new Object[0]), I18n.format("selectWorld.deleteButton", new Object[0]), I18n.format("gui.cancel", new Object[0]), 12));
        }
    }
}
项目:CheataClientSrc    文件:CheataMainMenu.java   
/**
  * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
  */
 protected void actionPerformed(GuiButton button) throws IOException
 {
     if (button.id == 0)
     {
         this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
     }

     if (button.id == 5)
     {
         this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
     }

     if (button.id == 1)
     {
         this.mc.displayGuiScreen(new GuiWorldSelection(this));
     }

     if (button.id == 2)
     {
         this.mc.displayGuiScreen(new GuiMultiplayer(this));
     }

     if (button.id == 4)
     {
         this.mc.shutdown();
     }

     if (button.id == 11)
     {
         this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
     }

     if (button.id == 12)
     {
         ISaveFormat isaveformat = this.mc.getSaveLoader();
         WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");
         if (worldinfo != null)
         {
             this.mc.displayGuiScreen(new GuiYesNo(this, I18n.format("selectWorld.deleteQuestion", new Object[0]), "\'" + worldinfo.getWorldName() + "\' " + I18n.format("selectWorld.deleteWarning", new Object[0]), I18n.format("selectWorld.deleteButton", new Object[0]), I18n.format("gui.cancel", new Object[0]), 12));
         }
     }

     if (button.id == 21)
     {
        this.mc.displayGuiScreen(new CheataGui(this));
     }

     if (button.id == 24)
     {
try {
            final URL url = new URL("https://github.com/CheataClient/CheataClient");
    URI uri = url.toURI();                                                                                                                                              
             Desktop.getDesktop().browse(uri);
} catch (URISyntaxException e) {
    e.printStackTrace();
}
     }
 }
项目:PopularMMOS-EpicProportions-Mod    文件:GuiMainMenu.java   
protected void actionPerformed(GuiButton p_146284_1_)
{
    if (p_146284_1_.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (p_146284_1_.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (p_146284_1_.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (p_146284_1_.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (p_146284_1_.id == 14)
    {
        this.func_140005_i();
    }

    if (p_146284_1_.id == 4)
    {
        this.mc.shutdown();
    }

    if (p_146284_1_.id == 6)
    {
        this.mc.displayGuiScreen(new GuiModList(this));
    }

    if (p_146284_1_.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (p_146284_1_.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:ARKCraft-Code    文件:GuiMainMenuOverride.java   
protected void actionPerformed(GuiButton button) throws IOException
{
    if (button.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc
                .getLanguageManager()));
    }

    if (button.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (button.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible)
    {
        this.switchToRealms();
    }

    if (button.id == 4)
    {
        this.mc.shutdown();
    }

    if (button.id == 6)
    {
        this.mc.displayGuiScreen(new net.minecraftforge.fml.client.GuiModList(this));
    }

    if (button.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World",
                DemoWorldServer.demoWorldSettings);
    }

    if (button.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld
                    .func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:Resilience-Client-Source    文件:GuiMainMenu.java   
protected void actionPerformed(GuiButton p_146284_1_)
{
    if (p_146284_1_.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (p_146284_1_.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (p_146284_1_.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (p_146284_1_.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (p_146284_1_.id == 14)
    {
        this.func_140005_i();
    }

    if (p_146284_1_.id == 4)
    {
        this.mc.shutdown();
    }

    if (p_146284_1_.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (p_146284_1_.id == 12)
    {
        ISaveFormat var2 = this.mc.getSaveLoader();
        WorldInfo var3 = var2.getWorldInfo("Demo_World");

        if (var3 != null)
        {
            GuiYesNo var4 = GuiSelectWorld.func_146623_a(this, var3.getWorldName(), 12);
            this.mc.displayGuiScreen(var4);
        }
    }
}
项目:Resilience-Client-Source    文件:IntegratedServer.java   
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType, String par6Str)
{
    this.convertMapIfNeeded(par1Str);
    ISaveHandler var7 = this.getActiveAnvilConverter().getSaveLoader(par1Str, true);

    if (Reflector.DimensionManager.exists())
    {
        Object var8 = this.isDemo() ? new DemoWorldServer(this, var7, par2Str, 0, this.theProfiler) : new WorldServerOF(this, var7, par2Str, 0, this.theWorldSettings, this.theProfiler);
        Integer[] var9 = (Integer[])((Integer[])Reflector.call(Reflector.DimensionManager_getStaticDimensionIDs, new Object[0]));
        Integer[] arr$ = var9;
        int len$ = var9.length;

        for (int i$ = 0; i$ < len$; ++i$)
        {
            int dim = arr$[i$].intValue();
            Object world = dim == 0 ? var8 : new WorldServerMultiOF(this, var7, par2Str, dim, this.theWorldSettings, (WorldServer)var8, this.theProfiler);
            ((WorldServer)world).addWorldAccess(new WorldManager(this, (WorldServer)world));

            if (!this.isSinglePlayer())
            {
                ((WorldServer)world).getWorldInfo().setGameType(this.getGameType());
            }

            if (Reflector.EventBus.exists())
            {
                Reflector.postForgeBusEvent(Reflector.WorldEvent_Load_Constructor, new Object[] {world});
            }
        }

        this.getConfigurationManager().setPlayerManager(new WorldServer[] {(WorldServer)var8});
    }
    else
    {
        this.worldServers = new WorldServer[3];
        this.timeOfLastDimensionTick = new long[this.worldServers.length][100];

        for (int var15 = 0; var15 < this.worldServers.length; ++var15)
        {
            byte var16 = 0;

            if (var15 == 1)
            {
                var16 = -1;
            }

            if (var15 == 2)
            {
                var16 = 1;
            }

            if (var15 == 0)
            {
                if (this.isDemo())
                {
                    this.worldServers[var15] = new DemoWorldServer(this, var7, par2Str, var16, this.theProfiler);
                }
                else
                {
                    this.worldServers[var15] = new WorldServerOF(this, var7, par2Str, var16, this.theWorldSettings, this.theProfiler);
                }
            }
            else
            {
                this.worldServers[var15] = new WorldServerMultiOF(this, var7, par2Str, var16, this.theWorldSettings, this.worldServers[0], this.theProfiler);
            }

            this.worldServers[var15].addWorldAccess(new WorldManager(this, this.worldServers[var15]));
            this.getConfigurationManager().setPlayerManager(this.worldServers);
        }
    }

    this.func_147139_a(this.func_147135_j());
    this.initialWorldChunkLoad();
}
项目:Resilience-Client-Source    文件:MinecraftServer.java   
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType, String par6Str)
{
    this.convertMapIfNeeded(par1Str);
    this.setUserMessage("menu.loadingLevel");
    this.worldServers = new WorldServer[3];
    this.timeOfLastDimensionTick = new long[this.worldServers.length][100];
    ISaveHandler var7 = this.anvilConverterForAnvilFile.getSaveLoader(par1Str, true);
    WorldInfo var9 = var7.loadWorldInfo();
    WorldSettings var8;

    if (var9 == null)
    {
        var8 = new WorldSettings(par3, this.getGameType(), this.canStructuresSpawn(), this.isHardcore(), par5WorldType);
        var8.func_82750_a(par6Str);
    }
    else
    {
        var8 = new WorldSettings(var9);
    }

    if (this.enableBonusChest)
    {
        var8.enableBonusChest();
    }

    for (int var10 = 0; var10 < this.worldServers.length; ++var10)
    {
        byte var11 = 0;

        if (var10 == 1)
        {
            var11 = -1;
        }

        if (var10 == 2)
        {
            var11 = 1;
        }

        if (var10 == 0)
        {
            if (this.isDemo())
            {
                this.worldServers[var10] = new DemoWorldServer(this, var7, par2Str, var11, this.theProfiler);
            }
            else
            {
                this.worldServers[var10] = new WorldServer(this, var7, par2Str, var11, var8, this.theProfiler);
            }
        }
        else
        {
            this.worldServers[var10] = new WorldServerMulti(this, var7, par2Str, var11, var8, this.worldServers[0], this.theProfiler);
        }

        this.worldServers[var10].addWorldAccess(new WorldManager(this, this.worldServers[var10]));

        if (!this.isSinglePlayer())
        {
            this.worldServers[var10].getWorldInfo().setGameType(this.getGameType());
        }

        this.serverConfigManager.setPlayerManager(this.worldServers);
    }

    this.func_147139_a(this.func_147135_j());
    this.initialWorldChunkLoad();
}
项目:ExpandedRailsMod    文件:GuiMainMenu.java   
/**
 * Called by the controls from the buttonList when activated. (Mouse pressed for buttons)
 */
protected void actionPerformed(GuiButton button) throws IOException
{
    if (button.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (button.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (button.id == 1)
    {
        this.mc.displayGuiScreen(new GuiWorldSelection(this));
    }

    if (button.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (button.id == 14 && this.realmsButton.visible)
    {
        this.switchToRealms();
    }

    if (button.id == 4)
    {
        this.mc.shutdown();
    }

    if (button.id == 6)
    {
        this.mc.displayGuiScreen(new net.minecraftforge.fml.client.GuiModList(this));
    }

    if (button.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.DEMO_WORLD_SETTINGS);
    }

    if (button.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            this.mc.displayGuiScreen(new GuiYesNo(this, I18n.format("selectWorld.deleteQuestion", new Object[0]), "\'" + worldinfo.getWorldName() + "\' " + I18n.format("selectWorld.deleteWarning", new Object[0]), I18n.format("selectWorld.deleteButton", new Object[0]), I18n.format("gui.cancel", new Object[0]), 12));
        }
    }
}
项目:Cauldron    文件:GuiMainMenu.java   
protected void actionPerformed(GuiButton p_146284_1_)
{
    if (p_146284_1_.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (p_146284_1_.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (p_146284_1_.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (p_146284_1_.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (p_146284_1_.id == 14)
    {
        this.func_140005_i();
    }

    if (p_146284_1_.id == 4)
    {
        this.mc.shutdown();
    }

    if (p_146284_1_.id == 6)
    {
        this.mc.displayGuiScreen(new GuiModList(this));
    }

    if (p_146284_1_.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (p_146284_1_.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:Cauldron    文件:GuiMainMenu.java   
protected void actionPerformed(GuiButton p_146284_1_)
{
    if (p_146284_1_.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (p_146284_1_.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (p_146284_1_.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (p_146284_1_.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (p_146284_1_.id == 14)
    {
        this.func_140005_i();
    }

    if (p_146284_1_.id == 4)
    {
        this.mc.shutdown();
    }

    if (p_146284_1_.id == 6)
    {
        this.mc.displayGuiScreen(new GuiModList(this));
    }

    if (p_146284_1_.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (p_146284_1_.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:Cauldron    文件:MinecraftServer.java   
protected void loadAllWorlds(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_)
{
    this.convertMapIfNeeded(p_71247_1_);
    this.setUserMessage("menu.loadingLevel");
    ISaveHandler isavehandler = this.anvilConverterForAnvilFile.getSaveLoader(p_71247_1_, true);
    WorldInfo worldinfo = isavehandler.loadWorldInfo();
    WorldSettings worldsettings;

    if (worldinfo == null)
    {
        worldsettings = new WorldSettings(p_71247_3_, this.getGameType(), this.canStructuresSpawn(), this.isHardcore(), p_71247_5_);
        worldsettings.func_82750_a(p_71247_6_);
    }
    else
    {
        worldsettings = new WorldSettings(worldinfo);
    }

    if (this.enableBonusChest)
    {
        worldsettings.enableBonusChest();
    }

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, p_71247_2_, 0, theProfiler) : new WorldServer(this, isavehandler, p_71247_2_, 0, worldsettings, theProfiler));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, p_71247_2_, dim, worldsettings, overWorld, theProfiler));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(this.getGameType());
        }

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.serverConfigManager.setPlayerManager(new WorldServer[]{ overWorld });
    this.func_147139_a(this.func_147135_j());
    this.initialWorldChunkLoad();
}
项目:RuneCraftery    文件:MinecraftServer.java   
protected void func_71247_a(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_) {
   this.func_71237_c(p_71247_1_);
   this.func_71192_d("menu.loadingLevel");
   this.field_71305_c = new WorldServer[3];
   this.field_71312_k = new long[this.field_71305_c.length][100];
   ISaveHandler var7 = this.field_71310_m.func_75804_a(p_71247_1_, true);
   WorldInfo var9 = var7.func_75757_d();
   WorldSettings var8;
   if(var9 == null) {
      var8 = new WorldSettings(p_71247_3_, this.func_71265_f(), this.func_71225_e(), this.func_71199_h(), p_71247_5_);
      var8.func_82750_a(p_71247_6_);
   } else {
      var8 = new WorldSettings(var9);
   }

   if(this.field_71289_N) {
      var8.func_77159_a();
   }

   for(int var10 = 0; var10 < this.field_71305_c.length; ++var10) {
      byte var11 = 0;
      if(var10 == 1) {
         var11 = -1;
      }

      if(var10 == 2) {
         var11 = 1;
      }

      if(var10 == 0) {
         if(this.func_71242_L()) {
            this.field_71305_c[var10] = new DemoWorldServer(this, var7, p_71247_2_, var11, this.field_71304_b, this.func_98033_al());
         } else {
            this.field_71305_c[var10] = new WorldServer(this, var7, p_71247_2_, var11, var8, this.field_71304_b, this.func_98033_al());
         }
      } else {
         this.field_71305_c[var10] = new WorldServerMulti(this, var7, p_71247_2_, var11, var8, this.field_71305_c[0], this.field_71304_b, this.func_98033_al());
      }

      this.field_71305_c[var10].func_72954_a(new WorldManager(this, this.field_71305_c[var10]));
      if(!this.func_71264_H()) {
         this.field_71305_c[var10].func_72912_H().func_76060_a(this.func_71265_f());
      }

      this.field_71318_t.func_72364_a(this.field_71305_c);
   }

   this.func_71226_c(this.func_71232_g());
   this.func_71222_d();
}
项目:RuneCraftery    文件:GuiMainMenu.java   
/**
 * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
 */
protected void actionPerformed(GuiButton par1GuiButton)
{
    if (par1GuiButton.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (par1GuiButton.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (par1GuiButton.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (par1GuiButton.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (par1GuiButton.id == 14 && this.minecraftRealmsButton.drawButton)
    {
        this.func_140005_i();
    }

    if (par1GuiButton.id == 4)
    {
        this.mc.shutdown();
    }

    if (par1GuiButton.id == 6)
    {
        this.mc.displayGuiScreen(new GuiModList(this));
    }

    if (par1GuiButton.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (par1GuiButton.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:RuneCraftery    文件:MinecraftServer.java   
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType, String par6Str)
{
    this.convertMapIfNeeded(par1Str);
    this.setUserMessage("menu.loadingLevel");
    ISaveHandler isavehandler = this.anvilConverterForAnvilFile.getSaveLoader(par1Str, true);
    WorldInfo worldinfo = isavehandler.loadWorldInfo();
    WorldSettings worldsettings;

    if (worldinfo == null)
    {
        worldsettings = new WorldSettings(par3, this.getGameType(), this.canStructuresSpawn(), this.isHardcore(), par5WorldType);
        worldsettings.func_82750_a(par6Str);
    }
    else
    {
        worldsettings = new WorldSettings(worldinfo);
    }

    if (this.enableBonusChest)
    {
        worldsettings.enableBonusChest();
    }

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, worldsettings, theProfiler, getLogAgent()));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, worldsettings, overWorld, theProfiler, getLogAgent()));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(this.getGameType());
        }

        this.serverConfigManager.setPlayerManager(this.worldServers);

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.serverConfigManager.setPlayerManager(new WorldServer[]{ overWorld });
    this.setDifficultyForAllWorlds(this.getDifficulty());
    this.initialWorldChunkLoad();
}
项目:BetterNutritionMod    文件:GuiMainMenu.java   
/**
 * Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
 */
protected void actionPerformed(GuiButton par1GuiButton)
{
    if (par1GuiButton.id == 0)
    {
        this.mc.displayGuiScreen(new GuiOptions(this, this.mc.gameSettings));
    }

    if (par1GuiButton.id == 5)
    {
        this.mc.displayGuiScreen(new GuiLanguage(this, this.mc.gameSettings, this.mc.getLanguageManager()));
    }

    if (par1GuiButton.id == 1)
    {
        this.mc.displayGuiScreen(new GuiSelectWorld(this));
    }

    if (par1GuiButton.id == 2)
    {
        this.mc.displayGuiScreen(new GuiMultiplayer(this));
    }

    if (par1GuiButton.id == 14 && this.minecraftRealmsButton.drawButton)
    {
        this.func_140005_i();
    }

    if (par1GuiButton.id == 4)
    {
        this.mc.shutdown();
    }

    if (par1GuiButton.id == 6)
    {
        this.mc.displayGuiScreen(new GuiModList(this));
    }

    if (par1GuiButton.id == 11)
    {
        this.mc.launchIntegratedServer("Demo_World", "Demo_World", DemoWorldServer.demoWorldSettings);
    }

    if (par1GuiButton.id == 12)
    {
        ISaveFormat isaveformat = this.mc.getSaveLoader();
        WorldInfo worldinfo = isaveformat.getWorldInfo("Demo_World");

        if (worldinfo != null)
        {
            GuiYesNo guiyesno = GuiSelectWorld.getDeleteWorldScreen(this, worldinfo.getWorldName(), 12);
            this.mc.displayGuiScreen(guiyesno);
        }
    }
}
项目:BetterNutritionMod    文件:MinecraftServer.java   
protected void loadAllWorlds(String par1Str, String par2Str, long par3, WorldType par5WorldType, String par6Str)
{
    this.convertMapIfNeeded(par1Str);
    this.setUserMessage("menu.loadingLevel");
    ISaveHandler isavehandler = this.anvilConverterForAnvilFile.getSaveLoader(par1Str, true);
    WorldInfo worldinfo = isavehandler.loadWorldInfo();
    WorldSettings worldsettings;

    if (worldinfo == null)
    {
        worldsettings = new WorldSettings(par3, this.getGameType(), this.canStructuresSpawn(), this.isHardcore(), par5WorldType);
        worldsettings.func_82750_a(par6Str);
    }
    else
    {
        worldsettings = new WorldSettings(worldinfo);
    }

    if (this.enableBonusChest)
    {
        worldsettings.enableBonusChest();
    }

    WorldServer overWorld = (isDemo() ? new DemoWorldServer(this, isavehandler, par2Str, 0, theProfiler, getLogAgent()) : new WorldServer(this, isavehandler, par2Str, 0, worldsettings, theProfiler, getLogAgent()));
    for (int dim : DimensionManager.getStaticDimensionIDs())
    {
        WorldServer world = (dim == 0 ? overWorld : new WorldServerMulti(this, isavehandler, par2Str, dim, worldsettings, overWorld, theProfiler, getLogAgent()));
        world.addWorldAccess(new WorldManager(this, world));

        if (!this.isSinglePlayer())
        {
            world.getWorldInfo().setGameType(this.getGameType());
        }

        this.serverConfigManager.setPlayerManager(this.worldServers);

        MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
    }

    this.serverConfigManager.setPlayerManager(new WorldServer[]{ overWorld });
    this.setDifficultyForAllWorlds(this.getDifficulty());
    this.initialWorldChunkLoad();
}