From 1ddac54256332addbff60d2bab3a61cc34ff8d7c Mon Sep 17 00:00:00 2001 From: DavidQF555 <54233412+DavidQF555@users.noreply.github.com> Date: Fri, 29 Sep 2023 00:14:56 -0700 Subject: [PATCH] Fix Slot Index for Inventory Ticking Items (#9736) --- .../net/minecraft/world/entity/player/Inventory.java.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/entity/player/Inventory.java.patch b/patches/minecraft/net/minecraft/world/entity/player/Inventory.java.patch index f8b404df7e..82240ca4a3 100644 --- a/patches/minecraft/net/minecraft/world/entity/player/Inventory.java.patch +++ b/patches/minecraft/net/minecraft/world/entity/player/Inventory.java.patch @@ -19,7 +19,7 @@ if (p_36049_.hasTag()) { itemstack.setTag(p_36049_.getTag().copy()); } -@@ -222,10 +_,11 @@ +@@ -222,11 +_,13 @@ } public void tick() { @@ -28,10 +28,12 @@ for(int i = 0; i < nonnulllist.size(); ++i) { if (!nonnulllist.get(i).isEmpty()) { - nonnulllist.get(i).inventoryTick(this.player.level(), this.player, i, this.selected == i); -+ nonnulllist.get(i).onInventoryTick(this.player.level(), this.player, idx++, this.selected); ++ nonnulllist.get(i).onInventoryTick(this.player.level(), this.player, idx, this.selected); } ++ idx++; } } + @@ -277,6 +_,8 @@ } catch (Throwable throwable) { CrashReport crashreport = CrashReport.forThrowable(throwable, "Adding item to inventory");