facebookresearch / craftassist

A virtual assistant bot in Minecraft
MIT License
612 stars 76 forks source link

global pallet #21

Closed scatterp3 closed 4 years ago

scatterp3 commented 4 years ago

is it possible to change the bits sent and received to respect the standard Minecraft protocol as the bot can't connect with regular servers?

scatterp3 commented 4 years ago

ping

kavyasrinet commented 4 years ago

Thanks for creating the issue @scatterp3 !

In the past, the bot was able to connect to Minecraft servers (although that was a really old version). This is the version of the protocol we used: https://wiki.vg/index.php?title=Protocol&oldid=14204

Some features of the current bot are cuberite-specific and we haven't tried connecting it to the regular servers recently.

We are more than happy to accept / review a Pull Request if you want to contribute though.

scatterp commented 4 years ago

thanks for the response yes I may do a pull request i want to understand the issue first fully can you tell me the old server version (vanilla) or a range and I will update ticket here with solution if possible or code

scatterp3 commented 4 years ago

so i checked the protocol you linked to (1.12.2, protocol 340) downloaded a vanilla server 1.12.2 and run a test the output was (minecraft_env) scatterp@mihaela-ThinkPad-T430s:~/mcb/craftassist$ python ./python/craftassist/craftassist_agent.py --name scatter 2020-02-22 22:41:19,719 [craftassist_agent.py:381 - () INFO]: Info logging 2020-02-22 22:41:19,719 [craftassist_agent.py:66 - init() INFO]: CraftAssistAgent.init started 2020-02-22 22:41:29,864 [craftassist_agent.py:100 - init() INFO]: Initialized AgentMemory 2020-02-22 22:41:29,865 [ttad_model_dialogue_manager.py:59 - init() INFO]: using ttad_model_path=./python/craftassist/models/ttad/ttad.pth loaded ./python/craftassist/models/ttad/ttad.pth 2020-02-22 22:41:39,918 [craftassist_agent.py:105 - init() INFO]: Initialized DialogueManager F0222 22:41:40.139907 13218 packet_reader.cpp:653] Check failed: bitsPerBlock == 13 (unsigned char value 4 vs. 13) Check failure stack trace: @ 0x7f0aac7ed5cd google::LogMessage::Fail() @ 0x7f0aac7ef433 google::LogMessage::SendToLog() @ 0x7f0aac7ed15b google::LogMessage::Flush() @ 0x7f0aac7efe1e google::LogMessageFatal::~LogMessageFatal() @ 0x7f0aaca731f9 PacketReader::chunkData() @ 0x7f0aaca6aa58 _ZZN12PacketReader11startThreadEvENKUlvE_clEv.lto_priv.352 @ 0x7f0aac736163 (unknown) @ 0x7f0ab037a6ba start_thread @ 0x7f0ab00b041d clone @ (nil) (unknown) Aborted (core dumped)

since bits per block 13 is mentioned in the document you linked if you go to the history of the document it suggests that version 1.9 is the last version to use that scheme so i tried also with 1.9 how ever it was not able to login you mention previously it worked on vanilla minecraft from the commit history packet_reader.cpp has never changed since initial commit could you double check about the version because protocol 340 is for sure not the case here...

scatterp commented 4 years ago

@kavyasrinet ping

kavyasrinet commented 4 years ago

Hi @scatterp, We tried looking into this but we are very uncertain about the exact versions unfortunately, since this was very far back in the past. Interfacing with java minecraft was not a top priority for the project and it's very possible we broke compatibility somewhere along the way.

scatterp commented 4 years ago

ok thanks for the update will put together a patch

kavyasrinet commented 4 years ago

Thanks @scatterp ! I'll close this issue for now and we can create a new issue / PR when you get to the patch.