From 6b4c633716f6998461d701f7c841a16e59c1794b Mon Sep 17 00:00:00 2001 From: hannibal2 <24389977+hannibal00212@users.noreply.github.com> Date: Tue, 25 Jul 2023 03:39:11 +0200 Subject: renamed Effigies --- .../rift/area/stillgorechateau/RiftBloodEffigies.kt | 20 ++++++++++---------- .../skyhanni/utils/jsonobjects/RiftEffigiesJson.java | 11 +++++++++++ .../skyhanni/utils/jsonobjects/RiftEffingesJson.java | 11 ----------- 3 files changed, 21 insertions(+), 21 deletions(-) create mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffigiesJson.java delete mode 100644 src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffingesJson.java (limited to 'src') diff --git a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt index 9892be944..5af25554e 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/rift/area/stillgorechateau/RiftBloodEffigies.kt @@ -11,7 +11,7 @@ import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText import at.hannibal2.skyhanni.utils.StringUtils.matchMatcher -import at.hannibal2.skyhanni.utils.jsonobjects.RiftEffingesJson +import at.hannibal2.skyhanni.utils.jsonobjects.RiftEffigiesJson import net.minecraft.entity.item.EntityArmorStand import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -19,7 +19,7 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent class RiftBloodEffigies { private val config get() = RiftAPI.config.area.stillgoreChateauConfig.bloodEffigies private var locations: List = emptyList() - private var effingesTime = mapOf( + private var effigiesTimes = mapOf( 0 to -1L, 1 to -1L, 2 to -1L, @@ -32,7 +32,7 @@ class RiftBloodEffigies { @SubscribeEvent fun onWorldSwitch(event: LorenzWorldSwitchEvent) { - effingesTime = mapOf( + effigiesTimes = mapOf( 0 to -1L, 1 to -1L, 2 to -1L, @@ -44,9 +44,9 @@ class RiftBloodEffigies { @SubscribeEvent fun onRepoReload(event: RepositoryReloadEvent) { - event.getConstant("RiftEffinges")?.locations?.let { + event.getConstant("RiftEffigies")?.locations?.let { if (it.size != 6) { - error("Invalid rift effinges size: ${it.size} (expeced 6)") + error("Invalid rift effigies size: ${it.size} (expeced 6)") } locations = it } @@ -63,19 +63,19 @@ class RiftBloodEffigies { val split = hearts.split("§").drop(1) for ((index, s) in split.withIndex()) { - val time = effingesTime[index]!! + val time = effigiesTimes[index]!! val diff = time - System.currentTimeMillis() if (diff < 0L) { if (s == "7") { if (time != 0L) { LorenzUtils.chat("§e[SkyHanni] Effigies #${index + 1} respawned!") - effingesTime = effingesTime.editCopy { this[index] = 0L } + effigiesTimes = effigiesTimes.editCopy { this[index] = 0L } } } else { if (time != -1L) { LorenzUtils.chat("§e[SkyHanni] Effigies #${index + 1} got killed!") val endTime = System.currentTimeMillis() + 1_000 * 60 * 10 - effingesTime = effingesTime.editCopy { this[index] = endTime } + effigiesTimes = effigiesTimes.editCopy { this[index] = endTime } } } } @@ -94,7 +94,7 @@ class RiftBloodEffigies { val string = group("time") val time = TimeUtils.getMillis(string) - effingesTime = effingesTime.editCopy { this[index] = System.currentTimeMillis() + time } + effigiesTimes = effigiesTimes.editCopy { this[index] = System.currentTimeMillis() + time } } } } @@ -105,7 +105,7 @@ class RiftBloodEffigies { for ((index, location) in locations.withIndex()) { val name = "Effigies #${index + 1}" - val duration = effingesTime[index]!! + val duration = effigiesTimes[index]!! if (duration == -1L) { if (config.unknownTime) { diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffigiesJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffigiesJson.java new file mode 100644 index 000000000..85453a3bf --- /dev/null +++ b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffigiesJson.java @@ -0,0 +1,11 @@ +package at.hannibal2.skyhanni.utils.jsonobjects; + +import at.hannibal2.skyhanni.utils.LorenzVec; +import com.google.gson.annotations.Expose; + +import java.util.List; + +public class RiftEffigiesJson { + @Expose + public List locations; +} diff --git a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffingesJson.java b/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffingesJson.java deleted file mode 100644 index 47c10c2c9..000000000 --- a/src/main/java/at/hannibal2/skyhanni/utils/jsonobjects/RiftEffingesJson.java +++ /dev/null @@ -1,11 +0,0 @@ -package at.hannibal2.skyhanni.utils.jsonobjects; - -import at.hannibal2.skyhanni.utils.LorenzVec; -import com.google.gson.annotations.Expose; - -import java.util.List; - -public class RiftEffingesJson { - @Expose - public List locations; -} -- cgit