Origins (Fabric)

Origins (Fabric)

15M Downloads

Invalid badge reference causes client disconnect

ventus96 opened this issue ยท 1 comments

commented

The bug:
When joining a world where an invalid badge is referenced in a power, the client disconnects with the following exception:
Internal Exception: io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:custom_payload' (origins:s2c/sync_badge_registry)

Affected versions:
1.13.0-alpha.5

In v1.10.0, this bug did not occur.

Steps to reproduce:

  • Add the following power to a datapack:
    { "type": "origins:simple", "badges": [ "namespace:badge" ] }
  • If namespace:badge is not defined, when the datapack is enabled on a world the client will immediately disconnect.
commented

Good catch! Apparently, this was due to the ID referencing to a badge that doesn't exist (therefore null) and wasn't handled properly, and was just put into the badge registry. And since the badge is null, it causes an issue when attempting to sync badges to the client.

This will be fixed in 1.13.0-alpha.6 ๐Ÿ‘