fix trickshot not applying potion effects or custom effects

This commit is contained in:
nossr50
2025-05-11 14:47:31 -07:00
parent bcf0f06fb9
commit 8c89462b0a
2 changed files with 11 additions and 0 deletions

View File

@ -74,6 +74,16 @@ public class CrossbowsManager extends SkillManager {
spawnedArrow.setPickupStatus(originalArrow.getPickupStatus());
spawnedArrow.setKnockbackStrength(originalArrow.getKnockbackStrength());
if (originalArrow.getBasePotionType() != null) {
spawnedArrow.setBasePotionType(originalArrow.getBasePotionType());
}
if (originalArrow.hasCustomEffects()) {
for (var effect : originalArrow.getCustomEffects()) {
spawnedArrow.addCustomEffect(effect, true);
}
}
// copy metadata from old arrow
ProjectileUtils.copyArrowMetadata(pluginRef, originalArrow, spawnedArrow);
originalArrow.remove();