Skip to content

NPE on clicking an item with 'blocks_attacks' attribute in container #1228

@Galapen

Description

@Galapen

/viaversion dump Output

https://dump.viaversion.com/1c1f424a844ac0c0fed56560882f0b223d665fa0e71e6f093ae9b36f8c500b8f

Server/Client Error

https://mclo.gs/hnN8X4b

Bug Description

Clicking on an item with the blocks_attacks attribute on versions below 1.21.5 causes the client to be kicked.

Steps to Reproduce

  1. Using modern Paper (1.21+) with the latest stable Via* 5.8.0
  2. Log in with a client version lower than 1.21.5, e.g. 1.21.3
  3. Give yourself an item with the blocking attribute:
    /give @s diamond_sword[blocks_attacks={damage_reductions:[{base:0,factor:0.5}]}]
  4. Click the item in your inventory

Expected: You can click and move the item
Actual: You are kicked

Additional Server Info

No response

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 the latest build(s) from https://ci.viaversion.com/ and the issue still persists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions