Posted September 21, 20205 yr Hello Folks, I just tried to port my mod from 1.12.2 to 1.16.1. It is a serverside only mod, which doesn't (or shouldn't) be required on the client side. In 1.12.2 there was an attribute in the @mod annotation called "acceptable remote version". I set this to "*" and it worked. In 1.16 the annotation does not take any attribute other than the mod name. So is there another way of doing this? I didn't found anything on the internet regarding this and the only open source mod I know is Ender IO, which has not been ported to 1.16 (and is not serverside only) Thanks in advance :)
September 21, 20205 yr Author Thanks for the quick reply. It is working as serverside only. However in the multiplayer tab on the client ther server is shown as incompatible due to different mod lists... How do I get rid of that?
September 23, 20205 yr Author I think that you mean someting like this: ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ...); But I don't know how the function/the second argument would look like. I also tried looking on the internet but didn't find anything related to that.
September 23, 20205 yr Author Ok nevermind, I got it: ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ()-> Pair.of(()->FMLNetworkConstants.IGNORESERVERONLY, (version, network) -> {return true;})); And my problem is solved now. Thanks for the help
February 7, 20214 yr I can't get it to compile the previous lines ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.DISPLAYTEST, ()-> Pair.of(()->FMLNetworkConstants.IGNORESERVERONLY, (version, network) -> {return true;})); console --> The target type of this expression must be a functional interface import java.io.File; import java.util.Iterator; import java.util.function.Supplier; import org.apache.commons.lang3.tuple.Pair; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import com.mojang.brigadier.context.CommandContext; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.ExtensionPoint; import net.minecraftforge.fml.ModLoadingContext; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.event.server.FMLServerStartingEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.fml.network.FMLNetworkConstants; I need help --> Version Forge 1.16.4 - 35.1.4 thanks Edited February 7, 20214 yr by Mine_asd
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.