Package net.mcreator.util
Class BlocklyHelper
java.lang.Object
net.mcreator.util.BlocklyHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBlock(String blockType, Element... children) Creates a block of the given block type and with the given childrencreateField(String fieldName, String fieldValue) Creates a field with the given name and the given valuecreateValue(String valueName, Element inputBlock) Creates a value input with the given name and the given block
-
Constructor Details
-
BlocklyHelper
-
-
Method Details
-
createBlock
Creates a block of the given block type and with the given children- Parameters:
blockType- The type of this blockchildren- The children (fields, values...) that should be appended to this block- Returns:
- An
Elementrepresenting this block
-
createField
Creates a field with the given name and the given value- Parameters:
fieldName- The name of this fieldfieldValue- If not null, the value of this field- Returns:
- An
Elementrepresenting this field
-
createValue
Creates a value input with the given name and the given block- Parameters:
valueName- The name of this value inputinputBlock- If present, the block attached to this input- Returns:
- An
Elementrepresenting this value input
-