PrismarineJS / PrismarineJS/node-minecraft-protocol

Handle official (MC| - prefixed) Custom Payload packets

Open
#152 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new feature
Dominant language
JavaScript
Stars
1.4k
Forks
290
Avg merge
4d 8h
Merged PRs (30d)
7

Description

Minecraft defines a couple of packets through the Custom Payload mechanism. Currently, node-mc-proto decodes every custom payload as a simple byte array, and API users are left to decode those themselves. This issues proposes two things

  1. Add a new mechanism for API users to write their own custom payload decoder.
  2. Add a custom payload decoder for all the official channels.

We might want to support and manage the "Register/Unregister" channel automagically for this.

In 1.8, the official channels (Ignoring the custom channel management ones) are :

MC|AdvCdm
Name Type Description
Mode Byte
X Int If Mode == 0
Y Int If Mode == 0
Z Int If Mode == 0
EntityID Int If Mode == 1
Command String
MC|Beacon
Name Type Description
Effect1 Int
Effect2 Int
MC|BEdit
Name Type Description
Book Slot?
MC|BSign
Name Type Description
Book Slot ?
MC|BOpen
Name Type Description
MC|ItemName
Name Type Description
ItemName String
MC|RPack

(Deprecated, use Resource Pack Send (Play, 0x48, clientbound) and Resource Pack Status (Play, 0x19, serverbound) packets)

Name Type Description
URL String
MC|TrList
Name Type Description
???
MC|TrSel
Name Type Description
Slot ID Int The selected slot id of the trading inventory
MC|PingHost

(Deprecated in 1.7)

Name Type Description
???
MC|Brand
Name Type Description
Implementation String

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the custom payload packet handling and the API surface for registering decoders. Compare that path with the listed official MC| channels and their field formats; done means users can supply custom decoders and the official channels are decoded without manual byte-array parsing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.