HammerLib

HammerLib

37M Downloads

Error: java.lang.NullPointerException: Cannot read field "internal" because the return value of "org.zeith.hammerlib.api.config.ConfigHolder.getCurrent()" is null

blizzard4591 opened this issue ยท 6 comments

commented

Dear Maintainer(s),

since today I get a crash when loading 1.18.1 with Forge 39.0.88 and HammerLib:

The game crashed whilst rendering overlay
Error: java.lang.NullPointerException: Cannot read field "internal" because the return value of "org.zeith.hammerlib.api.config.ConfigHolder.getCurrent()" is null
Exit Code: -1

Extended Log:

---- Minecraft Crash Report ----
// There are four lights!

Time: 2/27/22, 9:50 PM
Description: Rendering overlay

java.lang.NullPointerException: Cannot read field "internal" because the return value of "org.zeith.hammerlib.api.config.ConfigHolder.getCurrent()" is null
	at org.zeith.hammerlib.HammerLib.postEvent(HammerLib.java:199) ~[HammerLib-1.18.1-18.1.11.jar%2361!/:18.1.11] {re:mixin,re:classloading}
	at net.minecraft.client.resources.model.ModelBakery.handler$zbd000$injectProcessLoading(ModelBakery.java:681) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.hammerlib.json:client.ModelBakeryMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.resources.model.ModelBakery.processLoading(ModelBakery.java) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.hammerlib.json:client.ModelBakeryMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraftforge.client.model.ForgeModelBakery.<init>(ForgeModelBakery.java:75) ~[forge-1.18.1-39.0.88-universal.jar%2386!/:?] {re:classloading}
	at net.minecraft.client.resources.model.ModelManager.m_5944_(ModelManager.java:57) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.client.resources.model.ModelManager.m_5944_(ModelManager.java:20) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10786_(SimplePreparableReloadListener.java:11) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading}
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] {}
	at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] {}
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}


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

-- Head --
Thread: Render thread
Stacktrace:
	at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:878) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:tombstone.mixins.json:GameRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}
-- Overlay render details --
Details:
	Overlay name: net.minecraft.client.gui.screens.LoadingOverlay
Stacktrace:
	at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:878) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:tombstone.mixins.json:GameRendererMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1041) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:661) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.1-20211210.034407-srg.jar%2382!/:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:45) ~[fmlloader-1.18.1-39.0.88.jar%2323!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.0.jar%235!/:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}


-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: No
	Packs: Default

Any idea what the issue could be?

commented

This issue seems to be related to the most recent update of https://www.curseforge.com/minecraft/mc-mods/just-enough-resources-jer, since JustEnoughResources-1.18.1-0.13.2.153.jar works, but the latest produces the error above.

commented

Hi, I had the same error but it was solved by updating Forge. In my case I added PneumaticCraft and it wouldn't work, spitting the same error you have. The screen would look like this:
image
And looking in the PneumaticCraft's metadata, you could see this:

[[dependencies.pneumaticcraft]]
    modId="forge" #mandatory
    mandatory=true #mandatory
    versionRange="[39.1.0,)" #mandatory
    ordering="NONE"
    side="BOTH"
[[dependencies.pneumaticcraft]]
    modId="minecraft"
    mandatory=true
    versionRange="[1.18.1, 1.18.2)"
    ordering="NONE"
    side="BOTH"

I was running Forge 39.0.79 which didn't work. Updating to Forge 39.1.2 solved the loading issue. Not sure if it's something the dragon-forge team can fix though, speaking about the error in the log.
Anyways here's the log and versions in case that's helpful to the devs:
https://paste.feed-the-beast.com/view/553701a0
HammerLib-1.18.1-18.1.11.jar
SolarFluxReborn-1.18.1-18.1.3.jar
Minecraft 1.18.1
Forge 39.0.79

Add pneumaticcraft-repressurized-1.18.1-3.0.0-53.jar (https://www.curseforge.com/minecraft/mc-mods/pneumaticcraft-repressurized/files/3680737), you'll get the same weird screen I got on load.
Update Forge to 39.1.0+ and suddenly it works and HammerLib no longer throws that error.
I hope that helps and cheers

commented

Thanks, I tried that and updated Forge, but I still get the same error.

commented

I can't help much sorry but make sure you updated JEI as well then. Here's what JER 154 did:
image
And if you're using CurseForge to make your pack, make sure you're on Beta and not Recommended, otherwise that JEI 9.4 update won't show up, which could likely be why you're getting a load error when updating JER past 153.
image

commented

Thank you, that was the actual problem, I did not know about that!
Fixed, closing.

commented

Im getting this erorr despite being on latest 1.18.1 JEI and latest JER w/ latest hammerlib & solarfluxreborn
https://pastebin.com/iMqTNnHi