diff --git a/src/main/java/de/melanx/simplebackups/SimpleBackups.java b/src/main/java/de/melanx/simplebackups/SimpleBackups.java index 30455d0..a013475 100644 --- a/src/main/java/de/melanx/simplebackups/SimpleBackups.java +++ b/src/main/java/de/melanx/simplebackups/SimpleBackups.java @@ -7,13 +7,11 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.DistExecutor; -import net.minecraftforge.fml.IExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; -import net.minecraftforge.network.NetworkConstants; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -35,7 +33,6 @@ public SimpleBackups() { private void setup(FMLCommonSetupEvent event) { network.registerPackets(); - ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (remote, isServer) -> true)); } public static SimpleNetwork network() { diff --git a/src/main/java/de/melanx/simplebackups/network/SimpleNetwork.java b/src/main/java/de/melanx/simplebackups/network/SimpleNetwork.java index b93164c..8f8c249 100644 --- a/src/main/java/de/melanx/simplebackups/network/SimpleNetwork.java +++ b/src/main/java/de/melanx/simplebackups/network/SimpleNetwork.java @@ -23,8 +23,8 @@ public SimpleNetwork() { new ResourceLocation(SimpleBackups.MODID, "netchannel"), () -> NET_VERSION, // allow joining if mod is not installed on client/server - s -> NET_VERSION.equals(s) || NetworkRegistry.ABSENT.equals(s) || NetworkRegistry.ACCEPTVANILLA.equals(s), - s -> NET_VERSION.equals(s) || NetworkRegistry.ABSENT.equals(s) || NetworkRegistry.ACCEPTVANILLA.equals(s) + s -> NET_VERSION.equals(s) || NetworkRegistry.ABSENT.version().equals(s) || NetworkRegistry.ACCEPTVANILLA.equals(s), + s -> NET_VERSION.equals(s) || NetworkRegistry.ABSENT.version().equals(s) || NetworkRegistry.ACCEPTVANILLA.equals(s) ); } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index b895811..4535cac 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -10,6 +10,7 @@ displayName="Simple Backups" updateJSONURL="https://assets.melanx.de/updates/simple-backups.json" displayURL="https://www.curseforge.com/members/melanx/" authors="MelanX" +displayTest="IGNORE_ALL_VERSION" description=""" A simple mod to create scheduled backups. """