Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. Kotlin/Java
  3. ThreadQuickExitException

ThreadQuickExitException

Scheduled Pinned Locked Moved Kotlin/Java
4 Posts 3 Posters 338 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • DreamWasFuckedD Offline
    DreamWasFuckedD Offline
    DreamWasFucked
    wrote on last edited by
    #1

    im trying to delay velocity packet

    code:

                    "Delay" -> {
                        event.cancelEvent()
    
                        Timer("Delay", true).schedule(delayValue.get().toLong()) {
                            packet.processPacket(mc.netHandler)
                        }
                    }
    

    error:

    Exception in thread "Delay" [23:45:26] [Delay/INFO]: [java.lang.ThreadGroup:uncaughtException:1052]: net.minecraft.network.ThreadQuickExitException
    
    ? 1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      replied to DreamWasFucked on last edited by
      #2

      @here you need to re-send a packet, but if you send a packet it will loop. so copy the method "Send Packet" in net.minecraft.network.NetworkManager, rename it to sendPacketNoEvent and remove all of the event related stuff, now you can go to your disgusting kotlin code and have a variable with a timer in it. so it will be something like:

      Timer download = new Timer("Velocity Delay"); // not sure what "true" means
      ...
      case "Delay":
      	e.cancelEvent();
      	download.schedule(new TimerTask() {
      		@Override
      		public void run(){
      			if(mc.thePlayer != null && mc.thePlayer.ticksExisted != 0){
      				mc.getNetHandler().getNetworkManager().sendPacketNoEvent(e.getPacket());
      				mc.shutdown();
      			}
      		}
      	}, delayValue.get());
      break;
      

      (btw this is in java if you didn't know lmao)
      and sendPacketNoEvent should be like this:

      public void sendPacketNoEvent(Packet packetIn) {
          if (this.isChannelOpen()) {
              this.flushOutboundQueue();
              this.dispatchPacket(packetIn, null);
          } else {
              this.field_181680_j.writeLock().lock();
              try {
              	this.outboundPacketsQueue.add(new NetworkManager.InboundHandlerTuplePacketListener(packetIn, (GenericFutureListener[]) null));
              } finally {
              	this.field_181680_j.writeLock().unlock();
         		}
          }
      }
      
      dntdbtD 1 Reply Last reply
      0
      • dntdbtD Offline
        dntdbtD Offline
        dntdbt
        replied to A Former User on last edited by dntdbt
        #3

        that's on kotlin

        "Delay" -> {
        	e.cancelEvent();
        	Timer().schedule(TimerTask() {
        		override fun run() {
                             packet.processPacket(mc.netHandler)
        		}
        	}, delayValue.get());
        }
        
        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          ik and i forgot that this is client side, instead of sendPacket try channelread0

          1 Reply Last reply
          0

          About
          • Terms of Service
          • Privacy Policy
          • Status
          • Contact Us
          Downloads
          • Releases
          • Source code
          • License
          Docs
          • Tutorials
          • CustomHUD
          • AutoSettings
          • ScriptAPI
          Community
          • Forum
          • Guilded
          • YouTube
          • Twitter
          • D.Tube
          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups