mojira.dev
MC-112021

Custom Potion Effect Ampilfier doesn't work correctly

Using a custom potion with a high amplifier e.g. 255, the amplifier is lost when the potion is drunk. E.g.

\give @p minecraft:potion 1 0 {CustomPotionEffects:[{Id:25,Amplifier:255,Duration:20}]}

Gives a potion which gives levitation 255 (hovering). However upon consuming the potion, the level 1 (amplifier 0) effect is applied which raises the player instead of holding them steady.

Related issues

Comments

Skylinerw

Duplicate of MC-10755.

As well, the Amplifier tag is read a signed byte (-128 to 127). You should not be going outside the expected value range. 255 is outside that range and overflows to -1. However, in 1.11, amplifiers lower than 0 will be seen as 0.

migrated

(Unassigned)

Unconfirmed

Minecraft 1.11.2

Retrieved