valence/crates
Carson McManus e1a3e2dc00
make dropping an item in creative not crash the server (#234)
<!-- 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. -->
Added a quick and dirty bounds check because we haven't created drop
item/itemstack event(s) yet.

## 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. -->

use the `building` example

<!-- You need to include steps regardless of whether or not you are
using a playground. -->
Steps:
1. `cargo run --example building`
2. open inventory
3. pick an item
4. drop the item outside of the inventory window
5. see that the server does not panic

#### Related

<!-- Link to any issues that have context for this or that this PR
fixes. -->
fixes #233
2023-02-11 20:04:52 -08:00
..
packet_inspector ECS Rewrite (#184) 2023-02-11 09:51:53 -08:00
playground ECS Rewrite (#184) 2023-02-11 09:51:53 -08:00
valence make dropping an item in creative not crash the server (#234) 2023-02-11 20:04:52 -08:00
valence_anvil ECS Rewrite (#184) 2023-02-11 09:51:53 -08:00
valence_nbt Add a simple SNBT parser (#201) 2023-02-03 03:16:27 -08:00
valence_protocol ECS Rewrite (#184) 2023-02-11 09:51:53 -08:00
valence_protocol_macros ECS Rewrite (#184) 2023-02-11 09:51:53 -08:00
valence_spatial_index Reorganize Packages (#180) 2022-12-29 16:51:05 -08:00