From 73923b95863f28aec8811e2ac11f89a7ddf3b862 Mon Sep 17 00:00:00 2001 From: xtex Date: Thu, 27 Jul 2023 20:39:44 +0800 Subject: [PATCH] fix: causality anchor on causality anchor --- common/src/main/kotlin/quaedam/misc/causality/CABlock.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/quaedam/misc/causality/CABlock.kt b/common/src/main/kotlin/quaedam/misc/causality/CABlock.kt index 95a7efc..80c471e 100644 --- a/common/src/main/kotlin/quaedam/misc/causality/CABlock.kt +++ b/common/src/main/kotlin/quaedam/misc/causality/CABlock.kt @@ -44,7 +44,7 @@ object CABlock : HorizontalDirectionalBlock( } override fun getStateForPlacement(context: BlockPlaceContext): BlockState? { - if (context.level.getBlockState(context.clickedPos.below()).isAir) return null + if (!context.level.getBlockState(context.clickedPos.below()).canOcclude()) return null return super.defaultBlockState().setValue(FACING, context.horizontalDirection) } @@ -102,7 +102,7 @@ object CABlock : HorizontalDirectionalBlock( movedByPiston: Boolean ) { super.neighborChanged(state, level, pos, neighborBlock, neighborPos, movedByPiston) - if (level.getBlockState(pos.below()).isAir) { + if (!level.getBlockState(pos.below()).canOcclude()) { level.destroyBlock(pos, true) } }