CCBlueX Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    ThreadQuickExitException

    Kotlin/Java
    3
    4
    156
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DreamWasFucked
      DreamWasFucked Banned last edited by

      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 Reply Quote 0
      • ?
        A Former User @DreamWasFucked last edited by

        @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();
           		}
            }
        }
        
        dntdbt 1 Reply Last reply Reply Quote 0
        • dntdbt
          dntdbt @Guest last edited by dntdbt

          that's on kotlin

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

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

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            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