Skip to content

Commit

Permalink
fix: Try to fix the anim model problem(4).
Browse files Browse the repository at this point in the history
  • Loading branch information
MegumiKasuga committed Dec 2, 2024
1 parent 2906019 commit 20d13ef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ public static LazyRecomputable<AnimateTicker> getTickerInstance(
return new LazyRecomputable<>(() -> {
AnimModel model = AnimModelLoader.INSTANCE.getModel(modelLoc);
if (model == null) return null;
model.init();
AnimationFile file = AnimationFile.fromFile(animFile).get();
if (file == null) return null;
Animation anim = file.getAnimation(animName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ public static LazyRecomputable<MultiAnimateTicker> getTickerInstance(
int counter = 0;
AnimModel model = AnimModelLoader.INSTANCE.getModel(modelLoc);
if (model == null) return null;
model.init();
for (Pair<ResourceLocation, String> a : anims) {
AnimationFile file = AnimationFile.fromFile(a.getFirst()).get();
if (file == null) return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class GreenAppleTileRenderer implements BlockEntityRenderer<GreenAppleTil
// private static final WorldTexture texture = new WorldTexture(new ResourceLocation(KasugaLib.MOD_ID, "textures/common/test/green_apple_bubble.png"));

LazyRecomputable<AnimateTicker> ticker = AnimateTicker.getTickerInstance(
AllExampleElements.REGISTRY.asResource("block/test/test_model_complicate"),
AllExampleElements.REGISTRY.asResource("test_model_complicate"),
AllExampleElements.REGISTRY.asResource("model"),
"transform", AnimateTicker.TickerType.RENDER, 60, 100);

Expand Down

0 comments on commit 20d13ef

Please sign in to comment.