Bookshelf

Bookshelf

230M Downloads

[1.12.2] 2022 Edition: IllegalAccessError on startup when adding Bookshelf as a dependency through Gradle

Moose1002 opened this issue ยท 1 comments

commented

Basically identical to #141, trying to add Bookshelf as a dependency with Gradle for Minecraft 1.12.2 but it throws this error. I've looked at the other 3 issues that have this same crash and none of the solutions work, or appear to be outdated (deobfprovided isn't a valid method anymore) and such. Just wanted to know if there has been any fix to this, or if it's just a silly mistake I'm making.

This is my build.gradle where the dependency is declared:

repositories {
    maven {
        url "https://cursemaven.com"
    }

    maven {
        url 'https://maven.blamejared.com'
    }
}

dependencies {
    // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
    // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
    // The userdev artifact is a special name and will get all sorts of transformations applied to it.
    minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2860'

    compile "curse.maven:states-297158:3760719"
    compile "curse.maven:fcl-250923:3942206"
    compile "curse.maven:fsmm-232945:3477565"

    compile "net.darkhax.gamestages:GameStages-1.12.2:2.0.123"
    compile fg.deobf("net.darkhax.bookshelf:Bookshelf-1.12.2:2.3.590")
}

And here is the crash itself:

net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Bookshelf (bookshelf)
Caused by: java.lang.IllegalAccessError: tried to access field net.minecraft.client.resources.I18n.i18nLocale from class net.darkhax.bookshelf.client.RomanNumerals
	at net.darkhax.bookshelf.client.RomanNumerals.mapLevels(RomanNumerals.java:50)
	at net.darkhax.bookshelf.client.RomanNumerals.insertRomanNumerals(RomanNumerals.java:43)
	at net.darkhax.bookshelf.Bookshelf.onLoadComplete(Bookshelf.java:133)
	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.GeneratedMethodAccessor9.invoke(Unknown Source)
	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:757)
	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)


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_341, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 923897752 bytes (881 MB) / 1141374976 bytes (1088 MB) up to 7609516032 bytes (7257 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: MCP 9.42 Powered by Forge 14.23.5.2860 12 mods loaded, 12 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                                |
	|:------ |:------------ |:------------ |:------------------------------------------------------------------ |:---------------------------------------- |
	| LCHIJA | minecraft    | 1.12.2       | minecraft.jar                                                      | None                                     |
	| LCHIJA | mcp          | 9.42         | minecraft.jar                                                      | None                                     |
	| LCHIJA | FML          | 8.0.99.99    | forge-1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12-recomp.jar | None                                     |
	| LCHIJA | forge        | 14.23.5.2860 | forge-1.12.2-14.23.5.2860_mapped_snapshot_20171003-1.12-recomp.jar | None                                     |
	| LCHIJA | projecttowny | 0.3          | main                                                               | None                                     |
	| LCHIJA | fcl          | 1.12.76      | fcl-250923-3942206.jar                                             | None                                     |
	| LCHIJA | states       | @VERSION@    | states-297158-3760719.jar                                          | None                                     |
	| LCHIJA | frl          | 1.1          | fcl-250923-3942206.jar                                             | None                                     |
	| LCHIJA | tmt          | 1.14         | fcl-250923-3942206.jar                                             | None                                     |
	| LCHIJA | fsmm         | 2.5.1        | fsmm-232945-3477565.jar                                            | None                                     |
	| LCHIJE | bookshelf    | 2.3.590      | bookshelf-228525-2836960.jar                                       | d476d1b22b218a10d845928d1665d45fce301b27 |
	| LCHIJ  | gamestages   | 2.0.123      | gamestages-268655-2951840.jar                                      | d476d1b22b218a10d845928d1665d45fce301b27 |

	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 512.15' Renderer: 'NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2'
	States Crash Hook: No webhook active.

Any help with it would be awesome, I've tried to figure out a solution and have come to a deadend. Thanks

commented

ForgeGradle has gone through many revisions and the old Gradle examples are not compatible with the newer versions. The actual issue here is that access transformers of dependencies are not being properly applied. 1.12.2 is has not been supported for several years now and I do not have the answer or an example to make this work. You will have better luck finding a legacy support channel on Discord and asking them for information.