includes does not work with KubeJS Java strings
TheQKnight opened this issue ยท 5 comments
Minecraft Version
1.18.2
KubeJS Version
kubejs-fabric-1802.5.1-build.386.jar
Rhino Version
rhino-fabric-1801.1.9-build.135.jar
Architectury Version
architectury-4.4.54.jar
Forge/Fabric Version
fabric-1801.1.9-build.135
Describe your issue
When using includes from a generated string, such as an id from a block, it does not behave properly
Crash report/logs
No response
This is because the includes check uses sameZero to check if the element matches, which is a strict type check (it returns false if the two are different types). getId() returns a Java String, while making a string with ' returns a Rhino NativeString (I think, at the very least its not a Java String).
Can you check if the issue persists after this commit? The accompanying dev build would be this file
855f425 on the other hand, should've fixed it (confirmed by a tester)

