aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt')
-rw-r--r--src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt b/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt
new file mode 100644
index 0000000..135ea51
--- /dev/null
+++ b/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt
@@ -0,0 +1,14 @@
+package moe.nea.potatocrime.events
+
+import net.fabricmc.fabric.api.event.EventFactory
+import net.minecraft.entity.Entity
+
+fun interface OnEnterPotatoWorld {
+ fun onEnterPotatoWorld(entity: Entity)
+
+ companion object {
+ val EVENT = EventFactory.createArrayBacked(OnEnterPotatoWorld::class.java) { events ->
+ OnEnterPotatoWorld { entity -> events.forEach { it.onEnterPotatoWorld(entity) } }
+ }
+ }
+} \ No newline at end of file