From e371d3561a380acf5698a04b7f8a596d6ed44122 Mon Sep 17 00:00:00 2001 From: lost-werewolf <195479552+lost-werewolf@users.noreply.github.com> Date: Fri, 26 Jun 2026 04:32:41 -0400 Subject: [PATCH] fix item drops sometimes being rejected --- TShockAPI/Bouncer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 909a84d68..1c10cd678 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1249,7 +1249,8 @@ internal void OnItemDrop(object sender, GetDataHandlers.ItemDropEventArgs args) } // stop the client from changing the item type of a drop - if (Main.item[id].active && Main.item[id].type != type && + // as long as it's not the last item + if (id < Main.maxItems && Main.item[id].active && Main.item[id].type != type && !(Main.item[id].type == ItemID.EmptyBucket && type == ItemID.WaterBucket)) // Empty bucket turns into Water Bucket on rainy days { TShock.Log.ConsoleDebug(GetString("Bouncer / OnItemDrop rejected from item drop check from {0}", args.Player.Name));