mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Tweak archery distance XP function to reward better.
This commit is contained in:
parent
d2cb88d93b
commit
1e7b54ef0d
@ -29,7 +29,8 @@ public class Archery {
|
||||
public static boolean pvpEnabled = Config.getInstance().getArcheryPVP();
|
||||
public static boolean pveEnabled = Config.getInstance().getArcheryPVE();
|
||||
|
||||
public static double distanceXpModifer = 0.1;
|
||||
public static double distanceXpModifer = 0.025;
|
||||
|
||||
protected static void incrementTrackerValue(LivingEntity livingEntity) {
|
||||
for (TrackedEntity trackedEntity : trackedEntities) {
|
||||
if (trackedEntity.getLivingEntity().getEntityId() == livingEntity.getEntityId()) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user