Skip to content

Resin trim gets stripped from armor when interacting on pre-resin server (1.20.1) #1334

Description

@mfishma

'/viaversion dump' Output

https://dump.viaversion.com/a005fcce82bf6cb0120aaff11c804b45d14789a2795ce8ad40775609a7d9106c

Server/Client Error

(no errors)

Bug Description

I was looking into #1330 and wanted to see current behavior, but noticed the problem of trim being lost going back to the server when playing on pre-1.21.4 (when resin was introduced). Any resin armor trim I give myself (used an anvil to be sure) loses its trim once I go to the old client, move the item around, then return on the new client.

Steps to Reproduce

  1. On a modern server (26.3), make any armor piece with a resin trim. (This doesn't happen with other trims)
  2. Connect to the server using a Minecraft 1.20.1 client.
  3. Open inventory, equip the trimmed armor, and take it off (or move it between slots).
  4. Disconnect and rejoin using a modern client (26.3).

Expected

  • Resin armor trim component should be preserved across client-to-server inventory packets (CONTAINER_CLICK / SET_CREATIVE_SLOT).
  • Going back to the modern server, the armor should still have its resin trim.

Actual

  • The trim data is stripped from the item on the server after being moved in the 1.20.1 inventory.
  • When viewed on modern server, the armor's now untrimmed.

Additional Server Info

I noticed EntityPacketRewriter1_20_5 writes to user.get(ArmorTrimStorage.class), while updateArmorTrim reads from user.storables(Protocol1_20_3To1_20_5.class).armorTrims() which just has the hardcoded 1.20.3 defaults. Should it be updating the storables instance instead?

Checklist

  • Via plugins are only running on EITHER the backend servers (e.g. Paper) OR the proxy (e.g. Velocity), not on both.
  • I have included a ViaVersion dump.
  • If applicable, I have included a paste (not a screenshot) of the error.
  • I have tried a build from https://ci.viaversion.com/ and the issue still persists.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions