From 7619824d2d9814b2776986cae87f21de409469c5 Mon Sep 17 00:00:00 2001 From: crystalneko Date: Wed, 2 Oct 2024 23:13:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=88=E4=B8=8D=E4=BF=9D=E8=AF=81=E8=83=BD=E7=94=A8?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/ayamemc/ayame/client/DefaultAyameModels.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/org/ayamemc/ayame/client/DefaultAyameModels.java b/common/src/main/java/org/ayamemc/ayame/client/DefaultAyameModels.java index 0a65379..ca56615 100644 --- a/common/src/main/java/org/ayamemc/ayame/client/DefaultAyameModels.java +++ b/common/src/main/java/org/ayamemc/ayame/client/DefaultAyameModels.java @@ -23,6 +23,7 @@ import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import net.minecraft.resources.ResourceLocation; +import org.ayamemc.ayame.client.resource.AyameModelResource; import org.ayamemc.ayame.client.resource.IModelResource; import org.ayamemc.ayame.model.AyameModelType; import org.ayamemc.ayame.model.DefaultAyameModelType; @@ -77,6 +78,7 @@ private static IModelResource createModelResource(String name) { } private static AyameModelType createModel(IModelResource res) { - return IModelResource.createModelFromResource(res); + AyameModelResource.ModelDataResource defaultModel = res.getDefault(); + return defaultModel.getOrCreateResource(res.getMetaData()); } }