#unsure how to access datamaps from KJS

1 messages · Page 1 of 1 (latest)

finite lotus
#

I've got a mod for my modpack that registers it's own datamap and defines some of its own entries.

What I would like to do is to iterate over the entries of that datamap from KubeJS, so that way I can apply tooltips to the items in the map based on the contents of the entry.

I'm assuming this is actually absurdly simple, but I can't find any documentation on KJS+datamaps anywhere so I don't really know where to start other than by just doing a bunch of Java.loadClass, at which point I could just do it in my mod instead.

copper vaultBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

finite lotus
#

okay so i'm still wondering what the "correct" way of doing this is, but i was able to just get away with doing a mild amount of loadClass shenanigans

finite lotus
#

okay so this didn't work as well as i initially thought

#

it works as expected when the /reload command has been run

#

however when loading into a world it does not work because the event seemingly gets fired before the datamap exists