Majrusz / MajruszLibrary

Library with common code for my Minecraft modifications.
8 stars 5 forks source link

ClassFinder did not find any classes #76

Open Lemin2 opened 7 months ago

Lemin2 commented 7 months ago
Minecraft Version: 1.20.1
Minecraft Version ID: 1.20.1
Operating System: Linux (amd64) version 5.4.0-144-generic
Java Version: 17.0.9, Azul Systems, Inc.
    Forge: net.minecraftforge:47.2.20
    In a modpack which mod's file names are all chinese, and it works fine with minecraft client running on Windows, but always crash while i'm trying to make it run on a linux server. Seems this mod won't recognize filenames in chinese, then throw this exception.
   logs:

crash-2024-02-23_16.32.35-fml.txt latest.log debug.log

VanderCat commented 6 months ago

it seems this library will crash the game if minecraft was launched from another working directory, that is a case on some custom launchers.

so if you try to execute java -cp <mclibs> <fabricMainClass> from any folder but .minecraft (or your launcher alternative) it will fail to find classes in folder.

a solution for this on fabric may be to use FabricLoader.getInstance().getGameDir()+"/mods to get full path. though i'm not sure about this since documentation says something about game's work directory too so it may not work. another solution may be a hacky way to use FabricLoader.getInstance().getConfigDir()+"/../mods"

TDY2012 commented 4 months ago

Same here on Mac M1.

Minecraft Version: 1.20.1
Minecraft Version ID: 1.20.1
Operating System: Mac OS X (aarch64) version 14.5
Java Version: 17.0.8, Microsoft
Forge: net.minecraftforge:47.2.30