Sword Effects

Started by CloudtailRox on

Topic category: Advanced modding

Last seen on 23:50, 22. Apr 2019
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sword Effects

Is there a way for a sword to posion mobs when they're hit?

Last seen on 16:11, 19. May 2020
Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
globální eventy UseItemEvent
Mon, 08/01/2016 - 17:16

globální eventy UseItemEvent a holding spesific item = [tvůj meč] add potion effect

aspon myslim

Last seen on 16:11, 19. May 2020
Joined Apr 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry I forgot about it -
Mon, 08/01/2016 - 17:23

Sorry I forgot about it - this is only english forum and I wrote it wery wrong 

global events -> when player hits entity -> in spesifics cases (item in hand = your sworld) -> add potion efect and sellect potion effect

but I am not sure if it goes to an atacked entity

Last seen on 23:50, 22. Apr 2019
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok ill try it
Mon, 08/01/2016 - 18:47

ok ill try it

Last seen on 23:50, 22. Apr 2019
Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
1. It gave the effect to
Mon, 08/01/2016 - 19:20

1. It gave the effect to myself.

2. If an iron golem, wolf, or any other entity attacked another entity and I had the weapon in my hand, it still gave me the effect.

Last seen on 16:20, 13. Feb 2018
Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Me anyway I do not know the
Thu, 08/25/2016 - 18:57

Me anyway I do not know the code

Last seen on 16:20, 13. Feb 2018
Joined May 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But I think we must look at
Thu, 08/25/2016 - 18:58

But I think we must look at the NBT

Last seen on 22:13, 3. Apr 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use:
Thu, 08/25/2016 - 20:58

Use:

  public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving)
    {
        par2EntityLiving.addPotionEffect(new PotionEffect(Potion.getPotionFromResourceLocation("poison"), 200, 2));

 par1ItemStack.damageItem(1, par2EntityLiving);
        return true;
    }

Last seen on 22:02, 16. Aug 2022
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't know if you will see…
Tue, 05/01/2018 - 02:18

I don't know if you will see or respond to this considering the post is old but where would I paste this in

Last seen on 22:02, 16. Aug 2022
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Never mind I figured it out  
Tue, 05/01/2018 - 02:26

Never mind I figured it out