how do i make a procedure that when my sword hits the entity gets burned

Started by PEEP0_ on

Topic category: Help with MCreator software

Active 2 years ago
Joined Feb 2021
Points:
558

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
how do i make a procedure that when my sword hits the entity gets burned

i made a sword on my mod called helliron which is basically iron but its found in the nether. so i want to make a burning procedure so that when my sword hits the entity burns for 5 seconds

Active 4 years ago
Joined Dec 2020
Points:
570

User statistics:

  • Modifications: 0
  • Forum topics: 0
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 5
Fortunately, you can easily…
Fri, 02/26/2021 - 12:11

Fortunately, you can easily implement this in your mod with a few procedure blocks.

Essentially, what you have to do is to check before you hit an entity what item does the player hold in his hand? If it is a Helliron sword, then you apply burning on the entity for 5 seconds. You want this to trigger every time when you hurt an entity with your sword.

Code for a flames sword

This procedure trigger every time an entity is hurt, and if the source entity (the one who hurts the entity) has the sword in his hand (I've used a bone for trying out, replace the bone with your sword), it will set the entity in fire for 5 secs.

Hope that helped, also, try and learn to understand procedures, it goes a long way because it's an extremely powerful tool.

Keep on modding and have a nice day! :)