Commit graph

2 commits

Author SHA1 Message Date
Carson McManus 47538ea05c
Refactor Slot (#87)
* create ItemStack type

* move slot back into protocol

* change DropItemStack to use ItemStack, because it's imposible to drop nothing
2022-09-26 20:44:06 -07:00
Carson McManus 4574e18d49
inventory client events (#66)
* finish packet definition for ClickContainer

* add CloseScreen client event

* add DropItem client event

* add SetSlotCreative client event

* implement ClientEvent::CloseScreen

* ClientEvent::DropItem

* implement ClientEvent::SetSlotCreative

* cargo fmt

* add inventory_piano example to demo inventory slot click events

* lints

* implement ClickContainer event

* inventory_piano: deduplicate note playing logic

* add DropItemStack client event

* implement ClientEvent::DropItemStack

* adjust logging

* tweak inventory_piano example, send text to chat instead of stdout

* fix lint

* move Slot outside of protocol module

* avoid cloning slot in ClickContainer packet handler

* fix inventory_piano example
2022-09-19 11:29:41 -07:00