Jump to content

Kotori316

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Kotori316

  1. Minecraft 1.17.1, Forge 37.0.2 I'm developing a custom language provider for Scala. I created the jar as the same way as 1.16.5, but Minecraft crashes with this error. NPE happens in the call of SecureJar#name, which calls JarMetadata#name. The default lang loaders(javafml, mclangage, etc.) is provided with SimpleJarMetadata or ModuleJarMetadata, where JarMetadata#name must return valid value. But jars in mods dir have ModJarMetadata. In the class, JarMetadata#name fails if modFile.getModFileInfo() is null. For mod jar(FMLModType is MOD), the field(modFile.modFileInfo) is set in construction but for LANGPROVIDER the field remains null. What I did Created a class that implements `IModLanguageProvider` Made a service provider file at META-INF/services/net.minecraftforge.forgespi.language.IModLanguageProvider It contains the class name that implements `net.minecraftforge.forgespi.language.IModLanguageProvider` Created other classes such as Mod Container, Language Target. Then, I made a jar file. Content of MANIFEST.MF in jar. I know "Main-Class" is not needed for Minecraft. It's for my test. I think "FMLModType" must be "LANGPROVIDER" if I want to create language provider, as the same way in 1.16.5. EDIT: The PR https://github.com/MinecraftForge/MinecraftForge/pull/7947 will solve this problem.
×
×
  • Create New...

Important Information

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