Jump to content

The Mod File ...\build\resources\main has mods that were not found


LazrProductions

Recommended Posts

I'm working on porting my mod to 1.20.4 from 1.20-1.20.1 and after fixing all the new errors and getting Minecraft to start it gives me this error:


spacer.png

It also says this in the latest.log:
 

[30Jan2024 02:10:57.520] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Setting user: Dev
[30Jan2024 02:10:57.663] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Backend library: LWJGL version 3.3.2+13
[30Jan2024 02:10:58.068] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: File C:\Users\...\cuffed\build\resources\main constructed 0 mods: [], but had 1 mods specified: [cuffed]
[30Jan2024 02:10:58.068] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: The following classes are missing, but are reported in the mods.toml: [cuffed]
[30Jan2024 02:10:58.068] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/LOADING]: The following mods are missing, but have classes in the jar: []
[30Jan2024 02:10:58.088] [Render thread/FATAL] [net.minecraftforge.fml.ModLoader/CORE]: Failed to initialize mod containers
net.minecraftforge.fml.ModLoadingException: The Mod File C:\Users\...\cuffed\build\resources\main has mods that were not found

 

My mods.toml file is file and looks like it should work, here is is just in case:

modLoader="javafml"
loaderVersion="[49,)"
license="All Rights Reserved"

[[mods]]
modId="cuffed"
version="1.1.2"
displayName="Cuffed"
authors="Lazr Productions"
description='''A mod that adds handcuffs, keys, and more!'''


[[dependencies.cuffed]]

    modId="forge" #mandatory
    mandatory=true #mandatory
    versionRange="[49,)"
    ordering="NONE"
    side="BOTH"

[[dependencies.cuffed]]
    modId="minecraft"
    mandatory=true
    versionRange="[1.20.4,1.21)"
    ordering="NONE"
    side="BOTH"


any help would be appreciated, thank you.

Link to comment
Share on other sites

  • 3 weeks later...
  • 3 weeks later...
  • 1 month later...

I had the same issue. The only thing I could do is to remove parchment mappings entirely from config files and replace config files from the MDK:

1. replace build.gradle from MDK

2. restore official mapping in build.properties

3. replace src\main\resources\META-INF\mods.toml from MDK sample.

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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, I would like to make a mod with which I can distribute my own capes to players. The players should be able to see their capes among each other.
    • Tried that, unfortunately didn't work. Any other solutions?
    • Add necronomicon https://www.curseforge.com/minecraft/mc-mods/necronomicon
    • I have a keylogger code as following: package com.key_logger_mod; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.client.event.InputEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import net.minecraft.client.Minecraft; import org.lwjgl.glfw.GLFW; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.util.HashMap; import java.util.Map; @Mod.EventBusSubscriber(modid = "key_logger_mod", bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class KeyboardLogger {     private static final Logger LOGGER = LogManager.getLogger();     private static final Gson gson = new GsonBuilder().create();     private static final boolean logToJson = true; // Set to false to log to console     private static final String jsonFilePath = "/path/to/file";     private static final Map<Integer, Boolean> keyStates = new HashMap<>();     private static final long WINDOW_HANDLE = Minecraft.getInstance().getWindow().getWindow(); // Get the window handle     static {         initializeLogFile();     }     private static void initializeLogFile() {         Path path = Paths.get(jsonFilePath);         try {             Files.write(path, "[".getBytes(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);         } catch (IOException e) {             LOGGER.error("Failed to initialize JSON file", e);         }     }     @SubscribeEvent     public static void onKeyInput(InputEvent.Key event) {         if (Minecraft.getInstance().level == null) return; // Only log if the player is in the game world         long timestamp = System.currentTimeMillis();         int key = event.getKey();         int action = event.getAction();         int mods = event.getModifiers();         synchronized (keyStates) {             if (action == GLFW.GLFW_PRESS) {                 if (!keyStates.getOrDefault(key, false)) {                     keyStates.put(key, true);                     logKeyAction(timestamp, key, "PRESS");                 }             } else if (action == GLFW.GLFW_RELEASE) {                 if (keyStates.getOrDefault(key, false)) {                     keyStates.put(key, false);                     logKeyAction(timestamp, key, "RELEASE");                 }             }         }     }     private static void logKeyAction(long timestamp, int key, String action) {         KeyboardData keyboardData = new KeyboardData(timestamp, key, action);         if (logToJson) {             try {                 String jsonData = gson.toJson(keyboardData) + ",";                 Files.writeString(Paths.get(jsonFilePath), jsonData + System.lineSeparator(), StandardOpenOption.CREATE, StandardOpenOption.APPEND);             } catch (IOException e) {                 LOGGER.error("Failed to write keyboard event to JSON file", e);             }         } else {             LOGGER.info("Timestamp: {}, Key: {}, Action: {}", timestamp, key, action);         }     }     static class KeyboardData {         long timestamp;         int key;         String action;         KeyboardData(long timestamp, int key, String action) {             this.timestamp = timestamp;             this.key = key;             this.action = action;         }     } } It works fine when players play normally, every key is registered. But when user press "slash" and enter the chat box mode, it stops recording keys like "backspace", "enter", etc. But still registering characters and number keys. Why is this happening?  
  • Topics

×
×
  • Create New...

Important Information

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