Skip to content

Commit

Permalink
refactor: Remove BindToMythicMobSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
0ffz committed Aug 4, 2024
1 parent d2523dc commit 7edb594
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,19 @@ import com.mineinabyss.idofront.plugin.listeners
val mobzyMythicMobs: MythicMobsSupport by DI.observe()

interface MythicMobsSupport {
val mythicMobBinds: QueryGroupedBy<String, ShorthandQuery1<BindToMythicMob>>

companion object : GearyAddonWithDefault<MythicMobsSupport> {
override fun default() = object : MythicMobsSupport {
override val mythicMobBinds = geary.cacheGroupedBy(query<BindToMythicMob>()) { (type) ->
entity.addRelation<NoInherit, BindToMythicMob>()
type.id
}
}

override fun MythicMobsSupport.install(): Unit = geary.run {
runMMSkillAction()
mythicMobSpawner()
markMMAsCustomMob()
markBindMMAsCustomMob()

pipeline.runOnOrAfter(GearyPhase.ENABLE) {
gearyPaper.plugin.listeners(
MythicMobDropListener(),
MythicSkillRegisterListener(),
BindToMythicMobSystem(),
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
package com.mineinabyss.geary.papermc.mythicmobs.items

import com.mineinabyss.geary.papermc.tracking.items.gearyItems
import com.mineinabyss.geary.papermc.tracking.items.helpers.GearyItemPrefabQuery.Companion.getKeys
import com.mineinabyss.geary.prefabs.PrefabKey
import com.mineinabyss.idofront.messaging.logError
import io.lumine.mythic.bukkit.adapters.BukkitItemStack
import io.lumine.mythic.bukkit.adapters.item.ItemComponentBukkitItemStack
import io.lumine.mythic.bukkit.events.MythicDropLoadEvent
import io.lumine.mythic.bukkit.utils.numbers.RandomDouble
import io.lumine.mythic.core.drops.DropMetadataImpl
import io.lumine.mythic.core.drops.droppables.ItemDrop
import io.lumine.mythic.core.drops.droppables.VanillaItemDrop
import org.bukkit.event.EventHandler
import org.bukkit.event.Listener
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,3 @@ fun GearyModule.markMMAsCustomMob() = observe<OnSet>()
entity.add<ShowInMobQueries>()
entity.add<SpawnableByGeary>()
}

fun GearyModule.markBindMMAsCustomMob() = observe<OnSet>()
.involving(query<BindToMythicMob>())
.exec { entity.add<ShowInMobQueries>() }

0 comments on commit 7edb594

Please sign in to comment.