BlocksMc Disabler
-
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]); }
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