From 2cf08d393c34d807fece0789cbd828700299b542 Mon Sep 17 00:00:00 2001
From: Cai <13110818005@qq.com>
Date: Sat, 12 Jul 2025 17:06:21 +0800
Subject: [PATCH] Revert "feat(GetDataHandler): add
`ForceItemIntoNearestChest`"
This reverts commit 939d1582f5506f014a38510e1809309abd97cd5e.
---
TShockAPI/GetDataHandlers.cs | 37 ------------------------------------
1 file changed, 37 deletions(-)
diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs
index d587515c..6ed0f8de 100644
--- a/TShockAPI/GetDataHandlers.cs
+++ b/TShockAPI/GetDataHandlers.cs
@@ -130,7 +130,6 @@ namespace TShockAPI
{ PacketTypes.NumberOfAnglerQuestsCompleted, HandleNumberOfAnglerQuestsCompleted },
{ PacketTypes.PlaceObject, HandlePlaceObject },
{ PacketTypes.LoadNetModule, HandleLoadNetModule },
- { PacketTypes.ForceItemIntoNearestChest, HandleForceItemIntoNearestChest },
{ PacketTypes.PlaceTileEntity, HandlePlaceTileEntity },
{ PacketTypes.PlaceItemFrame, HandlePlaceItemFrame },
{ PacketTypes.UpdateItemDrop, HandleItemDrop },
@@ -1791,30 +1790,6 @@ namespace TShockAPI
return args.Handled;
}
- /// For use in a ForceItemIntoNearestChest event.
- public class ForceItemIntoNearestChestEventArgs : GetDataHandledEventArgs
- {
- /// The slot index of the item being attempted to put into a chest.
- public short Slot { get; set; }
-
- }
-
- /// Fired when a ForceItemIntoNearestChest event occurs.
- public static HandlerList ForceItemIntoNearestChest = new HandlerList();
- private static bool OnForceItemIntoNearest(TSPlayer player, MemoryStream data, short slot)
- {
-
- var args = new ForceItemIntoNearestChestEventArgs
- {
- Player = player,
- Data = data,
- Slot = slot
- };
-
- ForceItemIntoNearestChest.Invoke(null, args);
- return args.Handled;
- }
-
/// For use in a PlaceTileEntity event.
public class PlaceTileEntityEventArgs : GetDataHandledEventArgs
{
@@ -4113,18 +4088,6 @@ namespace TShockAPI
return false;
}
- private static bool HandleForceItemIntoNearestChest(GetDataHandlerArgs args)
- {
- var slot = args.Data.ReadInt16();
-
- if (OnForceItemIntoNearest(args.Player, args.Data, slot))
- {
- return true;
- }
-
- return false;
- }
-
private static bool HandlePlaceTileEntity(GetDataHandlerArgs args)
{
var x = args.Data.ReadInt16();