Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • 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. BlocksMc Disabler

BlocksMc Disabler

Scheduled Pinned Locked Moved Kotlin/Java
1 Posts 1 Posters 750 Views
  • 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.
  • YounKooY Offline
    YounKooY Offline
    YounKoo
    wrote on last edited by YounKoo
    #1

    Code

    EntityPlayerSP entityPlayerSP;
        private final Queue<Packet<?>> packet = new ConcurrentLinkedDeque();
        float voidTP;
    
        @Override
        public void onEnable() {
            if (mc.isSingleplayer()) {
                return;
            }
            if (mc.thePlayer != null) {
                mc.thePlayer.ticksExisted = 0;
            }
        }
        @EventTarget
        public void onPacket(PacketEvent event) {
            Packet p = event.getPacket();
            if (mc.thePlayer.ticksExisted < 250 && p instanceof S07PacketRespawn) {
                this.packet.clear();
                return;
            }
            
            if (p instanceof C0BPacketEntityAction) {
                C0BPacketEntityAction c0B = (C0BPacketEntityAction)p;
                if (c0B.getAction().equals(C0BPacketEntityAction.Action.START_SPRINTING)) {
                    if (entityPlayerSP.serverSprintState) {
                        sendPacketSilent(new C0BPacketEntityAction(mc.thePlayer, C0BPacketEntityAction.Action.STOP_SPRINTING));
                        entityPlayerSP.serverSprintState = false;
                    }
                    event.cancelEvent();
                }
                if (c0B.getAction().equals(C0BPacketEntityAction.Action.STOP_SPRINTING)) {
                    event.cancelEvent();
                }
            }
            if (p instanceof C00PacketKeepAlive || p instanceof C0FPacketConfirmTransaction) {
                packet.add(p);
                event.cancelEvent();
                if (packet.size() > 500) {
                    sendPacketSilent(this.packet.poll());
                }
            }
            if (p instanceof C03PacketPlayer) {
                if (mc.thePlayer.ticksExisted % 50 == 0) {
                    sendPacketUnlogged(new C18PacketSpectate(UUID.randomUUID()));
                    voidTP = (float) MathHelper.getRandomDoubleInRange(new Random(), 0.78, 0.98);
                    sendPacketUnlogged(new C0CPacketInput(voidTP, voidTP, false, false));
                }
                if (mc.thePlayer.ticksExisted % 120 == 0) {
                    voidTP = (float)MathHelper.getRandomDoubleInRange(new Random(), 0.01, 20.0);
                }
            }
        }
    
        public static void sendPacketUnlogged(Packet<? extends INetHandler> packet) {
            mc.getNetHandler().getNetworkManager().sendPacket(packet);
        }
    
        public void sendPacketSilent(Packet packet) {
            mc.getNetHandler().getNetworkManager().sendPacket(packet, null, new GenericFutureListener[0]);
        }
    
    1 Reply Last reply
    0

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    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