aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/potatocrime/events/OnWorldSwap.kt
blob: 135ea51d4c20d3ea7d2509472460c28e9946dc70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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) } }
        }
    }
}