Programmatically Adding Custom Global Triggers in Java - Seeking Workaround

Started by Azzier on

Topic category: Feature requests and ideas for MCreator

Active 1 year ago
Joined Oct 2021
Points:
634

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 202
Programmatically Adding Custom Global Triggers in Java - Seeking Workaround
Tue, 06/20/2023 - 13:21 (edited)

Hello,

I'm curious if it's possible to programmatically add a custom global trigger in Java code without relying on JSON or FTL files as it is normally done. I've discovered a method to add a new trigger, making it selectable in procedures, and I can also inform generator that it's supported. However, I haven't been able to find a way to specify the code that should be generated without using the "triggername.java.ftl" file.

I know that MCreator haven't been designed with this capability in mind, but I'm hopeful that there might be a workaround or something I can attempt :>

Edited by Azzier on Tue, 06/20/2023 - 13:21
Active 1 month ago
Joined Jul 2022
Points:
1843

User statistics:

  • Modifications: 2
  • Forum topics: 12
  • Wiki pages: 0
  • MCreator plugins: 19
  • Comments: 1737
The only way to do this is…
Tue, 06/20/2023 - 15:13

The only way to do this is by modifying MCreator's source code directly. However, this is completely and utterly pointless.

Active 1 year ago
Joined Oct 2021
Points:
634

User statistics:

  • Modifications: 0
  • Forum topics: 7
  • Wiki pages: 0
  • MCreator plugins: 1
  • Comments: 202
Dammit, and the whole…
Tue, 06/20/2023 - 16:48

Dammit, and the whole elaborate plan went to hell :>