feat: disable causality anchor in water

This commit is contained in:
xtex 2023-07-28 10:00:13 +08:00
parent 34ae57e259
commit 3cab891af0
Signed by: xtex
GPG Key ID: B918086ED8045B91
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,6 @@ import net.minecraft.world.phys.shapes.VoxelShape
object CABlock : HorizontalDirectionalBlock(
Properties.of()
.lightLevel { 2 }
.noOcclusion()
.strength(2f)
.requiresCorrectToolForDrops()

View File

@ -5,6 +5,7 @@ import net.minecraft.world.item.BlockItem
import net.minecraft.world.item.Item
import net.minecraft.world.level.Level
import net.minecraft.world.level.block.entity.BlockEntityType
import net.minecraft.world.level.block.state.properties.BlockStateProperties
import quaedam.Quaedam
object CausalityAnchor {
@ -27,6 +28,6 @@ object CausalityAnchor {
fun checkEffect(level: Level, pos: BlockPos) = level.getChunkAt(pos)
.blockEntities
.any { (_, v) -> v is CABlockEntity }
.any { (k, v) -> v is CABlockEntity && !level.getBlockState(k).getValue(BlockStateProperties.WATERLOGGED) }
}