Jump to content

Recommended Posts

Posted

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

 

Posted

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.

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.

Announcements



×
×
  • Create New...

Important Information

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