Potion Giving Procedure

Started by Bananas on Thu, 03/11/2021 - 16:03

Topic category: Help with modding (Java Edition)

Last seen on 13:44, 27. May 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
Last seen on 12:57, 25. May 2022
Joined Aug 2020
Points:

User statistics:

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

Last seen on 22:00, 15. May 2022
Joined Oct 2019
Points:

User statistics:

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

Last seen on 13:44, 27. May 2022
Joined Jul 2020
Points:

User statistics:

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

Oh, execute command. Thanks!