Help with call procedure from another procedure (passing parameters and entities)

Started by egorkut on

Topic category: Help with MCreator software

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with call procedure from another procedure (passing parameters and entities)

I absolutely cannot understand how to pass parameters and entities to the called function. This is necessary for normal and optimized programming of the mod itself, this is more correct. I do not know Java, although I know C# and can somehow understand what's what, but I categorically do not want to program manually because I use this software to somehow avoid this.

The problem is the following:
I don't want to create blocks for subtracting some numeric parameters of the NBT tag every time it is implied. I just want to refer to the procedure in each procedure where necessary, pass it the entity parameters and a local/global variable. There is a gear in the call procedure block that opens the Dependency and pass blocks.

https://files.catbox.moe/cwhrs9.png

I don't understand, but I'll assume that in the first case we have a parameter of the called function, and in the second case there should be a parameter (mostly its contents) that we substitute into the function parameter. So, how do we do parameter passing?

I've only been working on this program for two days and this is a very critical issue. I haven't found a solution on the Internet.

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Add a call block, set to…
Mon, 06/02/2025 - 09:08

Add a call block, set to what procedure you want to pass the argument, and add a dependency to the call block, then set a name to it and add the variable you want to pass, like here: https://imgur.com/a/bext8cN 

Now go in the procedure which is supposed to receive the parameter and you'll be able to use it as a dependency with the same type and same name: https://imgur.com/a/RaMoRJg 

(the dependency block used in the second image can be found in the "advanced" tab)