mojira.dev
MC-279693

Summoned lingering potions render as splash potions

Summoning a lingering splash potion without any specific data in "Item" NBT render as a splash potion.

Step to reproduce :
1. Summon an lingering potion with no gravity :
summon minecraft:lingering_potion ~ ~ ~ {NoGravity:1b}

2. Note how the lingering potion renders as a splash potion.

❌ Current result : The Lingering potion renders as a splash potion.
✔ Expected result : The Lingering potion renders as a Lingering potion.

Attachments

Comments 1

Code analysis (Yarn mappings)

The PotionEntity class overrides the ThrownItemEntity#getDefaultItem method to return the splash potion item; however, the LingeringPotionEntity class does not override this method, instead inheriting the same splash potion item. A suggested fix would be to override this method in the LingeringPotionEntity class as well:

@Override
protected Item getDefaultItem() {
	return Items.LINGERING_POTION;
}

Perhaps the splash potion implementation of this method should also be moved from the PotionEntity class to the SplashPotionEntity class.

Elgrenier

etanaratsastaja

Confirmed

Platform

Normal

Commands, Entities

25w04a

25w05a

Retrieved