Jump to content

Minecraft Mod Error "The mod file <directory> has mods not found"


Unknown_Sensei

Recommended Posts

When I build my mod and then start the game the game runs but shows this error "The mod file <my directory> has mods not found"

I looked and looked and could not find an answer please help me.

 

Here is the log:

[25Nov2023 18:28:21.139] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 5, --assetsDir, /Users/johnmccallum/.gradle/caches/forge_gradle/assets, --gameDir, ., --fml.forgeVersion, 47.2.0, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412]
[25Nov2023 18:28:21.142] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9+10.0.9+main.dcd20f30 starting: java version 17.0.7 by Oracle Corporation; OS Mac OS X arch aarch64 version 14.1
[25Nov2023 18:28:21.257] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow
[25Nov2023 18:28:21.478] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6
[25Nov2023 18:28:21.607] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.5
[25Nov2023 18:28:21.622] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.4
[25Nov2023 18:28:21.632] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.3
[25Nov2023 18:28:21.645] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.2
[25Nov2023 18:28:21.660] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.1
[25Nov2023 18:28:21.687] [main/INFO] [EARLYDISPLAY/]: Requested GL version 4.1 got version 4.1
[25Nov2023 18:28:22.014] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/Users/johnmccallum/.gradle/caches/modules-2/files-2.1/org.spongepowered/mixin/0.8.5/9d1c0c3a304ae6697ecd477218fa61b850bf57fc/mixin-0.8.5.jar%23121!/ Service=ModLauncher Env=CLIENT
[25Nov2023 18:28:22.421] [pool-2-thread-1/INFO] [EARLYDISPLAY/]: GL info: Apple M1 GL version 4.1 Metal - 88, Apple
[25Nov2023 18:28:22.629] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /Users/johnmccallum/.gradle/caches/modules-2/files-2.1/net.minecraftforge/javafmllanguage/1.20.1-47.2.0/7f9181f85acc66547685a72020713fc8cbde98/javafmllanguage-1.20.1-47.2.0.jar is missing mods.toml file
[25Nov2023 18:28:22.631] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /Users/johnmccallum/.gradle/caches/modules-2/files-2.1/net.minecraftforge/lowcodelanguage/1.20.1-47.2.0/7872f5205685fdd26fae39b1be79b0e60ca5b7bd/lowcodelanguage-1.20.1-47.2.0.jar is missing mods.toml file
[25Nov2023 18:28:22.634] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /Users/johnmccallum/.gradle/caches/modules-2/files-2.1/net.minecraftforge/mclanguage/1.20.1-47.2.0/d501d161cabed08b3c139a2c6217b02a39f3c3e9/mclanguage-1.20.1-47.2.0.jar is missing mods.toml file
[25Nov2023 18:28:22.636] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /Users/johnmccallum/.gradle/caches/modules-2/files-2.1/net.minecraftforge/fmlcore/1.20.1-47.2.0/ffd3c6debac0a388c9e33ac43c9f5eafb91cb466/fmlcore-1.20.1-47.2.0.jar is missing mods.toml file
[25Nov2023 18:28:22.711] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: No dependencies to load found. Skipping!
[25Nov2023 18:28:24.133] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclientuserdev' with arguments [--version, MOD_DEV, --gameDir, ., --assetsDir, /Users/johnmccallum/.gradle/caches/forge_gradle/assets, --assetIndex, 5]
[25Nov2023 18:28:28.243] [Datafixer Bootstrap/INFO] [com.mojang.datafixers.DataFixerBuilder/]: 188 Datafixer optimizations took 125 milliseconds
[25Nov2023 18:28:29.670] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResourcesBuilder/]: Assets URL 'union:/Users/johnmccallum/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.20.1-47.2.0_mapped_official_1.20.1/forge-1.20.1-47.2.0_mapped_official_1.20.1-recomp.jar%23184!/assets/.mcassetsroot' uses unexpected schema
[25Nov2023 18:28:29.671] [Render thread/WARN] [net.minecraft.server.packs.VanillaPackResourcesBuilder/]: Assets URL 'union:/Users/johnmccallum/.gradle/caches/forge_gradle/minecraft_user_repo/net/minecraftforge/forge/1.20.1-47.2.0_mapped_official_1.20.1/forge-1.20.1-47.2.0_mapped_official_1.20.1-recomp.jar%23184!/data/.mcassetsroot' uses unexpected schema
[25Nov2023 18:28:29.683] [Render thread/INFO] [com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService/]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[25Nov2023 18:28:29.687] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[25Nov2023 18:28:29.741] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.3.1 build 7
[25Nov2023 18:28:30.006] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: File /Users/johnmccallum/Documents/Cockroach Mod/build/resources/main constructed 0 mods: [], but had 1 mods specified: [cockroach]
[25Nov2023 18:28:30.006] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: The following classes are missing, but are reported in the mods.toml: [cockroach]
[25Nov2023 18:28:30.006] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: The following mods are missing, but have classes in the jar: []
[25Nov2023 18:28:30.006] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/CORE]: Failed to initialize mod containers

 

Link to comment
Share on other sites

So this might be your problem give it a go.   

 

The error message "The mod file <directory> has mods not found" indicates that the mod file is missing a mods.toml file,

which is required for Forge to load the mod. The mods.toml file contains information about the mod, such as its name, version, and dependencies.

 

To fix this error, you need to create a mods.toml file for your mod.

The mods.toml file should be placed in the same directory as your mod's JAR file.

The contents of the mods.toml file will vary depending on your mod, but it should at least include the following information

modid = <your mod id>
name = <your mod name>
version = <your mod version>

For example, if your mod is called "Cockroach Mod" and its version is 1.0.0, your mods.toml file would look like this:

modid = cockroach
name = Cockroach Mod
version = 1.0.0

Once you have created a mods.toml file, you should be able to load your mod without seeing the "The mod file <directory> has mods not found" error message.

Link to comment
Share on other sites

Thanks this worked but my mod did not add the entity Cockroach

File Directory Image:

Package:

 

Edited by Unknown_Sensei
Forgot to do add
Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • It's not only with storage drawers, but in create: Deco too with these mods we added create: deco and inventory sorter (by cpw) these 3 were all recently we play in 1.20.1
    • You should post full logs to show the big picture.   Does it work without Optifine?
    • I play with my friends on a shared world with essential mod, but recently we added storage drawers an the blocs of it show random blocs. Can someone help me? In the following image, the walls are oak drawers and the birch drwaer is the drawer controller. https://ibb.co/wKfBvtF
    • The error code shows that i have outdated mods, but only coFH core crashes my game and it's not outdated + i double checked and its on the right version of forge. -- Head -- Thread: Render thread Stacktrace:     at cofh.core.client.PostEffect.m_6213_(PostEffect.java:80) ~[cofh_core-1.20.1-11.0.2.56.jar%23218!/:11.0.2] {re:mixin,re:classloading}     at cofh.core.client.PostBuffer.m_6213_(PostBuffer.java:96) ~[cofh_core-1.20.1-11.0.2.56.jar%23218!/:11.0.2] {re:classloading}     at net.minecraft.server.packs.resources.ResourceManagerReloadListener.m_10759_(ResourceManagerReloadListener.java:15) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:computing_frames,re:classloading,re:mixin}     at java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[?:?] {}     at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}     at net.minecraft.server.packs.resources.SimpleReloadInstance.m_143940_(SimpleReloadInstance.java:69) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:classloading}     at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default}     at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:mixin,re:computing_frames,re:classloading}     at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:computing_frames,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default} -- Overlay render details -- Details:     Overlay name: net.minecraftforge.client.loading.ForgeLoadingOverlay Stacktrace:     at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:1385) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:mixin,pl:accesstransformer:B,xf:OptiFine:default,re:classloading,pl:accesstransformer:B,xf:OptiFine:default,pl:mixin:APP:moonlight-common.mixins.json:GameRendererMixin,pl:mixin:APP:supplementaries-common.mixins.json:GameRendererMixin,pl:mixin:APP:mixins.cofhcore.json:GameRendererMixin,pl:mixin:APP:create.mixins.json:accessor.GameRendererAccessor,pl:mixin:APP:create.mixins.json:client.GameRendererMixin,pl:mixin:A}     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1146) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23267!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:218) ~[1.20.1-forge-47.3.0.jar:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.3.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.3.0.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.3.0.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at crystallauncher.MinecraftConstructor.run(MinecraftConstructor.java:29) ~[proxyserver.jar%2380!/:?] {}     at crystallauncher.MineClient.start(MineClient.java:201) ~[proxyserver.jar%2380!/:?] {}     at crystallauncher.MineClient.main(MineClient.java:42) ~[proxyserver.jar%2380!/:?] {}
  • Topics

×
×
  • Create New...

Important Information

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