From 708da118e1489f3adb8c29a7e158f773a1909e22 Mon Sep 17 00:00:00 2001 From: Marc Hermans Date: Tue, 14 Nov 2023 11:45:40 +0100 Subject: [PATCH] Quick util method for the noop on configuraiton handlers. --- .../network/handling/IConfigurationPayloadHandler.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/net/neoforged/neoforge/network/handling/IConfigurationPayloadHandler.java b/src/main/java/net/neoforged/neoforge/network/handling/IConfigurationPayloadHandler.java index 957122a334a..16e0b459805 100644 --- a/src/main/java/net/neoforged/neoforge/network/handling/IConfigurationPayloadHandler.java +++ b/src/main/java/net/neoforged/neoforge/network/handling/IConfigurationPayloadHandler.java @@ -18,4 +18,14 @@ public interface IConfigurationPayloadHandler { * @param payload The payload. */ void handle(ConfigurationPayloadContext context, T payload); + + /** + * Creates a handler that does nothing. + * + * @return The handler. + * @param The type of payload. + */ + static IConfigurationPayloadHandler noop() { + return (context, payload) -> {}; + } }