FreeMarker Template Language question

Started by BaRiBoD on

Topic category: Plugins and third-party tools

Last seen on 20:43, 30. Mar 2024
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
The procedure block is…
Tue, 03/12/2024 - 18:12

The procedure block is generated in a different template than a block so this may not be possible

Last seen on 05:45, 27. Apr 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.