Custom Loading Screen

Custom Loading Screen

3M Downloads

GregTech 5 compatibility

agentsars opened this issue ยท 5 comments

commented

I would like to add Custom Loading Screen to a pack containing GregTech 5 unofficial and more than 20'000 materials that are registered, which is visile during loading time. Would it be possible to get a compat "fix" that displays their registration? (It's on 1.7.10)

commented

I got to grabbing the registered material with reflection with a timer in post init (since I don't have hooks for that), but I can't run ProgressDisplayer.displayProgress(text, percent); from the timer. Any insights? If you would like to help, I can reach out in twitter dms, otherwise you can close the issue and I'll continue digging

commented

I haven't looked at this yet, sorry.

but I can't run ProgressDisplayer.displayProgress(text, percent); from the timer

What sort of timer are you using? In theory that should if GT5-U called it every so often (perhaps everytime a material is registered).

commented

I'm using a normal timer. I'm trying to force a text and percent render in ModLoadingListener but it seems like I can't really do that, I get an opengl not initialized error. What I'm trying now is to put the timer in MinecraftDisplayer itself. Edit: still getting opengl error.
https://paste.dimdev.org/zukuruzote.cs
https://paste.dimdev.org/oxezuwerin.rb

commented

Ah, ok. Unfortunately OpenGL doesn't work that way - all rendering calls must be on the main thread, which likely means calling it directly in whatever method registers GT5U materials.

commented

Calling from main thread worked