mojira.dev
MC-262458

Custom potions spawned with commands do not apply effects correctly

CustomPotionEffects should be pretty much equivalent to the /effect command:

With /effect, infinite duration saturation, instant health, or instant damage can be applied. Potions can only apply these “instant effects” for a single tic if the duration is set to -1. Other effects which are not instant work correctly

Additionally, /effect can safely apply effects with amplifiers up to 255, while CustomPotionEffects potions can only go up to 127 before the effect behavior is nullified.

Related issues

Comments

migrated

First part; what's the command you used?

Amplifier part: Duplicate of MC-118857.

evanultra01
/give @p potion{CustomPotionEffects:[{Id:6,Amplifier:0b,Duration:-1},{Id:7,Amplifier:0b,Duration:-1},{Id:23,Amplifier:0b,Duration:-1}]} 1

Expected behavior of the potion: Apply Instant Health, Instant Damage, and Saturation for an infinite amount of tics, similar to other effects.

 

Actual behavior: Only applies it for 1 tic. It doesn't work if it's just a really big number either, itll only do it for 1 tic regardless of Duration.

 

For the amplifier part, yes, that appears to be a similar issue, however, /effect seems to be able to apply these effects with amplifiers above 127 perfectly fine.

migrated

Because /effect sets the field directly, not the save-data.

j_p_smith

The first part is MC-142061.

evanultra01

(Unassigned)

Unconfirmed

(Unassigned)

1.19.4

Retrieved