[WIP] more fixes and final touch-up

This commit is contained in:
octarine-noise
2020-01-17 17:33:32 +01:00
parent 2252fb3b42
commit 802862f151
16 changed files with 70 additions and 61 deletions

View File

@@ -1,7 +1,6 @@
package mods.betterfoliage.mixin;
import mods.betterfoliage.BetterFoliage;
import mods.octarinecore.client.resource.AsnycSpriteProviderManager;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.profiler.IProfiler;
@@ -19,9 +18,12 @@ abstract public class MixinModelBakery {
@Redirect(method = processLoading, at = @At(value = "INVOKE", target = stitch))
AtlasTexture.SheetData onStitchModelTextures(AtlasTexture atlas, IResourceManager manager, Iterable<ResourceLocation> idList, IProfiler profiler) {
AsnycSpriteProviderManager.StitchWrapper wrapper = BetterFoliage.INSTANCE.getBlockSprites().prepare(this, atlas, manager, idList, profiler);
AtlasTexture.SheetData sheet = atlas.stitch(manager, wrapper.getIdList(), profiler);
wrapper.complete(sheet);
return sheet;
return BetterFoliage.INSTANCE.getBlockSprites().finish(
atlas.stitch(
manager,
BetterFoliage.INSTANCE.getBlockSprites().prepare(this, manager, idList, profiler),
profiler
), profiler
);
}
}

View File

@@ -21,9 +21,13 @@ public class MixinParticleManager {
@SuppressWarnings("UnresolvedMixinReference")
@Redirect(method = "*", at = @At(value = "INVOKE", target = stitch))
AtlasTexture.SheetData onStitchModelTextures(AtlasTexture atlas, IResourceManager manager, Iterable<ResourceLocation> idList, IProfiler profiler) {
AsnycSpriteProviderManager.StitchWrapper wrapper = BetterFoliage.INSTANCE.getParticleSprites().prepare(this, atlas, manager, idList, profiler);
AtlasTexture.SheetData sheet = atlas.stitch(manager, wrapper.getIdList(), profiler);
wrapper.complete(sheet);
return sheet;
return BetterFoliage.INSTANCE.getParticleSprites().finish(
atlas.stitch(
manager,
BetterFoliage.INSTANCE.getParticleSprites().prepare(this, manager, idList, profiler),
profiler
), profiler
);
}
}