Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Cache SpawnTask event archetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Feb 5, 2024
1 parent 93822df commit 3abdfe0
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<KeepArchetype>()
target.callEvent(init = {
add<KeepArchetype>()
set(spawnInfo)
set(
Variables.Evaluated(
Expand Down

0 comments on commit 3abdfe0

Please sign in to comment.