aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de
diff options
context:
space:
mode:
authorRime <81419447+Emirlol@users.noreply.github.com>2024-07-15 11:45:23 +0300
committerRime <81419447+Emirlol@users.noreply.github.com>2024-07-15 11:45:23 +0300
commit0c183f6a183ffaa53eeaf301e7cc9bb34be28adf (patch)
tree8dce5821f6e882f7d36eaa10b30d4b2f36295fb6 /src/main/java/de
parent714e3948501986ec23a62b01886643ebed6c66f3 (diff)
downloadSkyblocker-0c183f6a183ffaa53eeaf301e7cc9bb34be28adf.tar.gz
Skyblocker-0c183f6a183ffaa53eeaf301e7cc9bb34be28adf.tar.bz2
Skyblocker-0c183f6a183ffaa53eeaf301e7cc9bb34be28adf.zip
Javadoc additions
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/EggFinder.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/EggFinder.java b/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/EggFinder.java
index 72de71d3..e2e70653 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/EggFinder.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/chocolatefactory/EggFinder.java
@@ -42,7 +42,14 @@ public class EggFinder {
private static final Logger logger = LoggerFactory.getLogger("Skyblocker Egg Finder");
//This is most likely unnecessary with the addition of the location change packet, but it works fine and might be doing something so might as well keep it
private static final LinkedList<ArmorStandEntity> armorStandQueue = new LinkedList<>();
+ /**
+ * The locations that the egg finder should work while the player is in.
+ */
private static final Location[] possibleLocations = {Location.CRIMSON_ISLE, Location.CRYSTAL_HOLLOWS, Location.DUNGEON_HUB, Location.DWARVEN_MINES, Location.HUB, Location.THE_END, Location.THE_PARK, Location.GOLD_MINE, Location.DEEP_CAVERNS, Location.SPIDERS_DEN, Location.THE_FARMING_ISLAND};
+ /**
+ * Whether the player is in a location where the egg finder should work.
+ * This is set to false upon world change and will be checked with the location change event afterward.
+ */
private static boolean isLocationCorrect = false;
private EggFinder() {
@@ -182,10 +189,12 @@ public class EggFinder {
public final String texture;
/*
When a new egg spawns in the player's range, the order of packets/messages goes like this:
- set_equipment -> new egg message -> set_entity_data
+ set_equipment → new egg message → set_entity_data
We have to set the egg to null to prevent the highlight from staying where it was before the new egg spawned,
- and doing so causes the found message to get sent twice. This is the reason for the existence of this field, so that we can not send the 2nd message.
- This doesn't fix the field being set twice, but that's not an issue anyway. It'd be much harder to fix the highlight issue mentioned above if it wasn't being set twice.
+ and doing so causes the found message to get sent twice.
+ This is the reason for the existence of this field, so that we don't send the 2nd message.
+ This doesn't fix the field being set twice, but that's not an issue anyway.
+ It'd be much harder to fix the highlight issue mentioned above if it wasn't being set twice.
*/
private long messageLastSent = 0;