Commit 013964c 1 parent 11ac1d0 commit 013964c Copy full SHA for 013964c
File tree 2 files changed +11
-3
lines changed
src/main/java/com/railwayteam/railways/util/forge
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ dependencies {
146
146
}
147
147
148
148
compileOnly(" io.github.llamalad7:mixinextras-common:${ mixin_extras_version} " )
149
- implementation(annotationProcessor(" io.github.llamalad7:mixinextras-forge:${ mixin_extras_version} " ))
149
+ include( implementation(annotationProcessor(" io.github.llamalad7:mixinextras-forge:${ mixin_extras_version} " ) ))
150
150
}
151
151
152
152
processResources {
Original file line number Diff line number Diff line change 11
11
import net .minecraftforge .api .distmarker .OnlyIn ;
12
12
import net .minecraftforge .common .MinecraftForge ;
13
13
import net .minecraftforge .event .level .ChunkEvent ;
14
- import net .minecraftforge .fml .ModList ;
15
14
import net .minecraftforge .fml .loading .FMLLoader ;
16
15
import net .minecraftforge .fml .loading .FMLPaths ;
16
+ import net .minecraftforge .fml .loading .LoadingModList ;
17
+ import net .minecraftforge .fml .loading .moddiscovery .ModInfo ;
17
18
import net .minecraftforge .network .PacketDistributor ;
18
19
import org .jetbrains .annotations .Nullable ;
19
20
20
21
import java .nio .file .Path ;
22
+ import java .util .List ;
21
23
22
24
public class UtilsImpl {
23
25
public static boolean isModLoaded (String id , @ Nullable String fabricId ) {
24
- return ModList .get ().isLoaded (id );
26
+ List <ModInfo > mods = LoadingModList .get ().getMods ();
27
+ for (ModInfo mod : mods ) {
28
+ if (mod .getModId ().equals (id )) {
29
+ return true ;
30
+ }
31
+ }
32
+ return false ;
25
33
}
26
34
27
35
public static Path configDir () {
You can’t perform that action at this time.
0 commit comments