Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 :)

  • 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?

  • 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.

  • 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

  • 4 months later...

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 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.