It is still the same in Single player AND without mod
the redstone only effect below block AND in front where redstone face, it won't effect above block, so if you want to make it work do this
P = piston/sticky piston, R= redstone, B = block, E = repeater
BBPPBB
REBBER
BBBBBB
then how we gonna make a sand gate?