mojira.dev
MC-77181

CustomPotionEffects do not work on a summoned ThrownPotion (Please Resolve as Invalid)

Disregard this, apparently using a duration shorter than 22 ticks on a splash potion doesn't function at all. I guess you can resolve as invalid.

When summoning a splash potion with custom potion effects, instead of applying the effects, nothing happens.

I tested this with the commands below, where the first command uses the named ids, and the second uses the numbered ids. I don't think the numbered ids for items are supposed to work anymore, but some aspects of the game still refer to them, so I tested it anyways.

Feel free to pick apart the syntax and tell me how many mistakes I made, if any.

Also, when testing with these commands, try increasing the duration. I did try that every once in a while for testing purposes, but it didn't end up working. If it actually does end up functioning, a regeneration effect that lasts for 2 ticks would likely be easy to miss, especially while in creative mode.

The screenshot shows the potion splashing without an effect appearing next to the inventory.

Attachments

Comments 7

Summoning a ThrownPotion with CustomPotionEffects is possible, you just need to input the correct command. Also, ThrownPotion with a duration that is shorter than 22 ticks does work, it just wears off really really fast, or not apply the effect if it hits just slightly off you, try with blindness as the effect Id and your screen should be black, then instantly flash.

Well it doesn't work for regeneration. The result of 2 ticks of regeneration 6 is exactly one heart healing virtually instantaneously. However, the potion, instead, did not affect my health. I should have mentioned that. Also, when I used this same command with a duration of 22 ticks or more, it worked properly but didn't have the duration I wanted and, thus, did not have the desired effect. I did find a workaround, however.

I gave the player regeneration 6 using /effect, then using a scoreboard I kept track of game ticks, and after 2 ticks of regeneration it removes it. That seems to work really well.

If a duration of under 22 ticks doesn't work, then this a valid bug.

@Isaac King
Ticks are not the same as seconds. 22 ticks is just a tiny bit over 1 second (20 ticks).

Well that would be a separate bug. I will work on creating a new ticket for that, though I don't know how that will turn out.

Scratch that, I did some testing with drinkable potions and splash potions. I found that it is simply the result of the way splash potions calculate their area of effect.
http://minecraft.gamepedia.com/Splash_potion#Area_of_effect

At less than 22 ticks, the duration is so short, resulting in an area of effect that is so small that it's impossible to get within the potions effect range.

Which is a tad disappointing, as now there's no simple way to directly apply an effect like regeneration 6 on a player for 2 ticks to give exactly 1 heart of regeneration extremely quickly.

Thomas Clinton

(Unassigned)

Unconfirmed

Minecraft 1.8.1, Minecraft 1.8.2-pre6

Retrieved