Sword Effects

Started by CloudtailRox on

Topic category: Advanced modding

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?

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

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

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.

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

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

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;
    }

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

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