Package com.mojang.minecraft.net

Examples of com.mojang.minecraft.net.NetworkManager


         checkGLError("Post startup");
         this.hud = new HUDScreen(this, this.width, this.height);
         (new SkinDownloadThread(this)).start();
         if(this.server != null && this.session != null) {
            this.networkManager = new NetworkManager(this, this.server, this.port, this.session.username, this.session.mppass);
         }
      } catch (Exception var62) {
         var62.printStackTrace();
         JOptionPane.showMessageDialog((Component)null, var62.toString(), "Failed to start Minecraft", 0);
         return;
View Full Code Here


      if(this.networkManager != null && !(this.currentScreen instanceof ErrorScreen)) {
         if(!this.networkManager.isConnected()) {
            this.progressBar.setTitle("Connecting..");
            this.progressBar.setProgress(0);
         } else {
            NetworkManager var20 = this.networkManager;
            if(this.networkManager.successful) {
               NetworkHandler var18 = var20.netHandler;
               if(var20.netHandler.connected) {
                  try {
                     NetworkHandler var22 = var20.netHandler;
                     var20.netHandler.channel.read(var22.in);
                     var4 = 0;

                     while(var22.in.position() > 0 && var4++ != 100) {
                        var22.in.flip();
                        byte var5 = var22.in.get(0);
                        PacketType var6;
                        if((var6 = PacketType.packets[var5]) == null) {
                           throw new IOException("Bad command: " + var5);
                        }

                        if(var22.in.remaining() < var6.length + 1) {
                           var22.in.compact();
                           break;
                        }

                        var22.in.get();
                        Object[] var7 = new Object[var6.params.length];

                        for(var8 = 0; var8 < var7.length; ++var8) {
                           var7[var8] = var22.readObject(var6.params[var8]);
                        }

                        NetworkManager var42 = var22.netManager;
                        if(var22.netManager.successful) {
                           if(var6 == PacketType.IDENTIFICATION) {
                              var42.minecraft.progressBar.setTitle(var7[1].toString());
                              var42.minecraft.progressBar.setText(var7[2].toString());
                              var42.minecraft.player.userType = ((Byte)var7[3]).byteValue();
View Full Code Here

   protected final void onKeyPress(char var1, int var2) {
      if(var2 == 1) {
         this.minecraft.setCurrentScreen((GuiScreen)null);
      } else if(var2 == 28) {
         NetworkManager var10000 = this.minecraft.networkManager;
         String var4 = this.message.trim();
         NetworkManager var3 = var10000;
         if((var4 = var4.trim()).length() > 0) {
            var3.netHandler.send(PacketType.CHAT_MESSAGE, new Object[]{Integer.valueOf(-1), var4});
         }

         this.minecraft.setCurrentScreen((GuiScreen)null);
View Full Code Here

TOP

Related Classes of com.mojang.minecraft.net.NetworkManager

Copyright © 2018 www.massapicom. 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.