接口 IPayloadHandler<T extends CustomPacketPayload>
- 类型参数:
T
- The type of payload.
- 所有已知实现类:
MainThreadPayloadHandler
,ModMismatchTest
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Callback for handling custom packets.
-
方法概要
修饰符和类型方法说明void
handle
(T payload, IPayloadContext context) Handles the payload with the supplied context.
-
方法详细资料
-
handle
Handles the payload with the supplied context.The thread the supplied handler executes in depends on the
HandlerThread
set inPayloadRegistrar.executesOn(net.neoforged.neoforge.network.registration.HandlerThread)
.
-