How to create a custom AzDefaultArmorBoneProvider
In some cases, you may want to use custom-named bones or restructure the mappings used by your armor models. The default implementation of AzDefaultArmorBoneProvider
assumes specific bone names (e.g., armorHead
, armorBody
). However, if your model uses different bone names, such as renamedLeftBoot
, you must create a custom provider to override the default behavior.
Below is an example of a custom armor bone provider:
public class ExampeArmorBoneProvider extends AzDefaultArmorBoneProvider {@Overridepublic AzBone getLeftBootBone(AzBakedModel model) {return model.getBone("renamedLeftBoot").orElse(null);}@Overridepublic AzBone getLeftLegBone(AzBakedModel model) {return model.getBone("renamedLeftLeg").orElse(null);}@Overridepublic AzBone getRightBootBone(AzBakedModel model) {return model.getBone("renamedRightBoot").orElse(null);}@Overridepublic AzBone getRightLegBone(AzBakedModel model) {return model.getBone("renamedRightLeg").orElse(null);}}