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.
Confirmed for 1.9-pre2