Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Idea] WebSocketBot API to query item and entity ID mapping #2805

Open
3 tasks done
DGCK81LNN opened this issue Oct 10, 2024 · 1 comment
Open
3 tasks done

[Idea] WebSocketBot API to query item and entity ID mapping #2805

DGCK81LNN opened this issue Oct 10, 2024 · 1 comment
Labels
a:enhancement Request for improvement of an existing feature a:new-feature Request for a new feature

Comments

@DGCK81LNN
Copy link

DGCK81LNN commented Oct 10, 2024

Prerequisites

Console Client Version

20240906-276

Describe your problem

I'd like to control the client using WebSocketBot. Currently EntityType and ItemType are sent as numeric IDs, but the client of the socket, MCC.js for example, needs to know the names (AcaciaBoat as opposed to 0). The mappings between names and IDs are currently hardcoded into MCC.js but this is bad for compatibility across MCC versions.

Suggest a possible solution

WebSocketBot could provide an API to get the list of names for every ItemType and EntityType.

Alternatively, ItemType, EntityType, and possibly other enums, could be simply sent as strings containing the name of the value instead of the numeric value itself, which actually makes them way easier to work with. See https://stackoverflow.com/questions/2441290/javascriptserializer-json-serialization-of-enum-as-string.

Attach screenshot here (If applicable)

No response

Minecraft Version

N/A

Device

Desktop

Operating System

Windows

@DGCK81LNN DGCK81LNN added a:enhancement Request for improvement of an existing feature a:new-feature Request for a new feature labels Oct 10, 2024
@milutinke
Copy link
Member

This is one of the things I have on my todo, when I catch some free time, I could add it to be sent as a string and received as a string.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:enhancement Request for improvement of an existing feature a:new-feature Request for a new feature
Projects
None yet
Development

No branches or pull requests

2 participants