From da25b0e4f69df13ac4f008412da28ae8e736b0c1 Mon Sep 17 00:00:00 2001 From: Throckmorpheus Date: Fri, 3 Oct 2025 21:03:01 +0100 Subject: [PATCH] Fix slab returning to a waterlogged state when the other half of a mixed slab is broken --- .../doubleslabs/common/hooks/MixedDoubleSlabBlockHooks.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/cjminecraft/doubleslabs/common/hooks/MixedDoubleSlabBlockHooks.java b/common/src/main/java/cjminecraft/doubleslabs/common/hooks/MixedDoubleSlabBlockHooks.java index 3d668b21..6bf0fe84 100644 --- a/common/src/main/java/cjminecraft/doubleslabs/common/hooks/MixedDoubleSlabBlockHooks.java +++ b/common/src/main/java/cjminecraft/doubleslabs/common/hooks/MixedDoubleSlabBlockHooks.java @@ -18,6 +18,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.BlockHitResult; @@ -139,7 +140,8 @@ public static void playerDestroy(Player player, Level level, BlockPos pos, Block return; } - final var slabState = slabContainer.getBlockState(); + var slabState = slabContainer.getBlockState(); + slabState = slabState.setValue(BlockStateProperties.WATERLOGGED, false); level.setBlock(pos, slabState, level.isClientSide() ? 11 : 3);