From 1f2a6210d466fa19ffec381cd34265f6f0a55e95 Mon Sep 17 00:00:00 2001 From: DaPigGuy Date: Wed, 8 Jan 2025 21:12:38 -0800 Subject: [PATCH] player/player.go: Fix swap on `PickBlock` when last hotbar slot is empty --- server/player/player.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/player/player.go b/server/player/player.go index 25466edce..315b5618a 100644 --- a/server/player/player.go +++ b/server/player/player.go @@ -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