mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-30 00:56:47 +01:00
Check the target fishing location
This commit is contained in:
parent
9aae4825cc
commit
6592562c56
@ -324,16 +324,19 @@ public class PlayerListener implements Listener {
|
||||
case FISHING:
|
||||
if (fishingManager.canMasterAngler()) {
|
||||
fishingManager.masterAngler(event.getHook());
|
||||
fishingManager.setFishingTarget();
|
||||
}
|
||||
return;
|
||||
|
||||
case CAUGHT_FISH:
|
||||
fishingManager.handleFishing((Item) caught);
|
||||
fishingManager.setFishingTarget();
|
||||
return;
|
||||
|
||||
case CAUGHT_ENTITY:
|
||||
if (fishingManager.canShake(caught)) {
|
||||
fishingManager.shakeCheck((LivingEntity) caught);
|
||||
fishingManager.setFishingTarget();
|
||||
}
|
||||
return;
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class FishingManager extends SkillManager {
|
||||
}
|
||||
|
||||
long currentTime = System.currentTimeMillis();
|
||||
boolean hasFished = (currentTime < fishingTimestamp + FISHING_COOLDOWN_SECONDS);
|
||||
boolean hasFished = (currentTime < fishingTimestamp + (FISHING_COOLDOWN_SECONDS * 10));
|
||||
|
||||
if(hasFished == true)
|
||||
fishingTimestamp = currentTime;
|
||||
@ -77,6 +77,10 @@ public class FishingManager extends SkillManager {
|
||||
return hasFished || sameTarget;
|
||||
}
|
||||
|
||||
public void setFishingTarget() {
|
||||
getPlayer().getTargetBlock(BlockUtils.getTransparentBlocks(), 100);
|
||||
}
|
||||
|
||||
public boolean canIceFish(Block block) {
|
||||
if (getSkillLevel() < RankUtils.getUnlockLevel(SubSkillType.FISHING_ICE_FISHING)) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user