Fix threading issue when changed the destination position of the end portal

This commit is contained in:
MrHua269
2025-01-31 21:40:12 +08:00
parent 1c3358728a
commit a92a95b296
2 changed files with 6 additions and 4 deletions

View File

@@ -310,10 +310,10 @@ index 0000000000000000000000000000000000000000..cf87a7cce5d1ebec9709b76259560934
+}
diff --git a/src/main/java/me/earthme/luminol/api/portal/PortalLocateEvent.java b/src/main/java/me/earthme/luminol/api/portal/PortalLocateEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..2b67f99aafda11eebc55386c503e34772de6cd8a
index 0000000000000000000000000000000000000000..c8ded49d74a06995c0388d47a5cbf3c070a03abb
--- /dev/null
+++ b/src/main/java/me/earthme/luminol/api/portal/PortalLocateEvent.java
@@ -0,0 +1,62 @@
@@ -0,0 +1,64 @@
+package me.earthme.luminol.api.portal;
+
+import org.apache.commons.lang3.Validate;
@@ -324,6 +324,8 @@ index 0000000000000000000000000000000000000000..2b67f99aafda11eebc55386c503e3477
+
+/**
+ * A event fired when the portal process started locating the destination position
+ * Notice: If you changed the destination to an another position in end teleportation.The end platform won't create under the entity and won't create
+ * if the position is out of current tick region
+ */
+public class PortalLocateEvent extends Event {
+ private static final HandlerList HANDLERS = new HandlerList();