Pass correct draw strength for EntityShootBowEvent (#12308)
This commit is contained in:
@@ -30,6 +30,15 @@
|
||||
} else {
|
||||
Projectile projectile = super.createProjectile(level, shooter, weapon, ammo, isCrit);
|
||||
if (projectile instanceof AbstractArrow abstractArrow) {
|
||||
@@ -163,7 +_,7 @@
|
||||
if (level instanceof ServerLevel serverLevel) {
|
||||
ChargedProjectiles chargedProjectiles = weapon.set(DataComponents.CHARGED_PROJECTILES, ChargedProjectiles.EMPTY);
|
||||
if (chargedProjectiles != null && !chargedProjectiles.isEmpty()) {
|
||||
- this.shoot(serverLevel, shooter, hand, weapon, chargedProjectiles.getItems(), velocity, inaccuracy, shooter instanceof Player, target);
|
||||
+ this.shoot(serverLevel, shooter, hand, weapon, chargedProjectiles.getItems(), velocity, inaccuracy, shooter instanceof Player, target, 1); // Paper - Pass draw strength
|
||||
if (shooter instanceof ServerPlayer serverPlayer) {
|
||||
CriteriaTriggers.SHOT_CROSSBOW.trigger(serverPlayer, weapon);
|
||||
serverPlayer.awardStat(Stats.ITEM_USED.get(weapon.getItem()));
|
||||
@@ -211,7 +_,14 @@
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user