How can I make stone bricks crack

Started by JakobLS on

Topic category: Help with modding (Java Edition)

Last seen on 03:09, 18. Aug 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How can I make stone bricks crack
Sun, 08/11/2024 - 22:24 (edited)

Hi, I was wondering if anyone knew how I could make it so that cracked stone bricks spread to normal stone bricks in the surrounding blocks, I have the whole procedure set up and it works perfectly but I don't know how to make this procedure run for vanilla blocks like stone bricks and cracked stone bricks. Currently, for the modded blocks in my mod, i have it set to the random block tick update trigger but I don't know how I can do this for stone bricks.
This is the procedure I am using right now. In the most basic terms, it just checks every surrounding block for any blocks tagged as cracked or severely cracked and then checks for any blocks that aren't cracked but have the ability to be and does some math to figure out if the target block can be cracked on the tick. Like I said before though, this procedure works perfectly for what I am doing but I have no idea how to get this procedure to run when a Vanilla stone brick ticks randomly. I cant do a global trigger either cause there is no global trigger for block ticks. My last resort wouldn't be to make a clone of stone bricks that replaces the vanilla counterpart but I would be able to replace any vanilla stone bricks that generate in structures.

Also sorry that the image is a discord attachment, for some reason when I tried to do an imgur link it wasn't showing the image.

Thank you so much if you are able to help me solve my problem.

Edited by JakobLS on Sun, 08/11/2024 - 22:24
Last seen on 18:09, 10. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't see the attached…
Tue, 09/10/2024 - 05:31

I don't see the attached image, but I think I understood your problem. you need to create a procedure that checks every tick whether there are stone bricks next to you, if there is a chance, if the chance gave a positive value, the procedure works further, if not, the procedure stops, so next you need to make sure that if the chance gave this positive value, the stone brick next to you replaced it with a cracked one