You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in the serverbound>play>__init__ file, & tried using it in my bot, just as a test.
if text == "/gui":
print("Trying to click on slot 10")
packet2 = serverbound.play.ClickWindowPacket()
packet2.slot = 10
packet2.button = 0
packet2.windowID = 0
connection.write_packet(packet2)
Absolutely no help. The server kicks the bot for io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(5) + length(2) exceeds writerIndex(5): PooledUnsafeDirectByteBuf(ridx: 5, widx: 5, cap: 5) & I couldn't figure out why.
I've already tried changing slot numbers, window ID, button...
I didn't define mode, action number nor clicked item (even though the latter would be extremely helpful) because there was no "Slot" type, & I didn't know how to define that.
The GUI open is a large chest container, also tried getting the unique windowID when a GUI opens but I couldn't get the OpenWindowPacket to properly work.
Spent a very long time on this & hoping someone could possibly help, would be greatly appreciated; thanks.
The text was updated successfully, but these errors were encountered:
It might be helpful to include a fork of the repository that you working with for people help better debug your issue. Otherwise, it would be ignored till a later date.
@bluehahaa Since you're giving the packet ID of Click Window as 0x09, I assume you're trying to implement the 1.14-1.16 version of this packet. In that case, you're missing some fields from the packet definition, and the fields you have included are in the wrong order, and some have the wrong types: https://wiki.vg/index.php?title=Protocol&oldid=14643#Click_Window.
Heya there, I've been trying for some time now to try to get the bot to click on a specific slot when a GUI pops up for it.
For that, I defined
Absolutely no help. The server kicks the bot for
io.netty.handler.codec.DecoderException: java.lang.IndexOutOfBoundsException: readerIndex(5) + length(2) exceeds writerIndex(5): PooledUnsafeDirectByteBuf(ridx: 5, widx: 5, cap: 5)
& I couldn't figure out why.I've already tried changing slot numbers, window ID, button...
I didn't define mode, action number nor clicked item (even though the latter would be extremely helpful) because there was no "Slot" type, & I didn't know how to define that.
The GUI open is a large chest container, also tried getting the unique
windowID
when a GUI opens but I couldn't get theOpenWindowPacket
to properly work.Spent a very long time on this & hoping someone could possibly help, would be greatly appreciated; thanks.
The text was updated successfully, but these errors were encountered: