Disable ModelDataManager fixes if Rubidium is installed

Since legacy Rubidium versions only retrieve model data on a worker
thread, the data will probably never be refreshed, causing rendering
issues.
This commit is contained in:
embeddedt 2023-12-27 15:19:13 -05:00
parent 12b0d352cd
commit 152cdc4469
No known key found for this signature in database
GPG Key ID: A69433EC199B5613

View File

@ -231,6 +231,7 @@ public class ModernFixEarlyConfig {
}
checkBlockstateCacheRebuilds();
checkModelDataManager();
}
private void checkBlockstateCacheRebuilds() {
@ -246,6 +247,16 @@ public class ModernFixEarlyConfig {
}
}
private void checkModelDataManager() {
if(!isFabric && modPresent("rubidium") && !modPresent("embeddium")) {
Option option = this.options.get("mixin.bugfix.model_data_manager_cme");
if(option != null) {
LOGGER.warn("ModelDataManager bugfixes have been disabled to prevent broken rendering with Rubidium installed. Please migrate to Embeddium.");
option.addModOverride(false, "rubidium");
}
}
}
private void disableIfModPresent(String configName, String... ids) {
for(String id : ids) {
if(!ModernFixPlatformHooks.INSTANCE.isEarlyLoadingNormally() || modPresent(id)) {