Class ToolboxCategory

java.lang.Object
net.mcreator.blockly.data.ToolboxCategory

public class ToolboxCategory extends Object
  • Constructor Details

    • ToolboxCategory

      public ToolboxCategory()
  • Method Details

    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getParent

      @Nullable public ToolboxCategory getParent()
    • getColor

      public Color getColor()
      Returns the color of this toolbox category. If the field is a valid hex color code, it's returned as-is. If it's a valid integer, it's treated as a hue to get the color with the correct saturation and value.
      Returns:
      The color of this toolbox category, or black if it's badly formatted.
    • tryGetBuiltin

      public static ToolboxCategory tryGetBuiltin(String id)
      Call this to get ToolboxCategory instance for builtin categories. This is only meant for visual use, e.g. in procedure search.
      Parameters:
      id - the id of the builtin category
      Returns:
      the ToolboxCategory instance, or a generic one with gray color if the id is unknown