Started by
Azzier
on
Topic category: Help with MCreator software
I'm making custom mod element with new java plugins. The only problem I ran into was how to get a mod list of items (of the type I created) in procedure blocks.
When you create custom entity it's available in procedure blocks as "CUSTOM: <name>". Can't really find a way to do this with custom mod element.
It uses a custom Blockly argument. Check how this block is made in its Json file.
From what i understand, it uses blockly named field_data_list_selector. This calls a method in mcreator that opens this selector in line 59.
```
javabridge.openEntrySelector(this.type, {
```
However in mcreator source code (i mean file net/mcreator/ui/blockly/BlocklyJavaScriptBridge.java), after looking at the class i assume it handles it, i guess it does not return custom mod elements, only built in ones (mcreator uses switch case for different mod elements), otherwise returns nothing or datalist only. :<
You can try setting the custom element recipe type to ITEM or BLOCK. This should add your mod element to the list of blocks/items
It doesn't help.
Im preety sure its about this method in javascript "field_data_list_selector.js" in line 58
I understant this calls a method in MCreator in "net.mcreator.ui.blockly.BlocklyJavascriptBridge". It activates method in lne 123:
I suspect that's why I can't do it. I don't see there any code that would return list of custom elements user made from my mod element (only datalist if exists).
Okay, it works now but i had to make 3 custom classes and 2 static methods: