aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/mining/OreBlock.kt22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/mining/OreBlock.kt b/src/main/java/at/hannibal2/skyhanni/features/mining/OreBlock.kt
index c5d9774b1..d9b76a35b 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/mining/OreBlock.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/mining/OreBlock.kt
@@ -10,6 +10,7 @@ import at.hannibal2.skyhanni.data.MiningAPI.inSpidersDen
import at.hannibal2.skyhanni.utils.CollectionUtils.equalsOneOf
import net.minecraft.block.BlockColored
import net.minecraft.block.BlockSand
+import net.minecraft.block.BlockSilverfish
import net.minecraft.block.BlockStainedGlass
import net.minecraft.block.BlockStainedGlassPane
import net.minecraft.block.BlockStone
@@ -222,7 +223,7 @@ enum class OreBlock(
checkArea = { inGlacite },
),
LOW_TIER_TUNGSTEN(
- checkBlock = { it.block == Blocks.cobblestone },
+ checkBlock = ::isLowTierTungsten,
checkArea = { inGlacite },
),
HIGH_TIER_TUNGSTEN(
@@ -240,12 +241,10 @@ enum class OreBlock(
}
}
-private fun isLowTierMithril(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
- else -> false
- }
+private fun isLowTierMithril(state: IBlockState): Boolean = when (state.block) {
+ Blocks.wool -> state.getValue(BlockColored.COLOR) == EnumDyeColor.GRAY
+ Blocks.stained_hardened_clay -> state.getValue(BlockColored.COLOR) == EnumDyeColor.CYAN
+ else -> false
}
private fun isHighTierMithril(state: IBlockState): Boolean {
@@ -270,18 +269,21 @@ private fun isHardStoneHollows(state: IBlockState): Boolean {
}
private fun isHardstoneGlacite(state: IBlockState): Boolean =
- (state.block == Blocks.stone && state.getValue(BlockStone.VARIANT) == BlockStone.EnumType.STONE) ||
+ (state.block == Blocks.monster_egg && state.getValue(BlockSilverfish.VARIANT) == BlockSilverfish.EnumType.STONE) ||
(state.block == Blocks.wool && state.getValue(BlockColored.COLOR) == EnumDyeColor.GRAY)
private fun isRedSand(state: IBlockState): Boolean =
(state.block == Blocks.sand && state.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND)
-private fun isLowTierUmber(state: IBlockState): Boolean = state.block == Blocks.hardened_clay ||
- (state.block == Blocks.stained_hardened_clay && state.getValue(BlockColored.COLOR) == EnumDyeColor.BROWN)
+private fun isLowTierUmber(state: IBlockState): Boolean =
+ state.block == Blocks.hardened_clay || (state.block == Blocks.stained_hardened_clay && state.getValue(BlockColored.COLOR) == EnumDyeColor.BROWN)
private fun isHighTierUmber(state: IBlockState): Boolean =
(state.block == Blocks.double_stone_slab2 && state.getValue(BlockStoneSlabNew.VARIANT) == BlockStoneSlabNew.EnumType.RED_SANDSTONE)
+private fun isLowTierTungsten(state: IBlockState): Boolean =
+ state.block == Blocks.monster_egg && state.getValue(BlockSilverfish.VARIANT) == BlockSilverfish.EnumType.COBBLESTONE
+
private fun IBlockState.isGemstoneWithColor(color: EnumDyeColor): Boolean {
return when (this.block) {
Blocks.stained_glass -> color == this.getValue(BlockStainedGlass.COLOR)