diff options
author | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-15 06:20:59 -0230 |
---|---|---|
committer | ThatGravyBoat <thatgravyboat@gmail.com> | 2021-07-15 06:20:59 -0230 |
commit | edb756fb816dd196b2774d081f2061a14a86527b (patch) | |
tree | 3b83fcd790916119d7741c9eec79da858681258a /src/main/java/com/thatgravyboat/skyblockhud/handlers | |
parent | 4e4058da31c3575b69c69d2d7bb3c9af29e248dc (diff) | |
download | SkyblockHud-Death-Defied-edb756fb816dd196b2774d081f2061a14a86527b.tar.gz SkyblockHud-Death-Defied-edb756fb816dd196b2774d081f2061a14a86527b.tar.bz2 SkyblockHud-Death-Defied-edb756fb816dd196b2774d081f2061a14a86527b.zip |
removed 2 random loggers and fixed crystal waypoints show up if you went directly to hypixel hub from crystal hollows
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java index 4e9c6c0..6354591 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java @@ -22,6 +22,7 @@ import net.minecraft.util.BlockPos; import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.client.event.RenderWorldLastEvent; +import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class CrystalWaypoints { @@ -40,6 +41,15 @@ public class CrystalWaypoints { } @SubscribeEvent + public void onWorldChange(EntityJoinWorldEvent event) { + if (event.entity != null) { + if (event.entity.getUniqueID().equals(Minecraft.getMinecraft().thePlayer.getUniqueID())) { + waypoints.clear(); + } + } + } + + @SubscribeEvent public void onLocationChange(LocationChangeEvent event) { if (!event.newLocation.getCategory().equals(LocationCategory.CRYSTALHOLLOWS)) { waypoints.clear(); |