Class BlocklyJavascriptBridge

java.lang.Object
net.mcreator.ui.blockly.BlocklyJavascriptBridge

public final class BlocklyJavascriptBridge extends Object
  • Method Details

    • triggerEvent

      public void triggerEvent()
    • getMCItemURI

      public String getMCItemURI(String name)
    • openMCItemSelector

      public void openMCItemSelector(String type, JSObject callback)
    • openAIConditionEditor

      public void openAIConditionEditor(String data, JSObject callback)
    • 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 open
      typeFilter - If present, only entries whose type matches this parameter are loaded
      customEntryProviders - If present, the types of the mod elements that provide custom entries
      callback - The Javascript object that passes the {"value", "readable name"} pair to the Blockly editor
    • t

      public String t(String key)
    • getGlobalTriggers

      public String getGlobalTriggers()
    • getListOf

      public String[] getListOf(String type)
    • getListOfForWorkspace

      public static String[] getListOfForWorkspace(Workspace workspace, String type)
    • isPlayerVariable

      public boolean isPlayerVariable(String field)
    • getReadableNameOf

      public String getReadableNameOf(String value, String type)
      Gets the readable name of a data list entry from the type of searchable selector
      Parameters:
      value - The value of the data list entry
      type - 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