You have to bind the texture before creating the vertices. Also if you want to apply a texture you need to give texture informations to your vertices. You can use DefaultVertexFormats.POSITION_TEX
builder.then(Commands.literal(direction))
where ArgumentBuilder is an instance of ArgumentBuilder, and direction is the argument you want to add to the command, which can be achieved using for loops