Block Explodes After Being Replaced

Started by Soul of Cinder on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block Explodes After Being Replaced

I made a custom IED block with a timer in. It works, but if I break and place it again, the old timer still runs and makes it explode. How can I reset or cancel the countdown when the block is removed/replaced?

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need to make a new…
Tue, 08/19/2025 - 16:50

You need to make a new variable that checks if the block has been deleted, and then put an "if do" logic and check if the variable is NOT set to broken in order to continue the explosion. If you need clarification, please ask.

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
when you say "check if the…
Tue, 08/19/2025 - 17:02

when you say "check if the variable is NOT set to broken" does it mean i need to do a "if do" logic that check if the block is there at x y x ? bc its whats i've done. also thx for the reply

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I needed to revise the code…
Tue, 08/19/2025 - 17:41

I needed to revise the code. It should look something like this:

(countdown)

If [block at x y z] = [(block)]

Do (explosion)