Merge 1.19.2 into 1.19.4
This commit is contained in:
commit
a1f3cb9270
|
|
@ -10,6 +10,15 @@
|
|||
"modernfix.config.not_default": " (已修改)",
|
||||
"asynclocator.map.locating": "地图(定位中……)",
|
||||
"asynclocator.map.none": "地图(未能在附近找到相关地物)",
|
||||
"modernfix.option.category.performance": "性能",
|
||||
"modernfix.option.category.performance.description": "有助于提升游戏内性能或启动速度的功能",
|
||||
"modernfix.option.category.bugfixes": "错误修复",
|
||||
"modernfix.option.category.bugfixes.description": "修复重点错误,从而提升游戏稳定性",
|
||||
"modernfix.option.category.troubleshooting": "错误排查/实用工具",
|
||||
"modernfix.option.category.troubleshooting.description": "用于辅助错误排查的功能",
|
||||
"modernfix.option.category.expert_only": "高级设置",
|
||||
"modernfix.option.category.expert_only.description": "不要轻易修改,除非您清楚地知道自己正在做什么",
|
||||
"modernfix.option.name.mixin.perf.async_jei": "后台 JEI 加载",
|
||||
"modernfix.option.mixin.perf.async_jei": "仅 1.16。一项关键优化。对 JEI 进行了调整,让其重载运行于后台线程,完全消除了它在载入世界时造成的巨大延迟。",
|
||||
"modernfix.option.mixin.perf.biome_zoomer": "仅 1.16。使用 1.18 版本的逻辑进行微优化,提高生物群系过渡生成的性能。",
|
||||
"modernfix.option.mixin.perf.async_locator": "仅 1.16。移植了 Async Locator 模组的补丁,以消除与 `/locate`、战利品表生成等相关事物的服务器冻结现象。",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package org.embeddedt.modernfix.forge.dynresources;
|
||||
|
||||
import com.google.common.collect.ForwardingMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.graph.GraphBuilder;
|
||||
import com.google.common.graph.MutableGraph;
|
||||
|
|
@ -26,6 +27,8 @@ import java.util.Set;
|
|||
* of the model registry that emulates vanilla keySet behavior.
|
||||
*/
|
||||
public class ModelBakeEventHelper {
|
||||
// TODO: make into config option
|
||||
private static final Set<String> INCOMPATIBLE_MODS = ImmutableSet.of("industrialforegoing");
|
||||
private final Map<ResourceLocation, BakedModel> modelRegistry;
|
||||
private final Set<ResourceLocation> topLevelModelLocations;
|
||||
private final MutableGraph<String> dependencyGraph;
|
||||
|
|
@ -43,6 +46,9 @@ public class ModelBakeEventHelper {
|
|||
this.dependencyGraph = GraphBuilder.undirected().build();
|
||||
ModList.get().forEachModContainer((id, mc) -> {
|
||||
this.dependencyGraph.addNode(id);
|
||||
for(IModInfo.ModVersion version : mc.getModInfo().getDependencies()) {
|
||||
this.dependencyGraph.addNode(version.getModId());
|
||||
}
|
||||
});
|
||||
for(String id : this.dependencyGraph.nodes()) {
|
||||
Optional<? extends ModContainer> mContainer = ModList.get().getModContainerById(id);
|
||||
|
|
@ -61,6 +67,8 @@ public class ModelBakeEventHelper {
|
|||
modIdsToInclude.addAll(this.dependencyGraph.adjacentNodes(modId));
|
||||
} catch(IllegalArgumentException ignored) { /* sanity check */ }
|
||||
modIdsToInclude.remove("minecraft");
|
||||
if(modIdsToInclude.stream().noneMatch(INCOMPATIBLE_MODS::contains))
|
||||
return this.modelRegistry;
|
||||
Set<ResourceLocation> ourModelLocations = Sets.filter(this.topLevelModelLocations, loc -> modIdsToInclude.contains(loc.getNamespace()));
|
||||
return new ForwardingMap<ResourceLocation, BakedModel>() {
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user