mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Smaller bounds on fishing scarcity
This commit is contained in:
parent
fef9058e16
commit
2d849f55e5
@ -10,7 +10,10 @@ Key:
|
|||||||
Version 2.1.19
|
Version 2.1.19
|
||||||
Improved Fishing AFK detection
|
Improved Fishing AFK detection
|
||||||
Fixed a bug where Fishing AFK detection did not work on a new exploit
|
Fixed a bug where Fishing AFK detection did not work on a new exploit
|
||||||
|
Players who get detected by Fishing's anti-exploit measures will no longer get vanilla rewards from Minecraft
|
||||||
|
**Note: Previously if mcMMO detected you abusing Fishing it just switched you over to vanilla Minecraft fishing rewards, this change is to help server admins who don't want players to get any kind of reward from AFK fishing
|
||||||
Fishing now drops several hints to players if they are triggering the exploit detection
|
Fishing now drops several hints to players if they are triggering the exploit detection
|
||||||
|
**Note: Not all types of exploit detection will warn players, this is just to prevent legitimate fishers from being confused by the aggressive exploit detection.
|
||||||
Added messages to warn players about fishing in the same spot
|
Added messages to warn players about fishing in the same spot
|
||||||
Added messages to warn players about casting too often
|
Added messages to warn players about casting too often
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ public class FishingManager extends SkillManager {
|
|||||||
private final long FISHING_COOLDOWN_SECONDS = 1000L;
|
private final long FISHING_COOLDOWN_SECONDS = 1000L;
|
||||||
|
|
||||||
private long fishingTimestamp = 0L;
|
private long fishingTimestamp = 0L;
|
||||||
|
private long lastWarned = 0L;
|
||||||
private BoundingBox lastFishingBoundingBox;
|
private BoundingBox lastFishingBoundingBox;
|
||||||
private Item fishingCatch;
|
private Item fishingCatch;
|
||||||
private Location hookLocation;
|
private Location hookLocation;
|
||||||
@ -65,12 +66,14 @@ public class FishingManager extends SkillManager {
|
|||||||
long currentTime = System.currentTimeMillis();
|
long currentTime = System.currentTimeMillis();
|
||||||
boolean hasFished = (currentTime < fishingTimestamp + (FISHING_COOLDOWN_SECONDS * 10));
|
boolean hasFished = (currentTime < fishingTimestamp + (FISHING_COOLDOWN_SECONDS * 10));
|
||||||
|
|
||||||
if(hasFished)
|
if(hasFished && lastWarned + (1000 * 5) < System.currentTimeMillis())
|
||||||
{
|
{
|
||||||
getPlayer().sendMessage(LocaleLoader.getString("Fishing.Scared"));
|
getPlayer().sendMessage(LocaleLoader.getString("Fishing.Scared"));
|
||||||
fishingTimestamp = currentTime;
|
lastWarned = System.currentTimeMillis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fishingTimestamp = currentTime;
|
||||||
|
|
||||||
return hasFished;
|
return hasFished;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,7 +104,7 @@ public class FishingManager extends SkillManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static BoundingBox makeBoundingBox(Vector centerOfCastVector) {
|
public static BoundingBox makeBoundingBox(Vector centerOfCastVector) {
|
||||||
return BoundingBox.of(centerOfCastVector, 2, 2, 2);
|
return BoundingBox.of(centerOfCastVector, 1, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFishingTarget() {
|
public void setFishingTarget() {
|
||||||
|
Loading…
Reference in New Issue
Block a user