valence/src
Carson McManus 59ca1ab573
Set up Inventory module (#75)
This is a very rough version of the inventory module and associated features. This will be a good base to start building something more robust.

- adds a player inventory to all clients
- makes clients keep track of what inventory they have open
- adds very naive state sync for inventories

related: #53 

# Test plans

### Building

1. run `building` example
2. pick any block from creative
3. place it
4. pick a different block from creative
5. place 2
6. break the last one
7. see that both remaining blocks don't become dirt

### Chest inventories

1. run `chest` example
2. sneak to give yourself a stone block
3. open the chest (it's invisible on top of the stone block)
4. place stone in chest
5. see the stone moving around in the chest

## Known Issues

To be fixed in later PRs

- It's very easy to duplicate items if you take the stone out of the chest on the same tick as the server trying to move the item.
- The chest is invisible when you spawn in. It appears if you break it.
- `get_slot` and `set_slot` can panic.
2022-10-15 19:47:02 -07:00
..
chunk Correctly encode biomes (#112) 2022-10-13 18:19:35 -07:00
client Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
entity Entity Hitbox Improvements (#70) 2022-09-17 23:14:48 -07:00
protocol Dying and respawning (#51) 2022-10-12 11:11:33 -07:00
biome.rs Rewrite ident module (again) (#111) 2022-10-12 03:53:59 -07:00
block.rs Add Items (#92) 2022-10-05 09:28:08 -07:00
block_pos.rs add building example (#49) 2022-09-13 18:30:45 -07:00
bvh.rs Fix stack overflow during BVH construction 2022-07-17 22:07:51 -07:00
chunk.rs Correctly encode biomes (#112) 2022-10-13 18:19:35 -07:00
chunk_pos.rs Only set center chunk when crossing chunk borders, not sections 2022-09-19 21:03:39 -07:00
client.rs Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
config.rs Correctly encode biomes (#112) 2022-10-13 18:19:35 -07:00
dimension.rs Rewrite ident module (again) (#111) 2022-10-12 03:53:59 -07:00
enchant.rs Expose enchantments to Rust (#99) 2022-10-03 13:19:42 -07:00
entity.rs Add performance tests (#113) 2022-10-14 21:18:03 -07:00
ident.rs Fix bug in ident and use AsRef instead of Borrow 2022-10-13 22:28:12 -07:00
inventory.rs Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
item.rs clamp ItemStack item count to range 1-127 (#110) 2022-10-11 11:10:04 -07:00
lib.rs Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
player_list.rs Skip spawn of non visible player characters (#100) 2022-10-08 15:12:30 -07:00
player_textures.rs Clean up docs and fix clippy issues 2022-07-14 23:18:20 -07:00
protocol.rs Rewrite ident module (again) (#111) 2022-10-12 03:53:59 -07:00
server.rs Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
slab.rs Fix clippy issues 2022-09-02 00:37:02 -07:00
slab_rc.rs Fix clippy issues 2022-09-02 00:37:02 -07:00
slab_versioned.rs Fix clippy issues 2022-09-02 00:37:02 -07:00
spatial_index.rs Update rust docs 2022-09-02 00:06:45 -07:00
text.rs Rewrite ident module (again) (#111) 2022-10-12 03:53:59 -07:00
util.rs Chunk Rewrite With Paletted Containers (#91) 2022-10-07 15:52:55 -07:00
world.rs Chunk Rewrite With Paletted Containers (#91) 2022-10-07 15:52:55 -07:00