Hello, I've been looking all day to a way to animate any BidepModel (player, zombie, squelleton, any other biped, vanilla or not...) with the same animation/pose (all biped having the same "structure" arms, legs...).
My first approach was to use the render event hook that way:
@SubscribeEvent
public void onRenderBiped(RenderLivingEvent.Pre event){
/*ICaster caster = CasterHandler.getCaster(event.getEntity());
if(caster!=null) {
ModelPlayer modelplayer = event.getRenderer().getMainModel();
modelplayer.bipedRightArm.
}*/
if(event.getRenderer().getMainModel() instanceof ModelBiped) {
event.setCanceled(true);
ModelBiped model = (ModelBiped)event.getRenderer().getMainModel();
model.bipedRightArm.rotateAngleX = 5f;
}
}
but it does'nt work (because the rotate angle values are overrided by the model render method, and of course if I use RenderLivingEvent.Post the model is already rendered so it's too late).
I found some answers saying to create a custom BipedModel but it would mean to create as many Renderer as biped entity to override the vanilla BipedModel (and is it even possible?), plus would'nt it be a compatibility-killer?
Is there a better maintenable solution?