Is there a way to spawn lit TNT from a mob upon killing it?

Started by Failtronic2 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to spawn lit TNT from a mob upon killing it?

I'm trying to do a thing where I craft an item, and upon using the item, every time I kill a mob it will spawn some lit TNT which will then explode after a short time.

(Another thing I need help with is actually using the item after a right click, like making it disappear after use, but that's not the point of this question.)

Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
OK, got the item to…
Fri, 04/05/2019 - 19:02

OK, got the item to disappear now I just need the TNT part.

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's easy to make a mob…
Sun, 04/07/2019 - 09:38

It's easy to make a mob spawn TNT on death, but for exactly what you are looking for, this will need variables. I am not very experienced with the new 1.8.3 variables, but if you set a logic variable of some description to set itself to true when you use the item, you can have a procedure set for the global trigger 'When mob dies'. The procedure itself would be:

if [YourVariable] = true

spawn entity [LitTNT]