How do I make a procedure that will replace a specific block that was summoned/place after an entity's death?

Started by Meruto_ on

Topic category: Help with modding (Java Edition)

Last seen on 03:15, 23. Feb 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make a procedure that will replace a specific block that was summoned/place after an entity's death?

The idea is that-

*When holding a [The Sword], every entity that dies from it in a certain radius will have a [Totem] summoned/placed on them.
*That [Totem] will then be used as an extension of [The Sword]'s ability to do stuff. In this case, every mob in the surrounding area of the [Totem] will take constant damage as long as they're inside the area.

*And then after a few seconds, the [Totem] will disappear, or be replaced with air.

 

That's pretty much what the sword does(I just explained it so you know it's purpose) but my problem is that- how do I make it so the [Totem] will disappear after a few seconds?