use of me.shedaniel.betterloadingscreen.impl.mixinstub.StitcherStub in project BetterLoadingScreen by shedaniel.
the class MixinTextureAtlas method stitch.
@Inject(method = "prepareToStitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/texture/Stitcher;stitch()V"), locals = LocalCapture.CAPTURE_FAILSOFT, require = 0)
private void stitch(ResourceManager resourceManager, Stream<ResourceLocation> stream, ProfilerFiller profilerFiller, int i, CallbackInfoReturnable<TextureAtlas.Preparations> cir, Set<ResourceLocation> set, int j, Stitcher stitcher) {
if (stitcher.texturesToBeStitched.size() < 50)
return;
if (!LoadGameSteps.loadModel().isCompleted())
return;
ParentTask task = LoadGameSteps.stitchTexture();
activeTask = task.stepped(LoadGameSteps.StitchTexture.STITCH);
activeTask.setTotalSteps(stitcher.texturesToBeStitched.size());
((StitcherStub) stitcher).betterloadingscreen$setActiveTask(activeTask);
}
use of me.shedaniel.betterloadingscreen.impl.mixinstub.StitcherStub in project BetterLoadingScreen by shedaniel.
the class MixinTextureAtlas method stitchOptifine.
@Inject(method = "prepareToStitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/texture/Stitcher;stitch()V"), locals = LocalCapture.CAPTURE_FAILSOFT, require = 0)
private void stitchOptifine(ResourceManager resourceManager, Stream<ResourceLocation> stream, ProfilerFiller profilerFiller, int i, CallbackInfoReturnable<TextureAtlas.Preparations> cir, int ii, Set<ResourceLocation> set, Set<ResourceLocation> setEmissive, int j, Stitcher stitcher) {
if (stitcher.texturesToBeStitched.size() < 50)
return;
if (!LoadGameSteps.loadModel().isCompleted())
return;
ParentTask task = LoadGameSteps.stitchTexture();
activeTask = task.stepped(LoadGameSteps.StitchTexture.STITCH);
activeTask.setTotalSteps(stitcher.texturesToBeStitched.size());
((StitcherStub) stitcher).betterloadingscreen$setActiveTask(activeTask);
}
Aggregations