Sword on hit effects?

Started by Chilly0123 on

Topic category: Help with modding (Java Edition)

Last seen on 15:35, 5. May 2018
Joined Oct 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sword on hit effects?

Hello all,

I've been trying to make custom swords that give mobs/animals/players potion effects when getting attacked, potion effects like poison, wither, slowness, etc.  I've found no info on how to do this in MCreator, but i have found tons of custom code examples from the Forge site that do not work at all in MCreator, although none of these code examples are for the latest version of Minecraft or Forge.  So is there any way to get this to work?  I have very little Java experience, thanks in advance for any and all help.

Last seen on 19:01, 30. May 2022
Joined Dec 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can add effects without
Tue, 10/18/2016 - 21:48

You can add effects without coding. Go to items and create a sword

(by typing in 1.5),

there you will come upon events page. Find the event "Right click" and there you

can find potion effects and add them there.

Last seen on 10:50, 19. Oct 2018
Joined Nov 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:You can add effects without
Tue, 12/13/2016 - 07:39

@#1 that was "Right Click" event....we want Left Click for example if I hit a zombie,the zombie will get struck by lightning.

Last seen on 19:53, 4. Feb 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If that is the case, simply…
Tue, 08/06/2019 - 23:14

If that is the case, simply do it in "when mob is hit with item".