valence/crates
Carson McManus 9f8ff321c7
Inventory module docs and more helper functions (#268)
<!-- Please make sure that your PR is aligned with the guidelines in
CONTRIBUTING.md to the best of your ability. -->
<!-- Good PRs have tests! Make sure you have sufficient test coverage.
-->

## Description

<!-- Describe the changes you've made. You may include any justification
you want here. -->

This mostly adds docs, but it also adds (and documents) some new helper
functions:

- `set_title()` - Allows us to put `must_use` on `replace_title`
- `set_slot()` - Allows us to put `must_use` on `replace_slot`
- `set_slot_amount()` - Allows users to modify stack counts without
cloning the entire stack and replacing it. Useful if the stack has a lot
of NBT data.
- `first_empty_slot()`
- `first_empty_slot_in()` - Useful, trivial to provide

## Test Plan

<!-- Explain how you tested your changes, and include any code that you
used to test this. -->
<!-- If there is an example that is sufficient to use in place of a
playground, replace the playground section with a note that indicates
this. -->

<details>

<summary>Playground</summary>

```rust
N/A
```

</details>

<!-- You need to include steps regardless of whether or not you are
using a playground. -->
Steps:
1. `cargo test -p valence --doc`

#### Related

<!-- Link to any issues that have context for this or that this PR
fixes. -->
2023-03-04 16:31:21 -08:00
..
packet_inspector Replace EncodePacket and DecodePacket with Packet (#261) 2023-02-25 11:21:25 -08:00
playground Update to Bevy 0.10 (#265) 2023-03-04 03:35:11 -08:00
valence Inventory module docs and more helper functions (#268) 2023-03-04 16:31:21 -08:00
valence_anvil Update to Bevy 0.10 (#265) 2023-03-04 03:35:11 -08:00
valence_nbt Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00
valence_protocol Replace EncodePacket and DecodePacket with Packet (#261) 2023-02-25 11:21:25 -08:00
valence_protocol_macros Replace EncodePacket and DecodePacket with Packet (#261) 2023-02-25 11:21:25 -08:00
valence_spatial_index Reorganize Packages (#180) 2022-12-29 16:51:05 -08:00
valence_stresser Refactor valence_protocol (#253) 2023-02-23 22:16:22 -08:00