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 b33c061 commit 4e265eeCopy full SHA for 4e265ee
server/player/player.go
@@ -2158,8 +2158,15 @@ func (p *Player) Collect(s item.Stack) (int, bool) {
2158
if p.Handler().HandleItemPickup(ctx, &s); ctx.Cancelled() {
2159
return 0, false
2160
}
2161
- n, _ := p.Inventory().AddItem(s)
2162
- return n, true
+ var added int
+ if _, offHand := p.HeldItems(); !offHand.Empty() && offHand.Comparable(s) {
2163
+ added, _ = p.offHand.AddItem(s)
2164
+ }
2165
+ if s.Count() != added {
2166
+ n, _ := p.Inventory().AddItem(s.Grow(-added))
2167
+ added += n
2168
2169
+ return added, true
2170
2171
2172
// Experience returns the amount of experience the player has.
0 commit comments