If you power a piston with 3 rail infront of the piston head, This happen.
If you tries to update the rail, The rail will destroy itself.
Code analysis by @unknown can be found in this comment.
Linked issues
is cloned by
is duplicated by
Attachments
Comments


Please attach screenshots showing the setup before and after.

Ok!

Reopened and confirmed.

Confirmed for
15w40b

Confirmed for
16w07a

Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.
The reason why this happens is that the methods public void clearPistonTileEntity()
and public void update()
of the net.minecraft.tileentity.TileEntityPiston
class which place the moved block do not test if the block can be placed at the new position. However after they placed it they call the public void notifyBlockOfStateChange(BlockPos pos, final Block blockIn)
method of the net.minecraft.world.World
class to update the block. This causes the block to drop as item in case the block cannot be placed at this position. Because of how rails work once their onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
method is called they try to connect to other rails already, which happens before the updating method is called.
Having this "rotating based on other rails around" part in the public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock)
method creates new problems.

Is this still a problem in Minecraft 1.11?

@unknown I think it is. I tried this bug in Minecraft 17w06a, and it's still works!

Seems like this bug doesn't happen to me anymore in the latest 1.13 snapshot
Hope It Fixed! 🙂