How do you create explosive items?

Started by MinerLevi2019 on

Topic category: Advanced modding

Last seen on 23:44, 6. Nov 2019
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do you create explosive items?

Hey.  Newb question, but I need some help.  How do you make items that explode a set amount of time after being place?  And how do you make a thrown explosive?

Last seen on 21:28, 29. Mar 2020
Joined Apr 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if you want to make a item…
Sun, 04/07/2019 - 02:28

if you want to make a item like a grenade, then I would suggest making the item a ranged item that deals 0 damage, but has a prcedure linked to it where when the entity of the arrow hits a player, mob, or block(the same procedure should work for all three I think), then the coords where the arrow hit will explode.

Last seen on 14:43, 2. Aug 2022
Joined Nov 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Make a procedure to do this…
Sun, 04/07/2019 - 16:42

Make a procedure to do this.

For this example I will showcase a fused bomb.

Procedure:

On player tick update:

    if item in entities main hand == bomb:

        bombticks = bombticks + 1

    if bombticks == 100:

        explode with power ? at x y z

         remove 1 bomb from inventory

 

this would make the bomb explode after being in your hand for 5 seconds.