Potion Duration

Started by MasterFire41604 on Sat, 08/03/2019 - 22:32

Topic category: Feature requests and ideas for MCreator

Last seen on 00:08, 22. Sep 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Potion Duration
Sat, 08/03/2019 - 22:32

It would be great if we could adjust the time of the potion's duration :)

Last seen on 13:35, 23. Sep 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
This is planned to be added.
Fri, 08/09/2019 - 09:35

This is planned to be added.

Last seen on 00:08, 22. Sep 2019
Joined Jun 2019
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Awesome, thanks :)
Fri, 08/09/2019 - 21:13

Awesome, thanks :)

Last seen on 13:35, 23. Sep 2019
Joined Apr 2010
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
  • wiki contributor
  • moderator
  • developer
You are welcome!
Sat, 08/10/2019 - 09:37

You are welcome!

Last seen on 08:45, 21. Sep 2019
Joined Dec 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
You can set the duration…
Sat, 08/10/2019 - 17:15

You can set the duration manually through editing the potion's source code. Under "public static class PotionTypeCustom extends PotionType" you'll find this:

 

public PotionTypeCustom() {
            super(new PotionEffect[]{new PotionEffect(potion, 3600)});
            setRegistryName("<YourCustomPotionsName>");

 

"3600" is the duration in mc ticks. 20 mc ticks = 1 second, so 1 minute = 1200, 2 minutes = 2400 and so on.