how EXACTLY does "custom code snippet" work?

Started by RedWirePlatinum on

Topic category: Help with MCreator software

Last seen on 05:13, 26. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how EXACTLY does "custom code snippet" work?

I get how it generally works, you can use it to write your own code and whatever but like... how does it work? I tried checking generator-1.20.1 in the mcreator files but there is no file named "java_code.java.ftl" in either of the procedures folders. I wanted to be able to utilize this as part of my plugin but I don't know how to make the "code" part work if that makes any sense.

What do you mean with custom…
Sat, 03/02/2024 - 10:38

What do you mean with custom code snippet?

If you mean the one in procedures, you just enter the custom code and it will be inserted on the location of the code snippet

Last seen on 05:13, 26. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yeah but I mean like, what's…
Sat, 03/02/2024 - 20:15

Yeah but I mean like, what's the source code of the custom code snippet block? If it exists somewhere

Last seen on 05:13, 26. Apr 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Like for example, the code…
Sat, 03/02/2024 - 20:36

Like for example, the code for sending a chat to the world is this:

if (!world.isClientSide() && world.getServer() != null)
	world.getServer().getPlayerList().broadcastSystemMessage(Component.literal(${input$text}), false);

is there something like this for the custom code snippet, or?