PrismarineJS / PrismarineJS/node-minecraft-protocol

set_creative_slot failure

Open
#1,016 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

[ ] The FAQ doesn't contain a resolution to my issue

Versions

  • minecraft-protocol: 1.35.0
  • server: vanilla 1.18.2
  • node: v16.6.2

Detailed description of a problem

When sent the packet fails go through the minecraft server and give me. Seems like it's not correct.
[18:23:17] [Server thread/INFO]: AlphaServer lost connection: Internal Exception: io.netty.handler.codec.DecoderException: java.io.IOException: Packet 0/40 (wv) was larger than I expected, found 24 bytes extra whilst reading packet 40

Current code

var Item = {
    "present": true,
    "itemId": 847,
    "itemCount": 1,
    "nbtData": {
        "type": "compound",
        "name": "",
        "value": {
            "Decorations": {"value": {"type": "compound","value": []}},
            "map": {
                "type": "int",
                "value": 15
            }
        }
    }
}
client.write("set_creative_slot",{
    "slot": 45,
    "item": Item
})

Expected behavior

Should set slot 45 to a map

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 comparing the set_creative_slot payload in the current code with the protocol definition for Minecraft 1.18.2, focusing on the supplied Item NBT structure and slot 45. Done means the server accepts the packet without the DecoderException and slot 45 contains the map.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.