fixed neoforge crashing on load
This commit is contained in:
parent
2be47d8d53
commit
2a9a8703d4
|
|
@ -59,7 +59,7 @@ public class ConfigLoaderImpl {
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onConfigLoad(ModConfigEvent.Loading loading) {
|
public static void onConfigLoad(ModConfigEvent.Loading loading) {
|
||||||
loadConfig(loading.getConfig().getSpec());
|
loadConfig((ModConfigSpec) loading.getConfig().getSpec());
|
||||||
|
|
||||||
// DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> () -> {
|
// DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> () -> {
|
||||||
// ConfigLoader.onConfigLoaded(Minecraft.getInstance().level.registryAccess());
|
// ConfigLoader.onConfigLoaded(Minecraft.getInstance().level.registryAccess());
|
||||||
|
|
@ -71,7 +71,7 @@ public class ConfigLoaderImpl {
|
||||||
}
|
}
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onConfigReload(ModConfigEvent.Reloading loading) {
|
public static void onConfigReload(ModConfigEvent.Reloading loading) {
|
||||||
loadConfig(loading.getConfig().getSpec());
|
loadConfig((ModConfigSpec) loading.getConfig().getSpec());
|
||||||
// DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> () -> {
|
// DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> () -> {
|
||||||
// ConfigLoader.onConfigLoaded(Minecraft.getInstance().level.registryAccess());
|
// ConfigLoader.onConfigLoaded(Minecraft.getInstance().level.registryAccess());
|
||||||
// });
|
// });
|
||||||
|
|
@ -81,10 +81,10 @@ public class ConfigLoaderImpl {
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loadConfig(IConfigSpec<ModConfigSpec> spec) {
|
private static void loadConfig(ModConfigSpec spec) {
|
||||||
BuiltConfig builtConfig = CONFIGS.get(spec.self());
|
BuiltConfig builtConfig = CONFIGS.get(spec);
|
||||||
if (builtConfig == null) return;
|
if (builtConfig == null) return;
|
||||||
loadConfig(builtConfig, spec.self().getValues());
|
loadConfig(builtConfig, spec.getValues());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void loadConfig(BuiltCategory category, UnmodifiableConfig config) {
|
private static void loadConfig(BuiltCategory category, UnmodifiableConfig config) {
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ fabric_loader_version=0.15.11
|
||||||
parchment_mappings_fabric=1.21:2024.07.07
|
parchment_mappings_fabric=1.21:2024.07.07
|
||||||
|
|
||||||
# Neoforge
|
# Neoforge
|
||||||
neoforge_version=21.0.81-beta
|
neoforge_version=21.0.103-beta
|
||||||
neoforge_loader_version_range=[4,)
|
neoforge_loader_version_range=[4,)
|
||||||
neogradle.subsystems.parchment.minecraftVersion=1.21
|
neogradle.subsystems.parchment.minecraftVersion=1.21
|
||||||
neogradle.subsystems.parchment.mappingsVersion=2024.07.07
|
neogradle.subsystems.parchment.mappingsVersion=2024.07.07
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user