🐛 fix: d

Signed-off-by: Pauline <git@ethanlibs.co>
This commit is contained in:
Pauline
2025-03-03 17:02:34 +01:00
committed by Linnea Gräf
parent af2a6d7a55
commit e2f3ed48d2
3 changed files with 24 additions and 7 deletions

View File

@@ -14,10 +14,8 @@ import moe.nea.licenseextractificator.LicenseDiscoveryTask
import moe.nea.mcautotranslations.gradle.CollectTranslations
import net.fabricmc.loom.LoomGradleExtension
import org.apache.tools.ant.taskdefs.condition.Os
import org.gradle.platform.OperatingSystem
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.plugin.SubpluginOption
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsPlugin.Companion.kotlinNodeJsEnvSpec
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.nio.charset.StandardCharsets
import java.util.Base64
@@ -233,7 +231,7 @@ val jadeSourceSet = createIsolatedSourceSet("jade")
val modmenuSourceSet = createIsolatedSourceSet("modmenu")
val reiSourceSet = createIsolatedSourceSet("rei")
val moulconfigSourceSet = createIsolatedSourceSet("moulconfig")
val customTexturesSourceSet = createIsolatedSourceSet("texturePacks", "texturePacks")
val customTexturesSourceSet = createIsolatedSourceSet("texturePacks")
dependencies {
// Minecraft dependencies

View File

@@ -1,22 +1,29 @@
package moe.nea.firmament.compat.jade
import com.google.common.collect.Lists
import snownee.jade.addon.harvest.SimpleToolHandler
import snownee.jade.addon.harvest.ToolHandler
import net.minecraft.block.BlockState
import net.minecraft.client.MinecraftClient
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import net.minecraft.util.Identifier
import net.minecraft.util.math.BlockPos
import net.minecraft.world.World
import moe.nea.firmament.util.SBData
class SimpleToolHandler(
class DrillToolHandler(
private val uid: Identifier,
private val tools: MutableList<ItemStack>
) : ToolHandler {
constructor(uid: Identifier, tools: MutableList<Item>) : this(uid, Lists.transform(tools, Item::getDefaultStack))
override fun test(state: BlockState, world: World, pos: BlockPos): ItemStack {
TODO("We need to override the existing tool handler tests because they use state.getHardness(world, pos) instead of using Breaking Power")
if (isOnMiningIsland()) {
}
// TODO: figure out how this work
return SimpleToolHandler.create(uid, tools.map {
return@map it.item
}).test(state, world, pos)
}
override fun getTools(): List<ItemStack> {

View File

@@ -6,6 +6,8 @@ import snownee.jade.api.ui.IElementHelper
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.util.Identifier
import moe.nea.firmament.util.SBData
import moe.nea.firmament.util.SkyBlockIsland
import moe.nea.firmament.util.SkyblockId
import moe.nea.firmament.util.setSkyBlockId
@@ -18,3 +20,13 @@ val drillIcon: IElement = IElementHelper.get().item(drillItem, 0.5f).message(nul
fun IWailaClientRegistration.registerGemstone(type: String) {
}
fun isOnMiningIsland(): Boolean {
if (!SBData.isOnSkyblock) return false
// how does a when loop work
if (SBData.skyblockLocation == SkyBlockIsland.forMode("dwarven_mines")) return true
if (SBData.skyblockLocation == SkyBlockIsland.MINESHAFT) return true
if (SBData.skyblockLocation == SkyBlockIsland.forMode("crystal_hollows")) return true
if (SBData.skyblockLocation == SkyBlockIsland.forMode("crimson_isle")) return true
return false
}