Sword Effects

Started by CloudtailRox on

Topic category: Advanced modding

Active 6 years ago
Joined Nov 2015
Points:
772

User statistics:

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

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

Active 5 years ago
Joined Apr 2015
Points:
737

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 22
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

Active 5 years ago
Joined Apr 2015
Points:
737

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 22
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

Active 6 years ago
Joined Nov 2015
Points:
772

User statistics:

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

ok ill try it

Active 6 years ago
Joined Nov 2015
Points:
772

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 39
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.

Active 7 years ago
Joined May 2015
Points:
740

User statistics:

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

Me anyway I do not know the code

Active 7 years ago
Joined May 2015
Points:
740

User statistics:

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

But I think we must look at the NBT

Active 1 year ago
Joined Aug 2013
Points:
1163

User statistics:

  • Modifications: 4
  • Forum topics: 6
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 737
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;
    }

Active 3 years ago
Joined Jul 2017
Points:
749

User statistics:

  • Modifications: 2
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 27
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

Active 3 years ago
Joined Jul 2017
Points:
749

User statistics:

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

Never mind I figured it out