Skip to content

Commit

Permalink
Fix loading on servers (#1419)
Browse files Browse the repository at this point in the history
* Fix loading on servers

* Fix running without FFAPI, bump NF

---------

Co-authored-by: Su5eD <su5ed@outlook.com>
  • Loading branch information
dima-dencep and Su5eD authored Sep 22, 2024
1 parent 0b2b43c commit b3ab92a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit b3ab92a

Please sign in to comment.