mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-07-01 13:14:44 +02:00
Tweak archery distance XP function to reward better.
This commit is contained in:
@ -19,9 +19,9 @@ public class ArcheryManager extends SkillManager {
|
||||
public void distanceXpBonus(LivingEntity target) {
|
||||
Location shooterLocation = player.getEyeLocation();
|
||||
Location targetLocation = target.getLocation();
|
||||
double distance = shooterLocation.distance(targetLocation);
|
||||
double squaredDistance = shooterLocation.distanceSquared(targetLocation);
|
||||
|
||||
int bonusXp = (int) (distance * Archery.distanceXpModifer);
|
||||
int bonusXp = (int) (squaredDistance * Archery.distanceXpModifer);
|
||||
SkillTools.xpProcessing(player, profile, SkillType.ARCHERY, bonusXp);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user