mega12345mega / NBT-Editor

Edit items, blocks, and entities in-game.
MIT License
31 stars 9 forks source link

Crash on launch with Lunar Client #82

Closed Rattlyy closed 5 months ago

Rattlyy commented 5 months ago

PSA: Using Lunar Client

[2024-01-28 00:32:48.595] [info]  java.lang.ExceptionInInitializerError
[2024-01-28 00:32:48.596] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.util.Enchants.addEnchant(Enchants.java:92)
[2024-01-28 00:32:48.596] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.util.Enchants.checkCap(Enchants.java:36)
[2024-01-28 00:32:48.596] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.NBTEditorClient.onInitializeClient(NBTEditorClient.java:50)
[2024-01-28 00:32:48.596] [info]    at com.moonsworth.lunar.ichor.CICORHHIIHHRHIOCCCICCHIRR.HOCHRRHCRRROICHHHCHIIIIOH.CCHIOIIRRIICCHROOHHIHRHCC(Unknown Source)
[2024-01-28 00:32:48.596] [info]    at com.moonsworth.lunar.ichor.RRHOIIICRICROOIIHCIOCRCHR.CCHIOIIRRIICCHROOHHIHRHCC(Unknown Source)
[2024-01-28 00:32:48.596] [info]    at Genesis//net.minecraft.client.Minecraft.md08c925$lambda$ichor$fabric$clientInitializer$0$5(SourceFile:7853)
[2024-01-28 00:32:48.596] [info]    at java.base/java.util.Optional.ifPresentOrElse(Unknown Source)
[2024-01-28 00:32:48.597] [info]    at Genesis//net.minecraft.client.Minecraft.handler$zol000$ichor$fabric$clientInitializer(SourceFile:7851)
[2024-01-28 00:32:48.597] [info]    at Genesis//net.minecraft.client.Minecraft.<init>(SourceFile:450)
[2024-01-28 00:32:48.597] [info]    at Genesis//net.minecraft.client.main.Main.redirect$zbd000$impl$main$minecraft(SourceFile:639)
[2024-01-28 00:32:48.597] [info]    at Genesis//net.minecraft.client.main.Main.main(SourceFile:223)
[2024-01-28 00:32:48.597] [info]    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-01-28 00:32:48.597] [info]    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[2024-01-28 00:32:48.598] [info]    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[2024-01-28 00:32:48.598] [info]    at java.base/java.lang.reflect.Method.invoke(Unknown Source)
[2024-01-28 00:32:48.598] [info]    at com.moonsworth.lunar.genesis.Genesis.main(Unknown Source)
[2024-01-28 00:32:48.598] [info]  Caused by: java.lang.RuntimeException: Error getting class
[2024-01-28 00:32:48.598] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.multiversion.Reflection.getClass(Reflection.java:27)
[2024-01-28 00:32:48.598] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.multiversion.MVRegistry.<clinit>(MVRegistry.java:38)
[2024-01-28 00:32:48.599] [info]    ... 16 more
[2024-01-28 00:32:48.599] [info]  Caused by: java.util.concurrent.ExecutionException: java.lang.ClassNotFoundException: net/minecraft/core/Registry
[2024-01-28 00:32:48.599] [info]    at Genesis//com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:592)
[2024-01-28 00:32:48.599] [info]    at Genesis//com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:551)
[2024-01-28 00:32:48.599] [info]    at Genesis//com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:111)
[2024-01-28 00:32:48.599] [info]    at Genesis//com.google.common.util.concurrent.Uninterruptibles.getUninterruptibly(Uninterruptibles.java:247)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2346)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2314)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2190)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2080)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.google.common.cache.LocalCache.get(LocalCache.java:4012)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4922)
[2024-01-28 00:32:48.600] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.multiversion.Reflection.getClass(Reflection.java:25)
[2024-01-28 00:32:48.601] [info]    ... 17 more
[2024-01-28 00:32:48.601] [info]  Caused by: java.lang.ClassNotFoundException: net/minecraft/core/Registry
[2024-01-28 00:32:48.601] [info]    at java.base/java.lang.Class.forName0(Native Method)
[2024-01-28 00:32:48.601] [info]    at java.base/java.lang.Class.forName(Unknown Source)
[2024-01-28 00:32:48.601] [info]    at Genesis//com.luneruniverse.minecraft.mod.nbteditor.multiversion.Reflection.lambda$getClass$0(Reflection.java:25)
[2024-01-28 00:32:48.601] [info]    at Genesis//com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4927)
[2024-01-28 00:32:48.601] [info]    at Genesis//com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3571)
[2024-01-28 00:32:48.602] [info]    at Genesis//com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2313)
[2024-01-28 00:32:48.602] [info]    ... 22 more
Rattlyy commented 5 months ago

Looks like mappings.mapClassName("intermediary", name) doesn't really work on Lunar

mega12345mega commented 5 months ago

Unfortunately, due to how Lunar Client attempts to support Fabric and Forge mods simultaneously, its not going to work well with how I've designed the multiversion package. The mapping thing you mentioned does seem to be related - though instead of completely failing like I would have expected, it returned a different mapping: net/minecraft/core/Registry, which apparently doesn't exist. Since this would be very difficult to solve, and I don't get the impression that most of the users are super interested in running this with Lunar Client, I don't think it is worth the effort. Not to mention, the fact that it seems to be closed source would greatly hinder fixing this even more. Sorry.

Rattlyy commented 5 months ago

@mega12345mega I have opened a ticket on the Lunar Client support, and I'll get in touch with them with fixing this issue. Sorry if I wasted your time :)