mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Fixed bug where non-player arrows couldn't be deflected.
This commit is contained in:
parent
0574de4a29
commit
b36096e54d
@ -31,6 +31,7 @@ Version 1.4.06-dev
|
|||||||
= Fixed Fishing treasures always having the same enchants
|
= Fixed Fishing treasures always having the same enchants
|
||||||
= Fixed Smelting returning ink sacs instead of Lapis when double-dropping
|
= Fixed Smelting returning ink sacs instead of Lapis when double-dropping
|
||||||
= Fixed bug where players could remain in party chat after leaving or being kicked from a party.
|
= Fixed bug where players could remain in party chat after leaving or being kicked from a party.
|
||||||
|
= Fixed bug where non-player arrows couldn't be deflected.
|
||||||
! Changed Berserk to add items to inventory rather than denying pickup
|
! Changed Berserk to add items to inventory rather than denying pickup
|
||||||
! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)
|
! Changed Call of the Wild, newly summoned pet's will have a custom name. (added permission node to disable this)
|
||||||
! Changed Chimaera Wing's recipe result to use the ingredient Material
|
! Changed Chimaera Wing's recipe result to use the ingredient Material
|
||||||
|
@ -284,6 +284,24 @@ public final class CombatUtils {
|
|||||||
swordsManager.counterAttackChecks((LivingEntity) damager, event.getDamage());
|
swordsManager.counterAttackChecks((LivingEntity) damager, event.getDamage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (damager.getType() == EntityType.ARROW) {
|
||||||
|
LivingEntity shooter = ((Arrow) damager).getShooter();
|
||||||
|
|
||||||
|
if (shooter instanceof Player || !SkillType.UNARMED.getPVEEnabled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
UnarmedManager unarmedManager = mcMMOPlayer.getUnarmedManager();
|
||||||
|
|
||||||
|
if (unarmedManager.canDeflect()) {
|
||||||
|
event.setCancelled(unarmedManager.deflectCheck());
|
||||||
|
|
||||||
|
if (event.isCancelled()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (attacker instanceof Player) {
|
else if (attacker instanceof Player) {
|
||||||
Player player = (Player) attacker;
|
Player player = (Player) attacker;
|
||||||
|
Loading…
Reference in New Issue
Block a user