Potion Duration

Started by MasterFire41604 on

Topic category: Feature requests and ideas for MCreator

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 :)

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.