This commit is contained in:
nossr50
2025-03-08 11:45:52 -08:00
parent 752174ad6d
commit b48d66abbe
3 changed files with 3 additions and 2 deletions

View File

@ -63,7 +63,7 @@ public class CrossbowsManager extends SkillManager {
}
// Spawn new arrow with the reflected direction
Arrow spawnedArrow = originalArrow.getWorld().spawnArrow(origin, reflectedDirection, 1, 1);
final Arrow spawnedArrow = originalArrow.getWorld().spawnArrow(origin, reflectedDirection, 1, 1);
// copy some properties from the old arrow
spawnedArrow.setShooter(originalArrowShooter);
spawnedArrow.setCritical(originalArrow.isCritical());

View File

@ -90,6 +90,7 @@ class AcrobaticsTest extends MMOTestEnvironment {
private @NotNull EntityDamageEvent mockEntityDamageEvent(double damage) {
final EntityDamageEvent mockEvent = mock(EntityDamageEvent.class);
when(mockEvent.isApplicable(any(EntityDamageEvent.DamageModifier.class))).thenReturn(true);
when(mockEvent.getCause()).thenReturn(EntityDamageEvent.DamageCause.FALL);
when(mockEvent.getFinalDamage()).thenReturn(damage);
when(mockEvent.getDamage(any(EntityDamageEvent.DamageModifier.class))).thenReturn(damage);