How to Link a procedure to another procedure

Started by DerivedSoul on

Topic category: Help with modding (Java Edition)

Last seen on 16:26, 19. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to Link a procedure to another procedure

Hello! I’m a newbie to MCreator and modding and need some help!

So I’m trying to link a procedure for my block that with my grass block that does 1 1/2 hearts of damage to the player when standing on it, linked to another procedure that is an enchantment that removes the player taking damage from this grass block with the enchantment. I also don’t know how to full thing to this enchantment procedure so help to make this for my mod Would be awesome!

 

Thank you!

Last seen on 17:44, 27. Jun 2024
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To connect procedures, look…
Wed, 06/19/2024 - 15:00

To connect procedures, look in the "advanced" section of the blocks for the block "call procedure".

Last seen on 16:26, 19. Jun 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you! I found the call…
Wed, 06/19/2024 - 15:10

Thank you! I found the call procedure however I’m still having difficulties with the enchantment. So the enhancement is meant to remove damage from the grass block in this dimension + biome, so would you know how to do that?

Last seen on 17:44, 27. Jun 2024
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
In this instance, I wouldn't…
Wed, 06/19/2024 - 22:05

In this instance, I wouldn't call in that separate procedure - I'd build it into the original damage.
 

take and if/do, put the whole procedure in it, and then make the if part "if the event entity doesn't have this enchantment on the item in this armour slot, then [your whole existing damage procedure]".

Which needs a "not" from logic, and then a bunch of "check if this is here" stuff I'd just search for, putting "enchantment" and "armour" and such into the search bar, and pulling out all the promising blocks until I can arrange something that says (in the tortured way of code) that bit I put in italics there.

Last seen on 17:44, 27. Jun 2024
Joined Mar 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
"Take an [if/do] block",…
Wed, 06/19/2024 - 22:06

"Take an [if/do] block", even.