Package net.mcreator.blockly.data
Class ToolboxCategory
java.lang.Object
net.mcreator.blockly.data.ToolboxCategory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Returns the color of this toolbox category.getName()
static ToolboxCategory
tryGetBuiltin
(String id) Call this to get ToolboxCategory instance for builtin categories.
-
Constructor Details
-
ToolboxCategory
public ToolboxCategory()
-
-
Method Details
-
getName
-
getDescription
-
getParent
-
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
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
-