mojira.dev
MC-111625

Tipped arrows not applying instant effects correctly

Method and class names based on 1.11 decompiled using MCP 9.35 rc1

The bug

When a mob is shot with a tipped arrow all effects are applied as if they were no instant effects. This causes instant effects with the Amplifier 0 to not be applied because the method net.minecraft.potion.Potion.performEffect(EntityLivingBase, int) can be considered broken for instant effects because it only shifts with the amplifier but does not add 0.5 at the end.

This can be fixed by having the method net.minecraft.entity.projectile.EntityTippedArrow.arrowHit(EntityLivingBase) test if the effect is instant and in that case call the method net.minecraft.potion.Potion.affectEntity(Entity, Entity, EntityLivingBase, int, double) instead. After this change tipped arrows would be affected by MC-25866 / MC-98123 as well.

Linked issues

Comments

carpet0928

Is this still an issue in the most recent versions (currently that is 1.13.2, or 18w44a) of Minecraft? If so, please update the affected versions and help us keep this ticket updated from time to time. If you are the owner/reporter of this ticket, you can modify the affected version(s) yourself.

[Mod] redstonehelper

Fixed as of 20w07a.

marcono1234

(Unassigned)

Confirmed

(Unassigned)

instant_damage, instant_health, potion-effect, saturation, tipped_arrow

Minecraft 1.11

Retrieved