Skip to content

Commit f291eda

Browse files
PaintNinjaDarkhax
authored andcommitted
Use Forge's clientSideOnly feature
Fixes the crash on dedicated servers and simplifies some code
1 parent 948b150 commit f291eda

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed
Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
11
package net.darkhax.tipsmod;
22

3-
import net.darkhax.bookshelf.api.Services;
43
import net.darkhax.tipsmod.impl.Constants;
5-
import net.minecraftforge.fml.IExtensionPoint;
6-
import net.minecraftforge.fml.ModLoadingContext;
74
import net.minecraftforge.fml.common.Mod;
85

96
@Mod(Constants.MOD_ID)
107
public class TipsModForge {
118

129
public TipsModForge() {
1310

14-
ModLoadingContext.get().registerExtensionPoint(IExtensionPoint.DisplayTest.class, () -> new IExtensionPoint.DisplayTest(() -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (a, b) -> true));
15-
16-
if (Services.PLATFORM.isPhysicalClient()) {
17-
18-
TipsModForgeClient.init();
19-
}
11+
TipsModForgeClient.init();
2012
}
2113
}

forge/src/main/resources/META-INF/mods.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ modLoader = "javafml"
22
loaderVersion = "${forge_version_range}"
33
license = "${mod_license}"
44
issueTrackerURL = "${mod_issues}"
5+
clientSideOnly = true
56

67
[[mods]]
78
modId = "${mod_id}"
8-
displayTest="IGNORE_ALL_VERSION"
99
updateJSONURL="https://updates.blamejared.com/get?n=${mod_id}&gv=${minecraft_version}"
1010
version = "${file.jarVersion}"
1111
displayName = "${mod_name}"

0 commit comments

Comments
 (0)