aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
index 776ba7f6c..5138ebf35 100644
--- a/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
+++ b/src/main/java/at/hannibal2/skyhanni/utils/BlockUtils.kt
@@ -1,6 +1,7 @@
package at.hannibal2.skyhanni.utils
import net.minecraft.block.Block
+import net.minecraft.block.state.IBlockState
import net.minecraft.client.Minecraft
import net.minecraft.tileentity.TileEntitySkull
import net.minecraft.util.BlockPos
@@ -9,7 +10,10 @@ import net.minecraftforge.common.util.Constants
object BlockUtils {
fun LorenzVec.getBlockAt(): Block =
- Minecraft.getMinecraft().theWorld.getBlockState(toBlocPos()).block
+ getBlockStateAt().block
+
+ fun LorenzVec.getBlockStateAt(): IBlockState =
+ Minecraft.getMinecraft().theWorld.getBlockState(toBlocPos())
fun LorenzVec.isInLoadedChunk(): Boolean =
Minecraft.getMinecraft().theWorld.chunkProvider.provideChunk(toBlocPos()).isLoaded