Potion Duration

Started by MasterFire41604 on

Topic category: Feature requests and ideas for MCreator

Last seen on 17:12, 27. Mar 2020
Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Potion Duration

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

Last seen on 17:12, 27. Mar 2020
Joined Jun 2019
Points:

User statistics:

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

Awesome, thanks :)

Last seen on 23:50, 27. Mar 2024
Joined Dec 2016
Points:

User statistics:

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