mojira.dev
MC-304068

Instant heal has a weird behavior based on the amplifier

Steps to reproduce the issue

When attempting to heal players via:

/effect give @a minecraft:instant_health 1 32

The effect is as strong as:

/effect give @a minecraft:instant_health 1 0

This gets even weirder where amplifiers 29-31 produce no health healed. Then amplifier 32 heals as if it were amplifier 0.
This is true of all modifier values where:

modifier = modifier % 32 + 1
if (modifier > 28) {
  modifier = 0
}

so 29-31, 61-63, 93-95, etc. → heal 0 hearts.

Expected result

The player should be healed by the direct modifier value

Actual result

The player is not healed, given the condition specified above.

Environment

Windows 11, tested on LAN and singleplayer.

Linked issues

Comments 1

Effects of level 5+ (7+ for Slowness) are not supported; see the linked issue.

trevoman

(Unassigned)

Unconfirmed

(Unassigned)

1.21.10

Retrieved