Skip to content

Commit

Permalink
added missing hardstone blocks in ch (ty Fix3dll)
Browse files Browse the repository at this point in the history
Signed-off-by: ItsEmpa <itsempa@users.noreply.github.com>
  • Loading branch information
ItsEmpa committed Sep 20, 2024
1 parent 1d8c123 commit 584a475
Showing 1 changed file with 22 additions and 8 deletions.
30 changes: 22 additions & 8 deletions src/main/java/at/hannibal2/skyhanni/features/mining/OreBlock.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import net.minecraft.block.state.IBlockState
import net.minecraft.init.Blocks
import net.minecraft.item.EnumDyeColor


enum class OreBlock(
val checkBlock: (IBlockState) -> Boolean,
val checkArea: () -> Boolean,
Expand Down Expand Up @@ -145,27 +146,32 @@ enum class OreBlock(
checkBlock = { it.block == Blocks.coal_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
PURE_IRON( // currently not detected
PURE_IRON(
// currently not detected
checkBlock = { it.block == Blocks.iron_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
PURE_GOLD( // currently not detected
PURE_GOLD(
// currently not detected
checkBlock = { it.block == Blocks.gold_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
PURE_LAPIS(
checkBlock = { it.block == Blocks.lapis_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
PURE_REDSTONE( // currently not detected
PURE_REDSTONE(
// currently not detected
checkBlock = { it.block == Blocks.redstone_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
PURE_EMERALD( // currently not detected
PURE_EMERALD(
// currently not detected
checkBlock = { it.block == Blocks.emerald_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
PURE_DIAMOND( // currently not detected
PURE_DIAMOND(
// currently not detected
checkBlock = { it.block == Blocks.diamond_block },
checkArea = { inDwarvenMines || inCrystalHollows },
),
Expand Down Expand Up @@ -274,9 +280,17 @@ private fun isStone(state: IBlockState): Boolean {

private fun isHardStoneHollows(state: IBlockState): Boolean {
return when (state.block) {
Blocks.wool -> (state.getValue(BlockColored.COLOR) == EnumDyeColor.GRAY)
Blocks.stained_hardened_clay -> (state.getValue(BlockColored.COLOR) == EnumDyeColor.CYAN)
Blocks.stone -> (state.getValue(BlockStone.VARIANT) == BlockStone.EnumType.STONE)
Blocks.wool -> {
val color = state.getValue(BlockColored.COLOR)
color == EnumDyeColor.GRAY || color == EnumDyeColor.GREEN
}
Blocks.stained_hardened_clay -> when (state.getValue(BlockColored.COLOR)) {
EnumDyeColor.CYAN, EnumDyeColor.BROWN, EnumDyeColor.GRAY, EnumDyeColor.BLACK,
EnumDyeColor.LIME, EnumDyeColor.GREEN, EnumDyeColor.BLUE, EnumDyeColor.RED,
EnumDyeColor.SILVER -> true
else -> false
}
Blocks.clay, Blocks.stonebrick, Blocks.stone -> true
else -> false
}
}
Expand Down

0 comments on commit 584a475

Please sign in to comment.