Skip to content

Commit

Permalink
player/player.go: Fix swap on PickBlock when last hotbar slot is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Jan 9, 2025
1 parent d02eed9 commit 1f2a621
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/player/player.go
Original file line number Diff line number Diff line change
Expand Up @@ -2016,7 +2016,7 @@ func (p *Player) PickBlock(pos cube.Pos) {
p.SetHeldItems(pickedItem, offhand)
return
}
if firstEmpty < 8 {
if firstEmpty < 9 {
_ = p.SetHeldSlot(firstEmpty)
_ = p.Inventory().SetItem(firstEmpty, pickedItem)
return
Expand Down

0 comments on commit 1f2a621

Please sign in to comment.