Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implement item dropping functionality.
pumpkin/src/net/container.rs
DropType
to theuse
statement.ClickType::DropType
in thematch_click_behaviour
function.handle_drop_item
function to handle item dropping logic.pumpkin/src/net/packet/play.rs
SPlayerAction::DropItem
andSPlayerAction::DropItemStack
actions.handle_click_container
function to handle container clicks.handle_decrease_item
function to handle item decrease.match_click_behaviour
function to match click behavior.mouse_click
,shift_mouse_click
,number_button_pressed
,creative_pick_item
,double_click
, andmouse_drag
functions to handle various click behaviors.handle_drop_item
function to handle item dropping logic.get_current_players_in_container
function to get current players in the container.send_container_changes
andsend_whole_container_change
functions to send container changes.get_open_container
function to get the open container.pickup_items
andgive_items
functions to handle item pickup and giving.drop_item
anddrop_item_stack
functions to handle item dropping and dropping item stacks.Tested: ❌
Ready to merge: ❌
Testing
Please follow our Coding Guidelines