Potion Giving Procedure

Started by Bananas on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Potion Giving Procedure
Thu, 03/11/2021 - 16:04 (edited)

Hi everybody.

I'm making a key binding, which, when key pressed and you have specific armor (potion bag), it takes a bottle from your inventory and gives you specific potion (let's talk about regeneration in this case). I think I would be able to do it normally, just:

If is item in armor slot 2 of event entity potion bag and has event entity bottle in inventory,

remove 1 botttle from event entity's inventory and add 1 Regen potion to event entity's invnetory (and deal 1 damage to item in armor slot 2 of event entity).

But the problem is that I must set the damage of potion to pick which potion is it supposed to be and I don't know how.

Thanks in advance.

Edited by Bananas on Thu, 03/11/2021 - 16:04
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm not sure of what are you…
Fri, 03/12/2021 - 10:01

I'm not sure of what are you saying, but it doesn't sound very difficult.

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Dispense the potion with the…
Fri, 03/12/2021 - 12:15

Dispense the potion with the "execute command" block. For all your other actions, you can use procedure blocks (without using commands).

Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, execute command. Thanks!
Fri, 03/12/2021 - 19:24

Oh, execute command. Thanks!