Interface WrapperBakedModel
- All Known Implementing Classes:
ForwardingBakedModel
public interface WrapperBakedModel
An interface to be implemented by models that wrap and replace another model, such as
ForwardingBakedModel
.
This allows mods to access the wrapped model without having to know the exact type of the wrapper model.
If you need to access data stored in one of your BakedModel
subclasses,
and you would normally access the model by its identifier and then cast it:
call unwrap(BakedModel)
on the model before, in case another mod is wrapping your model to alter its rendering.
-
Method Summary
Modifier and TypeMethodDescriptionReturn the wrapped model, if there is one at the moment, ornull
otherwise.static BakedModel
unwrap
(BakedModel model) Fully unwrap a model, i.e.
-
Method Details
-
getWrappedModel
Return the wrapped model, if there is one at the moment, ornull
otherwise.If there are multiple layers of wrapping, this method does not necessarily return the innermost model.
-
unwrap
Fully unwrap a model, i.e. return the innermost model.
-