mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
fix: sync enchanted item to client (#2816)
This commit is contained in:
@@ -167,7 +167,13 @@ async fn enchant_target(
|
||||
}
|
||||
|
||||
item.enchant(enchantment, level);
|
||||
player.inventory().set_held_item(item).await;
|
||||
let inventory = player.inventory();
|
||||
inventory.set_held_item(item.clone()).await;
|
||||
|
||||
player
|
||||
.sync_hand_slot(inventory.get_selected_slot() as usize, item)
|
||||
.await;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user