mojira.dev
MC-130183

Waterlogged blocks retain their waterlogged state when moved with sticky pistons with short pulse

The bug

Waterlogged blocks retain their waterlogged state when moved with sticky pistons with short redstone pulse. Screenshots attached.

Code analysis

The same code that fixed MC-127474 in TileEntityPiston.update() needs to be added to TileEntityPiston.clearPistonTileEntity() to ensure pistons that update faster than 2 ticks (or are quick-pulsed) also set their waterlogged state to false.

if(iblockstate.hasProperty(BlockStateProperties.WATERLOGGED) && iblockstate.getProperty(BlockStateProperties.WATERLOGGED))
{
	iblockstate = (IBlockState) iblockstate.withProperty(BlockStateProperties.WATERLOGGED, Boolean.valueOf(false));
}

Linked issues

Attachments

Comments 4

I hope this function won't be removed either. I expect it will be useful for technical players.

This shouldn't be a bug. When sticky pistons are powered with a 0 tick pulse, the block they push is teleported. Water should remain in it. It is coherent with the behavior.

Confirmed for 1.16.3 and 1.16.4 RC1, although it shouldn't be considered a bug in the first place.

Can confirm in 1.17.1 and 21w37a.

[Helper] Michał

(Unassigned)

Confirmed

Gameplay

Low

Block states

Minecraft 18w21a, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre6, ..., 21w37a, 1.18.1 Release Candidate 2, 1.18.1, 1.20.4, 1.20.5 Release Candidate 2

Retrieved