It seem that I solve my problem in someway.
I still don't know how IModelConfiguration#resolveTexture worked, and I can't get a Material from it now too.
But, now I found I can directly call new Material to solve my need.
I tried new Material before but it fail at that point in time, because I missed a thing.
I need to subscribe TextureStitchEvent, so that I can add my texture to AtlasTexture.
@SubscribeEvent
public static void onTextureStitch(TextureStitchEvent.Pre event){
if(event.getMap().func_229223_g_().equals(AtlasTexture.LOCATION_BLOCKS_TEXTURE)){
event.addSprite(new ResourceLocation(FoodPower.MODID, "meals/salad/salad_base"));
}
}
So now directly new a Material and transform it to TextureAtlasSprite will work.
Material m = new Material(AtlasTexture.LOCATION_BLOCKS_TEXTURE, new ResourceLocation(FoodPower.MODID, "meals/salad/salad_base"));
Thx from everyone who replied this post.
But I still open for any better suggestion