Package net.mcreator.blockly.java
Class BlocklyToProcedure
java.lang.Object
net.mcreator.blockly.BlocklyToCode
net.mcreator.blockly.java.BlocklyToJava
net.mcreator.blockly.java.BlocklyToProcedure
- All Implemented Interfaces:
IGeneratorProvider,IWorkspaceProvider
-
Field Summary
FieldsFields inherited from class net.mcreator.blockly.BlocklyToCode
blockGenerators, editorType, lastProceduralBlockType -
Constructor Summary
ConstructorsConstructorDescriptionBlocklyToProcedure(Workspace workspace, ModElement parent, String sourceXML, TemplateGenerator templateGenerator, IBlockGenerator... externalGenerators) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method is executed after the constructor is called, before the code is generatedprotected voidpostBlocksPlacement(Document doc, Element startBlock, List<Element> baseBlocks) This method contains the code needing to be executed after blocks are placed.protected voidpreBlocksPlacement(Document doc, Element startBlock) This method contains the code needing to be executed before blocks are placed.voidsetReturnType(VariableType returnType) Methods inherited from class net.mcreator.blockly.BlocklyToCode
addCompileNote, addDependency, addTemplate, append, checkIfDepProviderInputsProvide, clearCodeGeneratorBuffer, clearSections, directProcessOutputBlock, directProcessOutputBlockWithoutParentheses, directProcessStatementBlock, getBlockCount, getCompileNotes, getDependencies, getEditorType, getExtraTemplatesCode, getGeneratedCode, getHeadSection, getParent, getStatementInputsMatching, getTailSection, getTemplateGenerator, getUsedBlocks, getWorkspace, popDepProviderInputStack, processBlockProcedure, processOutputBlock, processOutputBlockToInt, processOutputBlockWithoutParentheses, processOutputBlockWithoutParentheses, pushDepProviderInputStack, setHeadSection, setTailSectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.mcreator.generator.IGeneratorProvider
getGenerator, getGeneratorConfiguration, getGeneratorStatsMethods inherited from interface net.mcreator.workspace.IWorkspaceProvider
getFileManager, getFolderManager, getModElementManager, getWorkspaceFolder, getWorkspaceInfo, getWorkspaceSettings, getWorkspaceUserSettings
-
Field Details
-
variableGenerator
-
-
Constructor Details
-
BlocklyToProcedure
public BlocklyToProcedure(Workspace workspace, ModElement parent, String sourceXML, TemplateGenerator templateGenerator, IBlockGenerator... externalGenerators) throws TemplateGeneratorException - Throws:
TemplateGeneratorException
-
-
Method Details
-
beforeGenerate
protected void beforeGenerate()Description copied from class:BlocklyToJavaThis method is executed after the constructor is called, before the code is generated
- Overrides:
beforeGeneratein classBlocklyToJava
-
preBlocksPlacement
Description copied from class:BlocklyToCodeThis method contains the code needing to be executed before blocks are placed.
- Overrides:
preBlocksPlacementin classBlocklyToCode- Parameters:
doc- Blockly XML documentstartBlock- The basic block of the editor used to get other blocks.
-
postBlocksPlacement
Description copied from class:BlocklyToCodeThis method contains the code needing to be executed after blocks are placed.
- Overrides:
postBlocksPlacementin classBlocklyToCode- Parameters:
doc- Blockly XML documentstartBlock- The basic block of the editor used to get other blocks.baseBlocks- A list of all blocks placed under start block.
-
getReturnType
-
setReturnType
-
getExternalTrigger
-
getLocalVariables
-