this is as far as i can help you out
demo note : this demo does not take entity rotation into account it uses
the rotation of the models file, and i dont know if the uv's are correct
i didnt test on textured models and also you will have to do the materials
i think but anyway i cant help any further than this...
Oh yes i forgot you have to take position in concideration
and offset vertices positions acordingly same for scale
if i am not mistaken