Hopefully fix NPE during baking of empty vanilla item models
This commit is contained in:
parent
7c03542d94
commit
638af63f4d
1 changed files with 1 additions and 0 deletions
|
@ -262,6 +262,7 @@ public class ModelLoader extends ModelBakery
|
||||||
}
|
}
|
||||||
ModelBlock model = this.model;
|
ModelBlock model = this.model;
|
||||||
if(hasItemModel(model)) model = makeItemModel(model);
|
if(hasItemModel(model)) model = makeItemModel(model);
|
||||||
|
if(model == null) return getMissingModel().bake(state, format, bakedTextureGetter);
|
||||||
if(isCustomRenderer(model)) return new IFlexibleBakedModel.Wrapper(new BuiltInModel(new ItemCameraTransforms(model.getThirdPersonTransform(), model.getFirstPersonTransform(), model.getHeadTransform(), model.getInGuiTransform())), Attributes.DEFAULT_BAKED_FORMAT);
|
if(isCustomRenderer(model)) return new IFlexibleBakedModel.Wrapper(new BuiltInModel(new ItemCameraTransforms(model.getThirdPersonTransform(), model.getFirstPersonTransform(), model.getHeadTransform(), model.getInGuiTransform())), Attributes.DEFAULT_BAKED_FORMAT);
|
||||||
return new IFlexibleBakedModel.Wrapper(bakeModel(model, state.apply(this), state instanceof UVLock), Attributes.DEFAULT_BAKED_FORMAT);
|
return new IFlexibleBakedModel.Wrapper(bakeModel(model, state.apply(this), state instanceof UVLock), Attributes.DEFAULT_BAKED_FORMAT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue