Mini Spear Guy
From the Super Mario Wiki
Mini Spear Guys are spear-wielding Mini Shy Guys that appear in Mario vs. Donkey Kong: Minis March Again!. Mini Spear Guys have a very basic mindset of patrolling back and forth, and are lethal when touched. However, upon activation of a red switch, Mini Spear Guys transform into blocks, rendering them immobile and harmless. When in this state, Mini Spear Guys can be used as a step, or bridge to cross harmful areas. Mini Spear Guys can be defeated by Mini Marios wielding hammers.