mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-23 14:31:30 +11:00
59ca1ab573
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. |
||
---|---|---|
.. | ||
chunk | ||
client | ||
entity | ||
protocol | ||
biome.rs | ||
block.rs | ||
block_pos.rs | ||
bvh.rs | ||
chunk.rs | ||
chunk_pos.rs | ||
client.rs | ||
config.rs | ||
dimension.rs | ||
enchant.rs | ||
entity.rs | ||
ident.rs | ||
inventory.rs | ||
item.rs | ||
lib.rs | ||
player_list.rs | ||
player_textures.rs | ||
protocol.rs | ||
server.rs | ||
slab.rs | ||
slab_rc.rs | ||
slab_versioned.rs | ||
spatial_index.rs | ||
text.rs | ||
util.rs | ||
world.rs |