How to make a procedure run on a vanilla blocks update tick

Started by JakobLS on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a procedure run on a vanilla blocks update tick

Hi, I have a procedure that I made that makes cracks in blocks spread to other blocks and it works perfectly but it uses the on block tick update trigger and I cant find a way to have this occur with vanilla blocks like normal stone bricks in my case. All my procedure does is check all surrounding blocks for any blocks tagged as cracked and then does some math to figure out if the target block will crack on that tick. Here is a screenshot of the procedure but it isn't really issue. Also I'm sending the procedure as text because I've edited the code directly and therefore have the procedure locked.
 

https://pastebin.com/0GHzeWVw


The code probably looks like a lot but almost all of it is just checking what the target block is and then filling the cracked variant in for it. The important stuff is at the top where its checking all the surrounding blocks for any that are tagged as cracked / severely cracked and then for water as well.

Please help me to find a way to either have the procedure run on a vanilla blocks update tick or some kind of way to get this to work with a global trigger as there isn't one for block ticks.

Thank you if you are able to help me.