Open a crafting table
Place 3 wooden planks across the top row
Place 4 cobblestone in the middle and bottom rows, leaving the center of the top row empty
Place 1 iron ingot in the center slot
Place 1 redstone dust in the bottom center slot
Place 1 wooden plank, cobblestone, iron ingot, or redstone dust in the remaining empty slot if needed to complete the piston recipe in your version
Take the piston from the crafting result slot
