aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java b/src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java
index 03a698b..083b575 100644
--- a/src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java
+++ b/src/main/java/com/thatgravyboat/skyblockhud/location/FarmingIslandHandler.java
@@ -1,29 +1,31 @@
package com.thatgravyboat.skyblockhud.location;
import com.thatgravyboat.skyblockhud.api.events.SidebarPostEvent;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-
import java.util.Arrays;
+import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
public class FarmingIslandHandler {
- public static Locations location = Locations.NONE;
- public static int pelts;
+ public static Locations location = Locations.NONE;
+ public static int pelts;
- @SubscribeEvent
- public void onSidebarPost(SidebarPostEvent event) {
- boolean isTracking = Arrays.toString(event.arrayScores).toLowerCase().contains("tracker mob location:");
- if (isTracking && location == Locations.NONE) {
- for (int i = 0; i < event.scores.size(); i++) {
- String line = event.scores.get(i);
- if (line.toLowerCase().contains("tracker mob location:") && i > 2){
- location = Locations.get(event.scores.get(i - 1).toLowerCase());
- break;
- }
- }
- }
- if (!isTracking && location != Locations.NONE){
- location = Locations.NONE;
+ @SubscribeEvent
+ public void onSidebarPost(SidebarPostEvent event) {
+ boolean isTracking = Arrays
+ .toString(event.arrayScores)
+ .toLowerCase()
+ .contains("tracker mob location:");
+ if (isTracking && location == Locations.NONE) {
+ for (int i = 0; i < event.scores.size(); i++) {
+ String line = event.scores.get(i);
+ if (line.toLowerCase().contains("tracker mob location:") && i > 2) {
+ location = Locations.get(event.scores.get(i - 1).toLowerCase());
+ break;
}
+ }
+ }
+ if (!isTracking && location != Locations.NONE) {
+ location = Locations.NONE;
}
+ }
}