Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caused by: java.lang.NoClassDefFoundError: ain #4262

Closed
FADE365 opened this issue Jan 30, 2024 · 2 comments
Closed

Caused by: java.lang.NoClassDefFoundError: ain #4262

FADE365 opened this issue Jan 30, 2024 · 2 comments
Labels
question Further information is requested

Comments

@FADE365
Copy link

FADE365 commented Jan 30, 2024

Some information

Operating system: windows 10
Java version: java 8 1.8.0_372
Minecraft version: 1.12.2
Baritone version: baritone-api-forge-1.2.19
Other mods (if used):

Exception, error or logs

`
---- Minecraft Crash Report ----
// Don't do that.

Time: 1/30/24 2:57 AM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from RPGClient Mod (rpg)
Caused by: java.lang.NoClassDefFoundError: ain
at baritone.api.Settings.(Unknown Source)
at baritone.api.BaritoneAPI.(Unknown Source)
at com.example.examplemod.Module.MOVEMENT.AutoWalk.stopWalking(AutoWalk.java:38)
at com.example.examplemod.Module.MOVEMENT.AutoWalk.onDisable(AutoWalk.java:20)
at com.example.examplemod.Module.Module.setToggled(Module.java:80)
at com.example.examplemod.Module.ModSettings.startClient(ModSettings.java:68)
at com.example.examplemod.ExampleMod.init(ExampleMod.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:639)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:219)
at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
at com.google.common.eventbus.EventBus.post(EventBus.java:217)
at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:136)
at net.minecraftforge.fml.common.Loader.initializeMods(Loader.java:749)
at net.minecraftforge.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:336)
at net.minecraft.client.Minecraft.init(Minecraft.java:535)
at net.minecraft.client.Minecraft.run(Minecraft.java:378)
at net.minecraft.client.main.Main.main(Main.java:118)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at net.minecraftforge.legacydev.Main.start(Main.java:86)
at net.minecraftforge.legacydev.MainClient.main(MainClient.java:29)
Caused by: java.lang.ClassNotFoundException: ain
at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 54 more
Caused by: java.lang.NullPointerException

A detailed walkthrough of the error, its code path and all known details is as follows:

-- System Details --
Details:
Minecraft Version: 1.12.2
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_372, Amazon.com Inc.
Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Amazon.com Inc.
Memory: 555771592 bytes (530 MB) / 749731840 bytes (715 MB) up to 3668967424 bytes (3499 MB)
JVM Flags: 0 total;
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP 9.42 Powered by Forge 14.23.5.2859 5 mods loaded, 5 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored

| State | ID        | Version      | Source                                                             | Signature |
|:----- |:--------- |:------------ |:------------------------------------------------------------------ |:--------- |
| LCHI  | minecraft | 1.12.2       | minecraft.jar                                                      | None      |
| LCHI  | mcp       | 9.42         | minecraft.jar                                                      | None      |
| LCHI  | FML       | 8.0.99.99    | forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12-recomp.jar | None      |
| LCHI  | forge     | 14.23.5.2859 | forge-1.12.2-14.23.5.2859_mapped_snapshot_20171003-1.12-recomp.jar | None      |
| LCHE  | rpg       | 3.9.1        | main                                                               | None      |

Loaded coremods (and transformers): 
GL info: ' Vendor: 'ATI Technologies Inc.' Version: '4.6.0 Compatibility Profile Context 23.3.1.230305' Renderer: 'AMD Radeon(TM) Graphics'

`

How to reproduce

  1. git clone git@github.com:FADE365/RPG-Client.git
  2. Uncomment class in com/example/examplemod/Module/MOVEMENT/AutoWalk.java
  3. Uncomment line 71 in com/example/examplemod/Client.java
  4. Start runClient
  5. OpenClickGui [SHIFT]
  6. Open Movement and turn on [AutoWalk]

Modified settings

not

@FADE365 FADE365 added the bug Something isn't working label Jan 30, 2024
@FADE365 FADE365 changed the title Please add a brief but descriptive title Caused by: java.lang.NoClassDefFoundError: ain Jan 30, 2024
@ZacSharp ZacSharp added question Further information is requested and removed bug Something isn't working labels Jan 30, 2024
@ZacSharp
Copy link
Collaborator

That's a setup problem on your side. Baritone for 1.12.2 uses obfuscated Minecraft names and runClient uses whatever you are using in your workspace (mcp snapshot 20171003-1.12) so you can't just use the standard Baritone jar in a development environment (in production it works because then Baritone is remapped by Forge, unless you classload it the wrong way).
To use Baritone in development you can either give up runClient or build yourself a srg mapped jar and use it like any other dependency, or you use a build using the same mappings as your workspace (e.g. this one #3855 (comment) uses mcp stable 39, which might or might not work with your setup)

@FADE365
Copy link
Author

FADE365 commented Jan 31, 2024

Ok thanks 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants