Add a progress message for atlas textures. Fills a big time gap on bigger packs.

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2020-03-20 17:34:42 -04:00
parent 0d16042705
commit 3e48066021
No known key found for this signature in database
GPG Key ID: 8EB3DF749553B1B7
2 changed files with 3 additions and 1 deletions

View File

@ -102,7 +102,7 @@ public class StartupMessageManager {
return Optional.of(s -> messages.get(MessageType.LOC).add(new Message(s, MessageType.LOC)));
}
static Optional<Consumer<String>> mcLoaderConsumer() {
public static Optional<Consumer<String>> mcLoaderConsumer() {
return Optional.of(s-> messages.get(MessageType.MC).add(new Message(s, MessageType.MC)));
}
}

View File

@ -54,6 +54,7 @@ import net.minecraft.client.renderer.*;
import net.minecraft.client.settings.KeyBinding;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.client.model.pipeline.LightUtil;
import net.minecraftforge.fml.loading.progress.StartupMessageManager;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.core.async.ThreadNameCachingStrategy;
@ -190,6 +191,7 @@ public class ForgeHooksClient
public static void onTextureStitchedPre(AtlasTexture map, Set<ResourceLocation> resourceLocations)
{
StartupMessageManager.mcLoaderConsumer().ifPresent(c->c.accept("Atlas Stitching : "+map.getTextureLocation().toString()));
ModLoader.get().postEvent(new TextureStitchEvent.Pre(map, resourceLocations));
// ModelLoader.White.INSTANCE.register(map); // TODO Custom TAS
}