From fed6dcafd7cc1b3711dc4ff6da6666f284b1a211 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Mon, 28 Feb 2022 10:09:31 +0000 Subject: [PATCH] Fixed spawn totems --- .../com/willfp/ecobosses/spawn/SpawnTotemHandler.kt | 2 +- .../main/kotlin/com/willfp/ecobosses/util/SpawnTotem.kt | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/SpawnTotemHandler.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/SpawnTotemHandler.kt index 8868645..0e0d63b 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/SpawnTotemHandler.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/spawn/SpawnTotemHandler.kt @@ -45,7 +45,7 @@ class SpawnTotemHandler : Listener { continue } - if (boss.totem != placedTotem) { + if (!boss.totem.matches(placedTotem)) { continue } diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/SpawnTotem.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/SpawnTotem.kt index 47422f0..20da570 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/SpawnTotem.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecobosses/util/SpawnTotem.kt @@ -6,4 +6,10 @@ data class SpawnTotem( val top: Material, val middle: Material, val bottom: Material -) +) { + fun matches(totem: SpawnTotem): Boolean { + return this.top == totem.top + && this.middle == totem.middle + && this.bottom == totem.bottom + } +}