Jumping classes In procedure.

Started by Derpy101 on

Topic category: Feature requests and ideas for MCreator

Last seen on 21:37, 14. Jun 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Jumping classes In procedure.

Hey there. I wanted to ask for typical coding jumps. Ae the ability to call another part of the procedure in the procedure.

Example:
I need to do some complicated math that uses a custom algorithm I made. I don't want to copy paste the code 50+ etc times in my blockly editor, it gets laggy.

The solution to this would be to call another procedure to do it for you and then return the answer. But the difficult part would be getting the data over to the other procedure then back. you would either have to set a nbt on the item/block/entity or make a global variable. neither are great solutions. You could use Redwires tutorial on how to call other procedures with custom dependencies, but thats a little bit hard to configure for those who don't know how java works.

All a Jumping addition would do is for you to list a chunk of code inside a code "chunk" give the chunk a name and output type, then have your main code call this chunk and get its output. That way the code compiler knows not to run it as the script, but the script itself can run it!

Thanks for your time, I know its a big suggestion. I don't expect it to make it in, but it would be a big help :) - Zane/Zacronium

To get the value from one…
Sun, 05/19/2024 - 13:04

To get the value from one procedure, you can use the "call procedure and get return value" from advanced tab.

Also check out this new upcoming feature: https://x.com/PyloDEV/status/1791907391790821503

Last seen on 21:37, 14. Jun 2024
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
YOOOOOOOOOOOO New feature is…
Wed, 05/22/2024 - 13:04

YOOOOOOOOOOOO New feature is sick,