Sword Effects

Started by CloudtailRox on Mon, 08/01/2016 - 14:32

Topic category: Advanced modding

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sword Effects
Mon, 08/01/2016 - 14:32

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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 00:21, 11. Aug 2019
Joined Aug 2013
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 03:10, 4. Jul 2020
Joined Jul 2017
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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 03:10, 4. Jul 2020
Joined Jul 2017
User points:

User statistics:

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

Never mind I figured it out