Package net.mcreator.ui.blockly
Class BlocklyJavascriptBridge
java.lang.Object
net.mcreator.ui.blockly.BlocklyJavascriptBridge
-
Method Summary
Modifier and TypeMethodDescriptiongetDependencies(String procedureName) String[]static String[]getListOfForWorkspace(Workspace workspace, String type) getMCItemURI(String name) getReadableNameOf(String value, String type) Gets the readable name of a data list entry from the type of searchable selectorbooleanisPlayerVariable(String field) voidopenAIConditionEditor(String data, Consumer<String> callback) voidopenColorSelector(String color, Consumer<String> callback) voidopenEntrySelector(String type, String typeFilter, String customEntryProviders, Consumer<String[]> callback) Common method to open an entry selector of either data list entries or stringsvoidopenMCItemSelector(String type, Consumer<String> callback) startBlockForEditor(String editorName) void
-
Method Details
-
triggerEvent
public void triggerEvent() -
startBlockForEditor
-
getMCItemURI
-
openColorSelector
-
openMCItemSelector
-
openAIConditionEditor
-
openEntrySelector
public void openEntrySelector(@Nonnull String type, @Nullable String typeFilter, @Nullable String customEntryProviders, Consumer<String[]> callback) Common method to open an entry selector of either data list entries or strings- Parameters:
type- The type of selector to opentypeFilter- If present, only entries whose type matches this parameter are loadedcustomEntryProviders- If present, the types of the mod elements that provide custom entriescallback- The Javascript object that passes the {"value", "readable name"} pair to the Blockly editor
-
getDependencies
-
t
-
getListOf
-
getListOfForWorkspace
-
isPlayerVariable
-
getReadableNameOf
Gets the readable name of a data list entry from the type of searchable selector- Parameters:
value- The value of the data list entrytype- The type of the searchable selector- Returns:
- The readable name of the passed entry, or an empty string if it can't find a readable name
-