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

Failed to decode packet 'clientbound/minecraft:recipe_book_add' #513

Open
kbingham1993 opened this issue Nov 18, 2024 · 1 comment
Open

Comments

@kbingham1993
Copy link

kbingham1993 commented Nov 18, 2024

What's the issue you encountered?

It crashed when I acquired a clock in an attempt to make a calendar. Now, I am unable to log into the server without uninstalling the mod cannot

How can the issue be reproduced?

Have paper and a clock in inventory, it attempts to assign you the calendar recipe but is unable too and crashes you out of the server. If you have paper and a clock in inventory, it attempts to assign you the calendar recipe but is unable to and crashes.

Logs

https://gist.github.com/kbingham1993/ae8ed050bad500772742f750f9ea9b78

Mod Version

SereneSeasons-fabric-1.21.3-10.2.0.1

Additional information

No response

@Bret06
Copy link

Bret06 commented Feb 18, 2025

I don't believe the issue is caused by the same thing it was for me. However, while playing with one of our datapacks one of my staff messaged me and sent this exact same error code with a slightly different reason for the crash:
Caused by: java.lang.IllegalArgumentException: Invalid key. Must be [a-z0-9/._-]:
This was caused by a recipe in our datapack that was incorrectly generated by Misode causing the server to mismatch the recipe packets. Basically in recipes attribute components in newer versions there is a id and type value. When I used misode to generate the recipe it gave me this:

                "modifiers": [
                    {
                        "type": "minecraft:attack_damage",
                        "id": "minecraft:",
                        "amount": 0,
                        "operation": "add_value"
                    }
                ],
                "show_in_tooltip": false
            }

Typically, in Minecraft datapacks when you receive this error: Invalid key. Must be [a-z0-9/._-]: it means there is a error somewhere in a definition. It took 5 seconds of skimming the recipe json before I noticed how off the id value looked:
"id": "minecraft:",

All I did was copy and paste the type to the id, which was purely guess work but it WORKED FIRST TRY. So instead of this:

                "modifiers": [
                    {
                        "type": "minecraft:attack_damage",
                        "id": "minecraft:",
                        "amount": 0,
                        "operation": "add_value"
                    }
                ],
                "show_in_tooltip": false
            }

Do this:

                "modifiers": [
                    {
                        "type": "minecraft:attack_damage",
                        "id": "minecraft:attack_damage",
                        "amount": 0,
                        "operation": "add_value"
                    }
                ],
                "show_in_tooltip": false
            }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants