-
C0FPacketConfirmTransaction packetConfirmTransaction = (C0FPacketConfirmTransaction)event.getPacket();From the above code, how to modify it into javascript code?
-
var C0FPacketConfirmTransaction = Java.type("net.minecraft.network.play.client.C0FPacketConfirmTransaction") module.on("packet",function(event){ if(event.getPacket() instanceof C0FPacketConfirmTransaction){ var packetConfirmTransaction = event.getPacket() //your codes } }) -
just remove the type C0FPacketConfirmTransaction then. Since JavaScript is a dynamically typed language, the type is determined at runtime. If the packet is a instance of a C0FPacketConfirmTransaction you can call getWindowId() and getUid() then if it is not, exceptions should be thrown.
//if (event.getPacket() instanceof C0FPacketConfirmTransaction) packetConfirmTransaction = event.getPacket(); -
C0FPacketConfirmTransaction packetConfirmTransaction = (C0FPacketConfirmTransaction)event.getPacket();From the above code, how to modify it into javascript code?
This post is deleted! -
This post is deleted!
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