From d85e9bcbad1cb3bcb8e98008dbaaaf5084fc1875 Mon Sep 17 00:00:00 2001 From: Luk-ESC Date: Thu, 22 Aug 2024 18:40:43 +0200 Subject: [PATCH] fix set_slot armor indexing --- pumpkin-inventory/src/player.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pumpkin-inventory/src/player.rs b/pumpkin-inventory/src/player.rs index b67af9c6b..fd92220a9 100644 --- a/pumpkin-inventory/src/player.rs +++ b/pumpkin-inventory/src/player.rs @@ -51,7 +51,7 @@ impl PlayerInventory { 1..=4 => self.crafting[slot - 1] = item, 5..=8 => { match item { - None => self.armor[slot - 4] = None, + None => self.armor[slot - 5] = None, Some(item) => { // TODO: Replace asserts with error handling match slot - 5 {