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 selectorboolean
isPlayerVariable
(String field) void
openAIConditionEditor
(String data, JSObject callback) void
openEntrySelector
(String type, String typeFilter, String customEntryProviders, JSObject callback) Common method to open an entry selector of either data list entries or stringsvoid
openMCItemSelector
(String type, JSObject callback) void
-
Method Details
-
triggerEvent
public void triggerEvent() -
getMCItemURI
-
openMCItemSelector
-
openAIConditionEditor
-
openEntrySelector
public void openEntrySelector(@Nonnull String type, @Nullable String typeFilter, @Nullable String customEntryProviders, JSObject 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
-