How do you create explosive items?

Started by MinerLevi2019 on

Topic category: Advanced modding

Active 3 months ago
Joined Apr 2019
Points:
674

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
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?

Active 5 years ago
Joined Apr 2019
Points:
783

User statistics:

  • Modifications: 1
  • Forum topics: 17
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 47
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.

Active 3 years ago
Joined Nov 2018
Points:
978

User statistics:

  • Modifications: 0
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 571
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.