KubeJS (Old)

KubeJS (Old)

3M Downloads

Cannot register method bindings through resources

ChiefArug opened this issue ยท 1 comments

commented

Minecraft Version

1.19.2

KubeJS Version

dev.latvian.mods:kubejs-forge:1902.6.1-build.236

Rhino Version

rhino-forge-1902.2.2-build.268.jar

Architectury Version

architectury-6.5.85-forge.jar

Forge/Fabric Version

43.2.14

Describe your issue

It tries to get the field first, then the method. But because no field exists with the method signature, the field method throws so it never tries to get to the method

the line from my bindings file:

ALL		$ResourceKey 		net.minecraft.resources.ResourceKey m_135785_(Lnet/minecraft/resources/ResourceKey;Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/resources/ResourceKey

(yes that is a private method, I AT it to public)

Crash report/logs

https://gist.github.com/ChiefArug/00f527ad14f844db0b2e27531659e092

commented

Just for anyone looking at this in the future, this is the format you are supposed to use for methods:

ALL 		$IReallyShouldntBeAccessingThis 	dev.latvian.mods.kubejs.KubeJS getStartupScriptManager

You cannot do it for any methods that have args yet, this just calls the method once without any args and caches that value as the binding.
The issue still exists tho