Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix loading on servers #1419

Merged
merged 2 commits into from
Sep 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<clinit>", 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<RegistryDataLoader.RegistryData<?>> list = new ArrayList<>(RegistryDataLoader.WORLDGEN_REGISTRIES);
DataPackRegistriesHooksAccessor.set_DATA_PACK_REGISTRIES(list);
Expand Down
Loading