Skip to content

[Bug] Recipe Serialization Issue: getIngredients() Returns Empty List in toNetwork #21

@CYXDBY

Description

@CYXDBY

The recipe serialization logic provided in the tutorial code for the custom recipe serializer causes a multiplayer synchronization error due to inconsistent reading/writing of ingredients over the network.

That's because in the toNetwork function, using pRecipe.getIngredients() results in an empty list. This leads to a network buffer mismatch and the following error during client connection:

io.netty.handler.codec.DecoderException: io.netty.handler,codec.Encoder.Exception: java.io.UTFDataFormatException: malformed input around byte 76

Confirmed that replacing pRecipe.getIngredients() with pRecipe.inputItems resolves the multiplayer sync issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions