valence icon indicating copy to clipboard operation
valence copied to clipboard

add `slot_mut` to `Inventory`

Open dyc3 opened this issue 3 years ago • 2 comments

  • add doc comment to item stack
  • add slot_mut

Test Plan

  • unit tests also
  • run chest example
  • sneak to get stone in first hotbar slot

dyc3 avatar Oct 16 '22 15:10 dyc3

Entities' tracked data don't have a get_mut for any of their fields for this reason.

rj00a avatar Oct 16 '22 20:10 rj00a

That is true. I might be able to do something about that with a guard type around the slot. I'll play around with it.

dyc3 avatar Oct 16 '22 20:10 dyc3

After playing around with it for a little too long, this is too complicated.

dyc3 avatar Nov 01 '22 22:11 dyc3