AzureLib

Creating a Custom AzDefaultArmorBoneProvider

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 {
@Override
public AzBone getLeftBootBone(AzBakedModel model) {
return model.getBone("renamedLeftBoot").orElse(null);
}
@Override
public AzBone getLeftLegBone(AzBakedModel model) {
return model.getBone("renamedLeftLeg").orElse(null);
}
@Override
public AzBone getRightBootBone(AzBakedModel model) {
return model.getBone("renamedRightBoot").orElse(null);
}
@Override
public AzBone getRightLegBone(AzBakedModel model) {
return model.getBone("renamedRightLeg").orElse(null);
}
}