not sure if you still need this but for the sake of others,
public static final Block BLOCK_NAME = registerBlock("block_name", settings -> new ExperienceDroppingBlock(UniformIntProvider.create(2,5), settings), Block.Settings.create().strength(3f).requiresTool()); // the 2,5 is the range of exp
Its shown on the Fabric github examples at this link on line 95, but using stair blocks