Code Monkey home page Code Monkey logo

Comments (10)

zuazo avatar zuazo commented on July 17, 2024

Thanks for the report. Can you paste a example code or paste the full output with debug enabled?

NODE_DEBUG='minecraft-protocol' node minecraft-chat-client.js

I need to know which packets have been before that 0xd3 because that packet id does not exist.

from node-minecraft-protocol.

nsporillo avatar nsporillo commented on July 17, 2024

Running that now, it appears to be working fine but theres one issue that isn't with the crashing, the bot does not receive chat. The protocol changed from just plain text to a json object so that might be why, anyways heres the client code.
http://i.imgur.com/tXMlQEy.png

The debug program is still running without crashing, so it might be working finally, however still having trouble doing server -> client (might be my client code being bad).

from node-minecraft-protocol.

andrewrk avatar andrewrk commented on July 17, 2024

Hey @MilkyWayz that's a real pretty syntax highlighter you got there, but... it's much more convenient for us to help you if you provide text rather than images. For example try using http://gist.github.com.

from node-minecraft-protocol.

nsporillo avatar nsporillo commented on July 17, 2024

https://gist.github.com/milkywayz/2d869096f8e68f07f0c1

Not sure why the chat is failing to be received by the client :/

from node-minecraft-protocol.

mappum avatar mappum commented on July 17, 2024

The changes in the chat data are an easy fix. To get the behavior of pre-1.6, you just have to wrap your strings in a JSON object, with the format {"text": "YOUR MESSAGE"}.

This is a higher-level thing, so I believe this module won't be handling that. We should add warnings somewhere so people can update projects that depend on this.

from node-minecraft-protocol.

andrewrk avatar andrewrk commented on July 17, 2024

Yeah this looks like a mineflayer issue, not a minecraft-protocol issue. Mineflayer doesn't officially support 1.6 yet.

from node-minecraft-protocol.

zuazo avatar zuazo commented on July 17, 2024

OK. I think we can close this issue. I updated the examples and the chat seems to work.

A chat message example sent by the server:

{
  "translate": "chat.type.text",
  "using": [
    "Player",
    "Hello, world!"
  ]
}

from node-minecraft-protocol.

nsporillo avatar nsporillo commented on July 17, 2024

A zuazo, the example did not work for me, but I spent the last 3 hours working on a decent CLI chat client, it supports color codes too.

https://gist.github.com/milkywayz/325cf29b3fe9e4b80fd8#file-minechat-js

from node-minecraft-protocol.

zuazo avatar zuazo commented on July 17, 2024

OK. Thanks for your code. I will review the chat code examples.

from node-minecraft-protocol.

zuazo avatar zuazo commented on July 17, 2024

Chat messages changed from 1.6.1 to 1.6.2. So AFAIK your example will not work with the latest update. Read my example to see how to update. I tested it with mineflayer and seems to work: PrismarineJS/mineflayer#157

from node-minecraft-protocol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.