Changes

9 bytes removed ,  01:50, 23 December 2021
it's now NetworkConstants without the FML prefix
Line 79: Line 79:  
{{Template:Tabs/Code_Snippets
 
{{Template:Tabs/Code_Snippets
 
|java=// Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible
 
|java=// Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> FMLNetworkConstants.IGNORESERVERONLY, (a, b) -> true));
+
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true));
 
|kotlin=// Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible
 
|kotlin=// Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class) { IExtensionPoint.DisplayTest(Supplier { FMLNetworkConstants.IGNORESERVERONLY }, BiPredicate { _: String, _: Boolean -> true }) }
+
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class) { IExtensionPoint.DisplayTest(Supplier { NetworkConstants.IGNORESERVERONLY }, BiPredicate { _: String, _: Boolean -> true }) }
 
|scala=import scala.compat.java8.FunctionConverters._
 
|scala=import scala.compat.java8.FunctionConverters._
 
// Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible
 
// Make sure the mod being absent on the other network side does not cause the client to display the server as incompatible
ModLoadingContext.get.registerExtensionPoint(IExtensionPoint.DisplayTest.class, (() => new IExtensionPoint.DisplayTest((() => FMLNetworkConstants.IGNORESERVERONLY).asJava, asJavaBiPredicate((_: String, _: java.lang.Boolean) => true))).asJava)
+
ModLoadingContext.get.registerExtensionPoint(IExtensionPoint.DisplayTest.class, (() => new IExtensionPoint.DisplayTest((() => NetworkConstants.IGNORESERVERONLY).asJava, asJavaBiPredicate((_: String, _: java.lang.Boolean) => true))).asJava)
 
|}}
 
|}}
  
297

edits