mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-02 12:35:27 +02:00
Propose: Add an option for Exploiting Fishing. (#4619)
* feat: Add exploiting option for fishing * Update experience.yml Let's change how this was named * Update ExperienceConfig.java Let's change how this was named Co-authored-by: Robert Alan Chapton <nossr50@gmail.com>
This commit is contained in:
@@ -43,7 +43,6 @@ import java.util.*;
|
||||
|
||||
public class FishingManager extends SkillManager {
|
||||
public static final int FISHING_ROD_CAST_CD_MILLISECONDS = 100;
|
||||
public static final int OVERFISH_LIMIT = 10;
|
||||
private final long FISHING_COOLDOWN_SECONDS = 1000L;
|
||||
|
||||
private long fishingRodCastTimestamp = 0L;
|
||||
@@ -143,20 +142,21 @@ public class FishingManager extends SkillManager {
|
||||
else
|
||||
fishCaughtCounter = 1;
|
||||
|
||||
if(fishCaughtCounter + 1 == OVERFISH_LIMIT)
|
||||
if(fishCaughtCounter + 1 == ExperienceConfig.getInstance().getFishingExploitingOptionOverFishLimit())
|
||||
{
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Fishing.LowResourcesTip", 3));
|
||||
getPlayer().sendMessage(LocaleLoader.getString("Fishing.LowResourcesTip", ExperienceConfig.getInstance().getFishingExploitingOptionMoveRange()));
|
||||
}
|
||||
|
||||
//If the new bounding box does not intersect with the old one, then update our bounding box reference
|
||||
if(!sameTarget)
|
||||
lastFishingBoundingBox = newCastBoundingBox;
|
||||
|
||||
return sameTarget && fishCaughtCounter >= OVERFISH_LIMIT;
|
||||
return sameTarget && fishCaughtCounter >= ExperienceConfig.getInstance().getFishingExploitingOptionOverFishLimit();
|
||||
}
|
||||
|
||||
public static BoundingBox makeBoundingBox(Vector centerOfCastVector) {
|
||||
return BoundingBox.of(centerOfCastVector, 1, 1, 1);
|
||||
int exploitingRange = ExperienceConfig.getInstance().getFishingExploitingOptionMoveRange();
|
||||
return BoundingBox.of(centerOfCastVector, exploitingRange / 2, 1, exploitingRange / 2);
|
||||
}
|
||||
|
||||
public void setFishingTarget() {
|
||||
|
Reference in New Issue
Block a user