Custom Potion Effects

Discussion in 'Archived: Plugin Requests' started by Robbo905, Apr 8, 2012.

  1. Offline


    Can anyone make a plugin that, through the use of commands, we're able to create potions with custom effects and durations? For example, one could create a potion that makes you faster than the normal speed potions, and has a duration of 20 minutes.
  2. Offline


    PotionsPlus will let you create custom potions with arbitrary potion effects and durations. The default Charming Potion adds a higher speed effect, you can extend it's duration in the config. Though PotionsPlus doesn't use commands.. how would that work?
  3. Offline


    People with the correct permission node could hold a bottle of water in their hand and use a command such as /potion enchant [effect] [amplification] [duration] and said potion would then become the one that you just specified.
  4. Offline


    I see, should be possible. There are 2^15 possible potion damage values, so the way this could be done is to assign the requested affects to the next available value, then setDurability() on the potion. The catch is the potion names may not appear as expected on the client, but the effects should still work.

    Anyone want to give this request a shot? You could use PotionsPlus as a base, or even contribute these changes back to the project :)
  5. Offline


    I dont think you would be able to see that bottle as that potion effect because Minecraft doesnt have certain potions as an actual game objects. Many potion effects exist in Minecraft that arnt being used by the game at all.
  6. Offline


    Correct, the potions tooltip will show "No Effect" (at least, as far as I've gotten it to work):


    but its only a client-side visual limitation, it is possible to assign arbitrary potion effects to any of the ~65k potions available, and the new effects are applied when the potion is drunk or splashed (this is how PotionsPlus works, but the set of effects are configured statically in the config file, instead of at runtime using a command).
  7. Offline


    So we've gathered it's possible, could either of you make it?

Share This Page