23 lines
785 B
Java
23 lines
785 B
Java
package io.gitlab.jfronny.respackopts.integration;
|
|
|
|
import io.gitlab.jfronny.respackopts.Respackopts;
|
|
import io.vram.frex.api.config.ShaderConfig;
|
|
|
|
public class FrexCompat {
|
|
private static boolean initial = true;
|
|
public static void onInitializeFrex() {
|
|
ShaderConfig.registerShaderConfigSupplier(Respackopts.RPO_SHADER_ID, Respackopts::getShaderImportSource);
|
|
Respackopts.LOGGER.info("enabled frex/canvas support");
|
|
Respackopts.SAVE_ACTIONS.add(() -> {
|
|
try {
|
|
if (!initial)
|
|
ShaderConfig.invalidateShaderConfig();
|
|
initial = false;
|
|
}
|
|
catch (Throwable e) {
|
|
Respackopts.LOGGER.error("Could not reload shader config", e);
|
|
}
|
|
});
|
|
}
|
|
}
|