Leaves fix was applied to 1.21 as well. getMaterial() was removed in 1.20 so has been removed from that version onwards as well.