aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/repo
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-03-06 21:04:18 +0100
committerLinnea Gräf <nea@nea.moe>2025-03-08 16:01:00 +0100
commit9099abe955d88f7e0f1a1a8feba519a8a098858d (patch)
treeb4c4a1e243719d55c4fe077c87a17e86402786da /src/main/kotlin/repo
parentebd2f270c385e3cbf0bfd3ee5db8bc4b65700c98 (diff)
downloadFirmament-9099abe955d88f7e0f1a1a8feba519a8a098858d.tar.gz
Firmament-9099abe955d88f7e0f1a1a8feba519a8a098858d.tar.bz2
Firmament-9099abe955d88f7e0f1a1a8feba519a8a098858d.zip
feat: Add custom hardness tooltips
Diffstat (limited to 'src/main/kotlin/repo')
-rw-r--r--src/main/kotlin/repo/MiningRepoData.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/kotlin/repo/MiningRepoData.kt b/src/main/kotlin/repo/MiningRepoData.kt
index bbaeea3..46eaeb0 100644
--- a/src/main/kotlin/repo/MiningRepoData.kt
+++ b/src/main/kotlin/repo/MiningRepoData.kt
@@ -13,6 +13,7 @@ import net.minecraft.item.ItemStack
import net.minecraft.nbt.NbtCompound
import moe.nea.firmament.repo.ReforgeStore.kJson
import moe.nea.firmament.util.MC
+import moe.nea.firmament.util.SBData
import moe.nea.firmament.util.SkyBlockIsland
import moe.nea.firmament.util.SkyblockId
@@ -51,6 +52,10 @@ class MiningRepoData : IReloadable {
@Transient
val block = convertToModernBlock()
+ val isCurrentlyActive: Boolean
+ get() = isActiveIn(SBData.skyblockLocation ?: SkyBlockIsland.NIL)
+ fun isActiveIn(location: SkyBlockIsland) = onlyIn == null || location in onlyIn
+
private fun convertToModernBlock(): Block? {
// TODO: this should be in a shared util, really
val newCompound = ItemCache.convert189ToModern(NbtCompound().apply {