Esempio n. 1
0
 private void setup() {
   clearEntities();
   delta = 0;
   ticks = 0;
   lastTicks = 0;
   player = null;
   lagging = false;
   globalScale = INITIAL_SCALE;
   lagMultiplier = 1.0F;
   zoomOffset = 0.0F;
   globalAlpha = 0.0F;
   ServerHandler.INSTANCE.pingServers();
 }
Esempio n. 2
0
 public void connect() {
   allowUserInput = true;
   new Thread(
           () -> {
             try {
               if (temporaryServerSelection == null) {
                 ServerHandler.Server server = ServerHandler.INSTANCE.getServerForPlay();
                 networkManager =
                     ClientNetworkManager.create(
                         SlytherClient.this, server, configuration.shouldRecord);
               } else {
                 networkManager =
                     ClientNetworkManager.create(
                         SlytherClient.this, temporaryServerSelection, configuration.shouldRecord);
               }
               server = networkManager.getIp();
             } catch (Exception e) {
               UIUtils.displayException("Connection failed", e);
             }
           })
       .start();
 }