diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java index cf56f862d..88f23185e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/PosUtil.java @@ -37,7 +37,8 @@ public class PosUtil{ } public static int getMetadata(BlockPos pos, IBlockAccess world){ - return getBlock(pos, world).getMetaFromState(world.getBlockState(pos)); + Block block = getBlock(pos, world); + return block != null ? getBlock(pos, world).getMetaFromState(world.getBlockState(pos)) : 0; } public static BlockPos offset(BlockPos pos, int x, int y, int z){