-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Some ASM methods are not usable without access to some Java types #26
Comments
As far as I can tell, this is a major problem, preventing several major mods, including AppleCore and Iguana Tweaks Reborn from being fully ported over to 1.15. |
Actually the features required from AppleCore are for porting Hunger Ovehaul. |
squeek502
added a commit
to squeek502/ASMHelper
that referenced
this issue
Feb 7, 2021
squeek502
added a commit
to squeek502/AppleCore
that referenced
this issue
Feb 7, 2021
This is what I had before I stopped working on it when blocked by MinecraftForge/CoreMods#26.
GirafiStudios
pushed a commit
to squeek502/ASMHelper
that referenced
this issue
Feb 7, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Methods like
AbstractInsnNode.clone(Map<LabelNode, LabelNode> clonedLabels)
cannot be called from Nashorn without usingJava.type("java.util.HashMap")
or some otherMap
type, butCoreModEngine
does not allow access tojava.util.HashMap
(Java.type("java.util.HashMap")
fails withjava.lang.ClassNotFoundException: java.util.HashMap
).As far as I can tell, Javascript objects in Nashorn are
Map
s, but only supportString
keys. Doing something likewill give an error like:
key should be a String. It is org.objectweb.asm.tree.LabelNode instead. java.lang.ClassCastException: key should be a String. It is org.objectweb.asm.tree.LabelNode instead. at jdk.nashorn.api.scripting.ScriptObjectMirror.checkKey(ScriptObjectMirror.java:884) at jdk.nashorn.api.scripting.ScriptObjectMirror.get(ScriptObjectMirror.java:381) at org.objectweb.asm.tree.LabelNode.clone(LabelNode.java:73) at jdk.nashorn.internal.scripts.Script$Recompilation$5$18587A$\^eval\_.ASMHelper#cloneInsnList(<eval>:453) at jdk.nashorn.internal.scripts.Script$Recompilation$1$909$\^eval\_.initializeCoreMod(<eval>:58) at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
The text was updated successfully, but these errors were encountered: