Adding potion effect to a weapons

Started by Hariq on

Topic category: User side tutorials

Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Adding potion effect to a weapons

I'm new at this tool and i wanted to know how to make a weapon have a chance of 30% to give dizziness effect to the entity that it hits, thanks for your time.

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can't :( It will give…
Mon, 07/09/2018 - 20:42

You can't :( It will give the potion effect to you, not to the target entity

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Maybe you could create a…
Tue, 07/10/2018 - 02:14

Maybe you could create a procedure which when you attack the opponent it drops a splash potion and then clears the effect from you

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're right... I should try…
Tue, 07/10/2018 - 07:14

You're right... I should try to make a Poisonous Sword that poisons the enemy

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When I posted that reply I…
Tue, 07/10/2018 - 08:39

When I posted that reply I forgot that commands give command output unless you have the gamerule commandblockoutput set to false.

It's weird to see a command output everytime you use your weapon but it's also weird to change the gamerule while the player didn't want to change it...

Sorry for bad English

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hmmmm yeah after you do the…
Tue, 07/10/2018 - 10:20

hmmmm yeah

after you do the poison you could set command output to false again

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this is my code so far
Tue, 07/10/2018 - 10:28

this is my code so far

code

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Whoops the first and last…
Tue, 07/10/2018 - 10:59

Whoops the first and last block is meant to be switched around

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, I have thought of that,…
Tue, 07/10/2018 - 13:10

Yes, I have thought of that, but if the gamerule was already false before using the poisonous sword? The procedure will set it to true and the player will be forced to set it to false manually everytime he uses the poisonous sword.

Anyways it should work for players that don't use commands in survival minecraft (most of players, I think) (anyways, who would use that gamerule in survival? XD)

Sorry for bad English

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, I didn't see your…
Tue, 07/10/2018 - 13:32

Sorry, I didn't see your comment that said exactly what did I say in my last comment XD

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can use "effect @e[range…
Tue, 07/10/2018 - 13:37

You can use "effect @e[range=2] poison 5" for making only near mobs being affected by the poison

I think I will add the poison effect sword in my mod, who cares of the gamerule XD

Sorry for 3 comments in a row...

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry, wrong command The…
Tue, 07/10/2018 - 14:11

Sorry, wrong command

The command I am using is

effect @e[type=!player,r=3,rm=0] minecraft:poison 5

Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Sorry for another comment :(…
Tue, 07/10/2018 - 14:25

Sorry for another comment :(

The gamerule commandblockoutput doesn't seem to work with chat commands

Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well, even though you could…
Tue, 07/10/2018 - 16:51

Well, even though you could possibly get it to work this way,  you can just override Item#hitEntity() and do it properly.

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
So how exactly would this…
Wed, 07/11/2018 - 03:28

So how exactly would this work?