Package amidst.gui.version

Source Code of amidst.gui.version.RemoteVersionComponent

package amidst.gui.version;

import MoF.FinderWindow;
import amidst.Options;
import amidst.minecraft.MinecraftUtil;
import amidst.minecraft.remote.RemoteMinecraft;

public class RemoteVersionComponent extends VersionComponent {
  private String remoteAddress;
  private String name;
 
  public RemoteVersionComponent(String address) {
    remoteAddress = address;
    name = "remote:" + address;
  }
  public RemoteVersionComponent() {
    this("127.0.0.1");
  }
 
  @Override
  public void load() {
    isLoading = true;
    repaint();
    Options.instance.lastProfile.set(name);
    (new Thread(new Runnable() {
      @Override
      public void run() {
        MinecraftUtil.setBiomeInterface(new RemoteMinecraft(remoteAddress));
        new FinderWindow();
        VersionSelectWindow.get().dispose();
      }
    })).start();
  }

  @Override
  public boolean isReadyToLoad() {
    return true;
  }
  @Override
  public String getVersionName() {
    return name;
  }
}
TOP

Related Classes of amidst.gui.version.RemoteVersionComponent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.