PorkStudios / Pork2b2tBot

A minecraft bot thing, also works as a proxy!
https://www.daporkchop.net/pork2b2tbot
Other
46 stars 16 forks source link

Classloading issues due to (JAR corruption?) #23

Closed ghost closed 5 years ago

ghost commented 5 years ago

How do I use this bot? I have downloaded and installed it, have installed gradlew, and have run gradlew build through cmd. I am still unsure how to use this.

ghost commented 5 years ago

After executing the jar file from cmd, I have come up with this debug log. 2019.07.15 14.47.05-debug.log Edit: It seems I need to login with my MC account but am unsure where. Any help? Edit2: After researching some other issues on this GitHub page, it seems that I need to input a Player UUID and a bot UUID. Where would I do this? Edit3: After comparing my debug log with that of icreatedanaccountjustforthis's, I noticed that I am also missing an entry where the bot starts a server at 0.0.0.0:25565. What does this mean? 26.05.2019.20.14.02-debug (2).log Edit4: Updated some info in the config file located in the /libs directory. New config file below. Going to stop working on this for now, hope I get a reply soon. 2019.07.15 15.12.25-debug.log

DaMatrix commented 5 years ago

you can edit all the settings in the config.json. not sure what you mean by bot UUID and player UUID, you put the login credentials for the bot into the config and connect to it using your minecraft client.

ghost commented 5 years ago

Thank you for the quick reply! However, where would I obtain said login credentials and connect the bot to the client?

VADemon commented 5 years ago

Ask Mojang Support, you only need to remember and provide the original Transaction ID forgotten and buried in the sands of time.

ghost commented 5 years ago

I'm sorry, I don't really understand. What is said "Original Transaction ID"? Thanks for the reply EDIT: It is the proof of ownership for Minecraft. However, what is it used for?

VADemon commented 5 years ago

GammaRay, you only need to put your account login credentials so the bot can authenticate under your player account...

ghost commented 5 years ago

VADemon, if you are referring to the authentication under the config file in /libs, I have already included my Minecraft information in the Username, Email, and Password entries.

Edit: This is what I mean "authentication": { "doAuthentication": true, "username": "myminecraftign", "email": "myemailformyminecraft@lol.com", "password": "mypasswordformyminecraft" }

ghost commented 5 years ago

What I am unsure of is how to link the bot to the Minecraft client. Edit:word

DaMatrix commented 5 years ago

why is it in /libs? what even is /libs? there shouldn't be any directory called libs.

anyway, assuming the config file is in the correct location, that configuration that you just sent would be correct

ghost commented 5 years ago

Sorry for the miscommunication. I mean the libs folder inside the builds folder which contains my log folder and two executable jar files.

Here is my config file { "debug": { "printDataFields": false, "packet": { "received": false, "preSent": false, "postSent": false }, "loglevel": "SIMPLE" }, "websocket": { "enable": false, "client": { "maxChatCount": 512 }, "bind": { "host": "0.0.0.0", "port": 25565 } }, "client": { "extra": { "autoreconnect": { "enabled": true, "delay": 10 }, "antiafk": { "enabled": true, "runEvenIfClientsConnected": false, "actions": { "swingHand": true, "rotate": true } }, "spammer": { "messages": [ "#TeamPepsi", "https://pepsi.team", "https://daporkchop.net" ], "delaySeconds": 30, "enabled": false } }, "server": { "address": "2b2t.org", "port": 25565 } }, "server": { "extra": { "whitelist": { "enable": true, "allowedusers": [ "Chemic_" ], "kickmsg": "get out of here you HECKING scrub" } }, "enabled": true, "ping": { "favicon": true }, "bind": { "address": "0.0.0.0", "port": 25565 }, "verifyusers": true, "compressionThreshold": 256 }, "log": { "ansi": true, "storeDebug": true }, "gui": { "enabled": false, "messageCount": 512 }, "authentication": { "doAuthentication": true, "username": "mymcusername, "email": "myemail@lol.com", "password": "mypassword" } } However, when I run java -jar toobeetooteebot-0.2.0-1.12.2.jar in cmd, I get this debug log. 2019.07.15 16.10.49-debug.log

DaMatrix commented 5 years ago

it seems like your jar has the MCProtocolLib dependencies shaded incorrectly. while i'm not sure how that would have happened, i'd advise you to save yourself some time and simply download the compiled jar from my Jenkins server.

ghost commented 5 years ago

Downloaded and replaced both .jar files in the folder. Ran the same command and got this is cmd. image

DaMatrix commented 5 years ago

ok this is extremely strange, i don't know what's happening here but it looks like a different case of jar corruption. i'll investigate this a bit and get back to you.

ghost commented 5 years ago

ok this is extremely strange, i don't know what's happening here but it looks like a different case of jar corruption. i'll investigate this a bit and get back to you.

Take your time, I'm extremely grateful for everything you've done thus far.

Edit: I have just downloaded the entire workspace from the Jenkins server and tried executing the jar after changing the directory. Seems to be the same error. image

DaMatrix commented 5 years ago

ok i've made a commit that fixed it, you can git pull and then ./gradlew clean build to make a fresh build on the new commit, or wait for me to do a bit of fixing up with my jenkins.

DaMatrix commented 5 years ago

ok, my jenkins is also fixed up, you can download a compiled jar from the latest Jenkins build.

thanks for reporting this!

ghost commented 5 years ago

Sorry for reopening, but after making a fresh build on the new commit, I get this error message again. 2019.07.15 17.18.35-debug.log

DaMatrix commented 5 years ago

unable to reproduce that on the latest jar from my jenkins. if you insist on building it yourself, try nuking your user's gradle cache and running a clean build, otherwise just use the jenkins output. i know what's causing that, and it shouldn't be happening unless something is set up wrong on your end while compiling.

ghost commented 5 years ago

Success! Thanks for everything!

Edit: Quick question, Do I need a second MC account now to connect to the localhost server?

ghost commented 5 years ago

Sorry for another question but I am unsure where to put this. How do I start the proxy server in order to connect to it?

Edit: got it

DaMatrix commented 5 years ago

set enabled to true in the server category.