Skip to content

Commit 36a1b6b

Browse files
committed
Merge 1.16 into 1.18
2 parents ad79885 + 8f896f0 commit 36a1b6b

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

common/src/main/resources/assets/modernfix/lang/zh_cn.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@
1010
"modernfix.config.not_default": " (已修改)",
1111
"asynclocator.map.locating": "地图(定位中……)",
1212
"asynclocator.map.none": "地图(未能在附近找到相关地物)",
13+
"modernfix.option.category.performance": "性能",
14+
"modernfix.option.category.performance.description": "有助于提升游戏内性能或启动速度的功能",
15+
"modernfix.option.category.bugfixes": "错误修复",
16+
"modernfix.option.category.bugfixes.description": "修复重点错误,从而提升游戏稳定性",
17+
"modernfix.option.category.troubleshooting": "错误排查/实用工具",
18+
"modernfix.option.category.troubleshooting.description": "用于辅助错误排查的功能",
19+
"modernfix.option.category.expert_only": "高级设置",
20+
"modernfix.option.category.expert_only.description": "不要轻易修改,除非您清楚地知道自己正在做什么",
21+
"modernfix.option.name.mixin.perf.async_jei": "后台 JEI 加载",
1322
"modernfix.option.mixin.perf.async_jei": "仅 1.16。一项关键优化。对 JEI 进行了调整,让其重载运行于后台线程,完全消除了它在载入世界时造成的巨大延迟。",
1423
"modernfix.option.mixin.perf.biome_zoomer": "仅 1.16。使用 1.18 版本的逻辑进行微优化,提高生物群系过渡生成的性能。",
1524
"modernfix.option.mixin.perf.async_locator": "仅 1.16。移植了 Async Locator 模组的补丁,以消除与 `/locate`、战利品表生成等相关事物的服务器冻结现象。",

forge/src/main/java/org/embeddedt/modernfix/forge/dynresources/ModelBakeEventHelper.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package org.embeddedt.modernfix.forge.dynresources;
22

33
import com.google.common.collect.ForwardingMap;
4+
import com.google.common.collect.ImmutableSet;
45
import com.google.common.collect.Sets;
56
import com.google.common.graph.GraphBuilder;
67
import com.google.common.graph.MutableGraph;
@@ -26,6 +27,8 @@
2627
* of the model registry that emulates vanilla keySet behavior.
2728
*/
2829
public class ModelBakeEventHelper {
30+
// TODO: make into config option
31+
private static final Set<String> INCOMPATIBLE_MODS = ImmutableSet.of("industrialforegoing");
2932
private final Map<ResourceLocation, BakedModel> modelRegistry;
3033
private final Set<ResourceLocation> topLevelModelLocations;
3134
private final MutableGraph<String> dependencyGraph;
@@ -43,6 +46,9 @@ public ModelBakeEventHelper(Map<ResourceLocation, BakedModel> modelRegistry) {
4346
this.dependencyGraph = GraphBuilder.undirected().build();
4447
ModList.get().forEachModContainer((id, mc) -> {
4548
this.dependencyGraph.addNode(id);
49+
for(IModInfo.ModVersion version : mc.getModInfo().getDependencies()) {
50+
this.dependencyGraph.addNode(version.getModId());
51+
}
4652
});
4753
for(String id : this.dependencyGraph.nodes()) {
4854
Optional<? extends ModContainer> mContainer = ModList.get().getModContainerById(id);
@@ -61,6 +67,8 @@ public Map<ResourceLocation, BakedModel> wrapRegistry(String modId) {
6167
modIdsToInclude.addAll(this.dependencyGraph.adjacentNodes(modId));
6268
} catch(IllegalArgumentException ignored) { /* sanity check */ }
6369
modIdsToInclude.remove("minecraft");
70+
if(modIdsToInclude.stream().noneMatch(INCOMPATIBLE_MODS::contains))
71+
return this.modelRegistry;
6472
Set<ResourceLocation> ourModelLocations = Sets.filter(this.topLevelModelLocations, loc -> modIdsToInclude.contains(loc.getNamespace()));
6573
return new ForwardingMap<ResourceLocation, BakedModel>() {
6674
@Override

0 commit comments

Comments
 (0)