Class ModMismatchTest

java.lang.Object
net.neoforged.neoforge.oldtest.misc.ModMismatchTest
All Implemented Interfaces:
IPayloadHandler<ModMismatchTest.ModMismatchPayload>

public class ModMismatchTest extends Object implements IPayloadHandler<ModMismatchTest.ModMismatchPayload>
This test mod provides a way to register a CustomPacketPayload with a different protocol version on the client and the server to cause a mod channel mismatch. With this test mod and at least one of its features enabled, a ModMismatchDisconnectedScreen should appear when trying to join a test server, displaying detailed information about why the handshake failed. In case of a mismatch, the two displayed mod versions will be the same due to not being able to specify a different client and server mod version of this test mod. This test mod is disabled by default to ensure that users can join test servers without needing to specifically disable this test mod.

In the past this test mod also registered a SoundEvent to cause a registry mismatch, but this is no longer the case, as the network negotiation does not care for registry mismatches anymore.