valence/examples
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
..
biomes.rs Correctly encode biomes (#112) 2022-10-13 18:19:35 -07:00
building.rs Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
chest.rs Set up Inventory module (#75) 2022-10-15 19:47:02 -07:00
combat.rs Chunk Rewrite With Paletted Containers (#91) 2022-10-07 15:52:55 -07:00
conway.rs Correctly encode biomes (#112) 2022-10-13 18:19:35 -07:00
cow_sphere.rs Document and rename default_client_event to handle_event_default. 2022-09-11 21:59:05 -07:00
death.rs Dying and respawning (#51) 2022-10-12 11:11:33 -07:00
entity_raycast.rs Add Giant to entity_raycast example 2022-09-17 23:30:54 -07:00
inventory_piano.rs Refactor Slot (#87) 2022-09-26 20:44:06 -07:00
parkour.rs Create parkour.rs example (#28) 2022-09-24 19:40:10 -07:00
resource_pack.rs Update resource pack link and add SHA-1 hash 2022-09-17 19:40:26 -07:00
terrain.rs Chunk Rewrite With Paletted Containers (#91) 2022-10-07 15:52:55 -07:00