Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Comment on lines -142 to +144
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to #318, we should use trySetValue here since we cannot assume the state has a WATERLOGGED property. I think we also want this to be a final var here so can just do it in one line.


level.setBlock(pos, slabState, level.isClientSide() ? 11 : 3);

Expand Down