aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud/handlers
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/handlers')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud/handlers/CrystalWaypoints.java10
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();