Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
durabilityUsed
getter to check components
array for `damag…
…e` component * Add a component map to avoid constantly searching the `components` array * Use the `damage` component value for `durabilityUsed` if found * Fall back to checking the `Damage` field in `nbt` or `metadata` if `damage` component is not found * Add test cases to verify `durabilityUsed` returns correct value for items with and without the `damage` component
- Loading branch information