displayTest option in mods.toml (#8656)

* displayTest option in mods.toml
* "MATCH_VERSION" (or none) is existing match version string behaviour
* "IGNORE_SERVER_VERSION" accepts anything and sends special SERVERONLY string
* "IGNORE_ALL_VERSION" accepts anything and sends an empty string
* "NONE" allows the mod to supply their own displaytest using the IExtensionPoint mechanism.


* Update display test with feedback and added the mods.toml discussion in mdk.
This commit is contained in:
cpw authored and GitHub committed 2022-06-09 16:39:00 -04:00
1 parent df0dea59f3
commit 27480c15fa
4 files changed
+31 -5

No files matched your search

@@ -7,6 +7,7 @@ package net.minecraftforge.network;
import io.netty.util.AttributeKey;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.fml.IExtensionPoint;
import net.minecraftforge.fml.IExtensionPoint.DisplayTest;
import net.minecraftforge.network.ConnectionData.ModMismatchData;
import net.minecraftforge.network.HandshakeMessages.S2CModList;
@@ -45,7 +46,7 @@ public class NetworkConstants
/**
* Return this value in your {@link DisplayTest} function to be ignored.
*/
public static final String IGNORESERVERONLY = "OHNOES\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31\uD83D\uDE31";
public static final String IGNORESERVERONLY = DisplayTest.IGNORESERVERONLY;
public static String init() {
return NetworkConstants.NETVERSION;