SPIGOT-7665: Fix ThrownPotion#getEffects() implementation only bringing custom effects
This commit is contained in:
parent
66f1f439aa
commit
124ac66d74
@ -23,7 +23,7 @@ public class CraftThrownPotion extends CraftThrowableProjectile implements Throw
|
|||||||
@Override
|
@Override
|
||||||
public Collection<PotionEffect> getEffects() {
|
public Collection<PotionEffect> getEffects() {
|
||||||
ImmutableList.Builder<PotionEffect> builder = ImmutableList.builder();
|
ImmutableList.Builder<PotionEffect> builder = ImmutableList.builder();
|
||||||
for (MobEffect effect : getHandle().getItem().getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).customEffects()) {
|
for (MobEffect effect : getHandle().getItem().getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).getAllEffects()) {
|
||||||
builder.add(CraftPotionUtil.toBukkit(effect));
|
builder.add(CraftPotionUtil.toBukkit(effect));
|
||||||
}
|
}
|
||||||
return builder.build();
|
return builder.build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user