Posted December 19, 20231 yr I am trying to update my clientside mod to 1.20.4, however there seems to be some issue with the sides aspect. ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> NetworkConstants.IGNORESERVERONLY, (a, b) -> true)); According to the documentation, this code is correct, however it does not compile. Multiple markers at this line -NetworkConstants cannot be resolved to a variable -The constructor IExtensionPoint.DisplayTest(() -> {}, (<no type> a, <no type> b) => {}) is undefined The import net.minecraftforge.network.NetworkConstants cannot be resolved How do I make a 1.20.4 mod clientside only?
December 19, 20231 yr In 1.20.2 the DisplayTest constants were moved inside the DisplayTest record itself for discoverability. In 1.20.4 you can simply set clientSideOnly=true in your mods.toml (just below the modLoader) and Forge should do everything for you as long as you don't manually set a DisplayTest. Refer to 1.20.4's MDK for further details. The clientSideOnly feature prevents your mod file from being loaded on servers and sets a different default DisplayTest when loading your mod on clients. Official Forge Discord server | Support FAQ for players
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.