mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
'Fix' shader loading
This commit is contained in:
1 parent
43c5fadce5
commit
bf79be5210
2 files changed
+4
-1
No files matched your search
@@ -64,6 +64,7 @@ public final class ShaderHelper {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public static void initShaders() {
|
||||
if (Minecraft.getInstance().getResourceManager() instanceof IReloadableResourceManager) {
|
||||
((IReloadableResourceManager) Minecraft.getInstance().getResourceManager()).addReloadListener(
|
||||
|
||||
@@ -108,6 +108,9 @@ public class ClientProxy implements IProxy {
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::clientSetup);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::loadComplete);
|
||||
FMLJavaModLoadingContext.get().getModEventBus().register(MiscellaneousIcons.INSTANCE);
|
||||
// This is the only place it works, but mods are constructed in parallel (brilliant idea) so this
|
||||
// *could* end up blowing up if it races with someone else. Let's pray that doesn't happen.
|
||||
ShaderHelper.initShaders();
|
||||
}
|
||||
|
||||
private void clientSetup(FMLClientSetupEvent event) {
|
||||
@@ -140,7 +143,6 @@ public class ClientProxy implements IProxy {
|
||||
|
||||
private void loadComplete(FMLLoadCompleteEvent event) {
|
||||
DeferredWorkQueue.runLater(() -> {
|
||||
ShaderHelper.initShaders();
|
||||
initAuxiliaryRender();
|
||||
ColorHandler.init();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user