From 3abdfe0b5a4c029db497cf8b8b6873dde5a5cd8a Mon Sep 17 00:00:00 2001 From: Danielle Voznyy Date: Mon, 5 Feb 2024 00:01:24 -0500 Subject: [PATCH] Cache SpawnTask event archetypes --- .../main/kotlin/com/mineinabyss/mobzy/spawning/SpawnTask.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mobzy-spawning/src/main/kotlin/com/mineinabyss/mobzy/spawning/SpawnTask.kt b/mobzy-spawning/src/main/kotlin/com/mineinabyss/mobzy/spawning/SpawnTask.kt index 58eff95c..359ba692 100644 --- a/mobzy-spawning/src/main/kotlin/com/mineinabyss/mobzy/spawning/SpawnTask.kt +++ b/mobzy-spawning/src/main/kotlin/com/mineinabyss/mobzy/spawning/SpawnTask.kt @@ -3,6 +3,7 @@ package com.mineinabyss.mobzy.spawning import com.github.shynixn.mccoroutine.bukkit.asyncDispatcher import com.github.shynixn.mccoroutine.bukkit.launch import com.github.shynixn.mccoroutine.bukkit.minecraftDispatcher +import com.mineinabyss.geary.components.KeepArchetype import com.mineinabyss.geary.components.RequestCheck import com.mineinabyss.geary.components.events.FailedCheck import com.mineinabyss.geary.datatypes.GearyEntity @@ -110,7 +111,9 @@ class SpawnTask { val spawnLoc = spawnInfo.getSpawnFor(choice.get() ?: SpawnPosition.GROUND) val spawnCheckLoc = spawnLoc.clone().add(0.0, -1.0, 0.0) val success = temporaryEntity { target -> //TODO should just pass null for target + target.add() target.callEvent(init = { + add() set(spawnInfo) set( Variables.Evaluated(