Fix build

This commit is contained in:
Sollace 2022-06-12 00:59:12 +02:00
parent 94b76b1402
commit 2f6ded25b6

View file

@ -19,7 +19,8 @@ public record ModelWrapper<T extends LivingEntity, M extends IModel> (
* Creates a new model wrapper to contain the given pony.
*/
public static <T extends LivingEntity, M extends IModel> ModelWrapper<T, M> of(ModelKey<?> key) {
M body = key.createModel();
@SuppressWarnings("unchecked")
M body = (M)key.createModel();
IArmour<?> armor = body.createArmour();
armor.applyMetadata(body.getMetadata());
return new ModelWrapper<>(body, armor);