FreeMarker Template Language question

Started by BaRiBoD on

Topic category: Plugins and third-party tools

Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
FreeMarker Template Language question
Mon, 03/11/2024 - 12:59 (edited)

How can I use a variable taken from a block in the procedure in the condition of an if statement?

 

<#if input$key>System.out.println("Hello")<#else>System.out.println("Bye")</#if>;

key type's is boolean

Edited by BaRiBoD on Mon, 03/11/2024 - 12:59
you can do w.getWorkspace()…
Wed, 03/27/2024 - 19:54

you can do w.getWorkspace().getModElementByName("Block name").getGeneratableElement() but it's pretty inefficient to do for every procedure block.