diff --git a/TShockAPI/Handlers/NetModules/LiquidHandler.cs b/TShockAPI/Handlers/NetModules/LiquidHandler.cs
new file mode 100644
index 00000000..e7fe647f
--- /dev/null
+++ b/TShockAPI/Handlers/NetModules/LiquidHandler.cs
@@ -0,0 +1,29 @@
+using System.IO;
+
+namespace TShockAPI.Handlers.NetModules
+{
+ ///
+ /// Handles the NetLiquidModule. Rejects all incoming net liquid requests, as clients should never send them
+ ///
+ public class LiquidHandler : INetModuleHandler
+ {
+ ///
+ /// Does nothing. We should not deserialize this data
+ ///
+ ///
+ public void Deserialize(MemoryStream data)
+ {
+ // No need to deserialize
+ }
+
+ ///
+ /// Rejects the packet. Clients should not send this to us
+ ///
+ ///
+ ///
+ public void HandlePacket(TSPlayer player, out bool rejectPacket)
+ {
+ rejectPacket = true;
+ }
+ }
+}
diff --git a/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs b/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs
index f4d20bb4..820d2fe2 100644
--- a/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs
+++ b/TShockAPI/Handlers/NetModules/NetModulePacketHandler.cs
@@ -1,5 +1,4 @@
-using System;
-using Terraria;
+using Terraria;
using static TShockAPI.GetDataHandlers;
namespace TShockAPI.Handlers.NetModules
@@ -48,6 +47,11 @@ namespace TShockAPI.Handlers.NetModules
handler = new PylonHandler();
break;
}
+ case NetModulesTypes.Liquid:
+ {
+ handler = new LiquidHandler();
+ break;
+ }
default:
{
// As of 1.4.x.x, this is now used for more things:
diff --git a/TShockAPI/TShockAPI.csproj b/TShockAPI/TShockAPI.csproj
index b129837f..2f4a406c 100644
--- a/TShockAPI/TShockAPI.csproj
+++ b/TShockAPI/TShockAPI.csproj
@@ -92,6 +92,7 @@
+