I'm not sure why this is the case, but while working on a mod, I noticed that my potion effect wasn't showing the icon on the screen unless I enabled particles as well. Turns out, the splash potion entity doesn't actually pass on that last parameter, so the only way for the HUD icon to show up requires particles to also be enabled.
From the ThrownPotion.applySplash() method:
for (MobEffectInstance mobEffectInstance : effects) {
Holder<MobEffect> holder = mobEffectInstance.getEffect();
if (holder.value().isInstantenous()) {
holder.value().applyInstantenousEffect(this, this.getOwner(), livingEntity, mobEffectInstance.getAmplifier(), e);
} else {
int i = mobEffectInstance.mapDuration(duration -> (int) (e * (double)duration + 0.5));
MobEffectInstance mobEffectInstance2 = new MobEffectInstance(
holder, i, mobEffectInstance.getAmplifier(), mobEffectInstance.isAmbient(), mobEffectInstance.isVisible()
);
if (!mobEffectInstance2.endsWithin(20)) {
livingEntity.addEffect(mobEffectInstance2, entity2);
}
}
}
mobEffectInstance2 should actually be:
MobEffectInstance mobEffectInstance2 = new MobEffectInstance(
holder, i, mobEffectInstance.getAmplifier(), mobEffectInstance.isAmbient(), mobEffectInstance.isVisible(), mobEffectInstance.showIcon()
);
This is also true for Lingering potions. In AreaEffectCloud.tick(), you can find where it applies status effects to entities and see it's missing the showIcon() parameter when a new mob effect instance is created from the PotionContents data. While this doesn't affect normal gameplay, it is something that caused me a bit of a headache trying to figure out, so I thought I should at least report it since it would be a fairly simple fix.
Linked issues
Comments 3
It's not something you'd notice in vanilla, no. There's no instances that I'm aware of in vanilla where there's supposed to be no particle effects at all while also still having the icon on the HUD be visible.
It's still likely unintended given the drinkable potions don't have this issue. It's only splash and lingering potions.
Thank you for your report!
We're tracking this issue in MC-148417, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
This happens in vanilla?