diff --git a/gradle.properties b/gradle.properties index 6afe921..6e804a6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,19 +7,19 @@ org.gradle.caching=true #org.gradle.configuration-cache=true # Versions -versionConnector=2.0.0-beta.2 +versionConnector=2.0.0-beta.3 versionAdapter=1.13.20+1.21.1-20240811.191740 versionAdapterDefinition=1.13.21+1.21.1 versionAdapterRuntime=1.0.0+1.21.1 versionMc=1.21.1 -versionNeoForge=21.1.5 +versionNeoForge=21.1.57 versionParchmentMc=1.21 versionParchment=2024.07.28 versionForgeAutoRenamingTool=1.0.12 versionForgifiedFabricLoader=2.5.33+0.16.0+1.21.1 versionAccessWidener=2.1.0 -versionForgifiedFabricApi=0.102.0+2.0.11+1.21.1 +versionForgifiedFabricApi=0.104.0+2.0.13+1.21.1 # Publishing curseForgeId=890127 diff --git a/src/main/java/org/sinytra/connector/transformer/jar/JarTransformInstance.java b/src/main/java/org/sinytra/connector/transformer/jar/JarTransformInstance.java index 93dd670..1d02b38 100644 --- a/src/main/java/org/sinytra/connector/transformer/jar/JarTransformInstance.java +++ b/src/main/java/org/sinytra/connector/transformer/jar/JarTransformInstance.java @@ -179,7 +179,7 @@ private static void processGeneratedJar(File input, Path output, Stopwatch stopw private static ClassLookup createCleanClassLookup() { String mcAndNeoFormVersion = FMLLoader.versionInfo().mcAndNeoFormVersion(); if (FMLEnvironment.production) { - MavenCoordinate coords = new MavenCoordinate("net.minecraft", "client", "", "srg", mcAndNeoFormVersion); + MavenCoordinate coords = new MavenCoordinate("net.minecraft", FMLEnvironment.dist.isClient() ? "client" : "server", "", "srg", mcAndNeoFormVersion); Path path = LibraryFinder.findPathForMaven(coords); if (!Files.exists(path)) { throw new ModLoadingException(ModLoadingIssue.error("fml.modloadingissue.corrupted_installation").withAffectedPath(path)); diff --git a/src/mod/java/org/sinytra/connector/mod/mixin/registries/RegistryDataLoaderMixin.java b/src/mod/java/org/sinytra/connector/mod/mixin/registries/RegistryDataLoaderMixin.java index 81b69a2..9d75ed2 100644 --- a/src/mod/java/org/sinytra/connector/mod/mixin/registries/RegistryDataLoaderMixin.java +++ b/src/mod/java/org/sinytra/connector/mod/mixin/registries/RegistryDataLoaderMixin.java @@ -19,7 +19,7 @@ public abstract class RegistryDataLoaderMixin { // https://github.com/quiqueck/WorldWeaver/blob/8861dbf39c85cdafbaf2caab1783d11c26d78f44/wover-core-api/src/main/java/org/betterx/wover/core/mixin/registry/RegistryDataLoaderMixin.java#L28 @Inject(method = "", at = @At("TAIL")) private static void postInitLast(CallbackInfo ci) { - if (RegistryDataLoader.WORLDGEN_REGISTRIES.size() != DataPackRegistriesHooks.getDataPackRegistries().size()) { + if (DataPackRegistriesHooks.getDataPackRegistries() != null && RegistryDataLoader.WORLDGEN_REGISTRIES.size() != DataPackRegistriesHooks.getDataPackRegistries().size()) { ConnectorMod.LOGGER.info("Detected changes in WORLDGEN_REGISTRIES, updating NeoForge references"); List> list = new ArrayList<>(RegistryDataLoader.WORLDGEN_REGISTRIES); DataPackRegistriesHooksAccessor.set_DATA_PACK_REGISTRIES(list);