The bug
Before the area effect cloud entity was introduced, dying from dragon breath used the death message "Player was roasted in dragon breath" (death.attack.dragonBreath) or "Player1 was roasted in dragon breath by Player2" (death.attack.dragonBreath.player). Dying from dragon breath now displays the death message "Player was killed by Ender Dragon using magic" (death.attack.indirectMagic).
The two unused death messages should either be removed or used instead of the magic death message.
Linked issues
relates to 4
Attachments
Comments 27
Confirmed in 1.21.7, and relates to MC-299395
Can confirm in the current snapshot 26.1.
It won’t be noticed most of the time in vanilla game play. However, in datapack development, we need the area effective cloud that can offer instant damage effect for all the mobs whether they’re undead or not, but no status effect can achieve this and it brings so much inconvenience!
So I suggest MOJANG making dragon breath damage its own effect, just similar to the wither, it damages all the mobs including the undead mobs 3 * (2^levels) amount. And then make dragon breath cloud offer this effect instead of instant damage.
I found that new effect is needed for the fix of MC84595 and MC299395. I learned from poison(fatal) from Bedrock, and I just copy instant_damage code from HealOrHarmMobEffect.class, code is:
public void applyInstantaneousEffect(final ServerLevel serverLevel, final @Nullable Entity source, final @Nullable Entity owner, final LivingEntity mob, final int amplification, final double scale) {
if (this.isHarm == mob.isInvertedHealAndHarm()) {
int amount = (int)(scale * (double)(4 << amplification) + (double)0.5F);
mob.heal((float)amount);
} else {
int amount = (int)(scale * (double)(6 << amplification) + (double)0.5F);
if (source == null) {
mob.hurtServer(serverLevel, mob.damageSources().magic(), (float)amount);
} else {
mob.hurtServer(serverLevel, mob.damageSources().indirectMagic(source, owner), (float)amount);
}
}Then I deleate mob.isInvertedHealAndHarm() and make damage type to dragon_breath.
int amount = (int) (scale * (double) (6 << amplification) + 0.5F);
mob.hurtServer(serverLevel, mob.damageSources().dragonBreath(), (float) amount);Then add this new effect named “INSTANT_ABSULUTE_DAMAGE“ to MobEffects.class. Which means adding a new effect by the mod.
Now dragon breath damages can damage undead mobs and use dragon_breath type correctly. This can fix MC-84595 and MC299395.
It says instead "[Player] has been killed by Ender Dragon using Magic"