We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d529467 commit f132cdbCopy full SHA for f132cdb
server/player/player.go
@@ -1510,12 +1510,16 @@ func (p *Player) handleUseContext(ctx *item.UseContext) {
1510
p.SetHeldItems(p.subtractItem(p.damageItem(i, ctx.Damage), ctx.CountSub), left)
1511
p.addNewItem(ctx)
1512
for _, it := range ctx.ConsumedItems {
1513
- _ = p.offHand.RemoveItem(it)
1514
- it = it.Grow(-left.Count())
+ _, offHand := p.HeldItems()
+ if offHand.Comparable(it) {
1515
+ if err := p.offHand.RemoveItem(it); err == nil {
1516
+ continue
1517
+ }
1518
- if !it.Empty() {
- _ = p.Inventory().RemoveItem(it)
1519
+ it = it.Grow(-offHand.Count())
1520
}
1521
+
1522
+ _ = p.Inventory().RemoveItem(it)
1523
1524
1525
0 commit comments