mojira.dev
MC-92107

Tipped arrow, splash and lingering potions are not displaying ambient particles correctly

The bug

Tipped arrows, splash and lingering potions show the particles of potions defined in the CustomPotionEffects tag, however they always display them as if the potion would have the tag Ambient set to 0b.

I expected it to use the same method to display the particles which is also used for players and mobs, making ambient particles more brighter.

Used command

/give @p tipped_arrow[potion_contents={custom_effects:[{id:fire_resistance,duration:1200,ambient:1b,amplifier:1}]}]

The reason (tipped_arrow)

The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.

The reason why this is happening is because the method net.minecraft.entity.projectile.EntityTippedArrow.func_184556_b(int) is ignoring whether or not ambient effects are used. The method that does this is net.minecraft.entity.EntityLivingBase.func_184593_a(Collection<PotionEffect>) which should be probably moved to the net.minecraft.potion.PotionUtils class.

Note: For the other affected entities it is similar.

Linked issues

Comments 9

Confirmed for 1.9-pre2

Confirmed for 1.9-pre3

Confirmed for 1.9-pre4

Still in 1.9.1-pre3

Can confirm in 20w51a.

Can confirm in 21w05a.

Can confirm in 21w05b.

The updated syntax for the command in 1.21+ is:

/give @p tipped_arrow[potion_contents={custom_effects:[{id:fire_resistance,duration:1200,ambient:1b,amplifier:1}]}]

marcono1234

(Unassigned)

Confirmed

Commands, Particles

ambient, lingering_potion, particle, potion-effect, splash_potion, tipped_arrow

Minecraft 15w44b, Minecraft 1.9 Pre-Release 2, Minecraft 1.9 Pre-Release 3, Minecraft 1.9 Pre-Release 4, Minecraft 1.9, ..., 1.16.4, 20w51a, 21w05a, 21w05b, 24w38a

Retrieved