CreateSifter.registerMesh() not available in KubeJS scripts
tymewizard opened this issue Β· 1 comments
Describe the Bug
Hi! π I'm using the latest version of CreateSifter with KubeJS on Minecraft 1.20.1, and I see that the KubeJS plugin (KubeJSCreatesifterPlugin) loads successfully.
However, the CreateSifter.registerMesh(...) method mentioned in your README isn't accessible from any script. Neither CreateSifter, global.createsifter, nor any other exposed object is available in the global scope.
It looks like the plugin class isnβt exporting a JavaScript-accessible object. Could you please add something like this to expose the interface?
Reproduction Steps
1.Try to add shaped crafting to custom mesh
2.
3.
...
Expected Result
This would allow us to call registerMesh() in startup_scripts as shown in your documentation.
Thanks for the awesome mod β really enjoying the sifting system and hoping to fully automate mesh registration via script!
Screenshots and Videos
No response
Crash Report or Log
No response
Operating System
Windows 10
Mod Version
1.8.4
Minecraft Version
1.20.1
NeoForge Version
47.4.0
Other Mods
No response
Additional Context
No response
I'm not sure where you CreateSifter.registerMesh(...) ... but anyway the meshes can be created like this:
StartupEvents.registry('item', event => {
//Basic mesh
event.create('diamond_mesh','createsifter:mesh')
.displayName('Diamond Mesh')
.parentModel("createsifter:block/meshes/mesh")
.texture("mesh","kubejs:item/diamond_mesh");
//Advanced mesh
event.create('advanced_diamond_mesh','createsifter:advanced_mesh')
.displayName('Advanced Diamond Mesh')
.parentModel("createsifter:block/meshes/mesh")
.texture("mesh","kubejs:item/diamond_mesh")
.texture("frame","micraft:block/diamond_block");
})
The actual documentation for 1.20.1: