Fix split official namespaces existing on versions where they don't make sense (#1361)

* Don't use clientOfficial and serverOfficial namespaces on versions with only one jar

Fixes #1360.

Renames an experimental API in IntermediateMappingsProvider:
getIsLegacyMinecraft -> getUseSplitOfficialNamespaces

* Add test for 0.30 with deobf mappings + no intermediate mappings

* Change split official ns check to Beta 1.0..<1.3 range check

* Fix javadoc

* Clarify comment in MinecraftVersionMeta
This commit is contained in:
Juuz
2025-09-03 13:49:22 +03:00
committed by GitHub
parent 928c091d2c
commit 8d9d4df65f
13 changed files with 110 additions and 34 deletions

View File

@@ -1,7 +1,7 @@
/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2021-2024 FabricMC
* Copyright (c) 2021-2025 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -295,8 +295,8 @@ public abstract class LoomGradleExtensionImpl extends LoomGradleExtensionApiImpl
provider.getDownloader().set(this::download);
provider.getDownloader().disallowChanges();
provider.getIsLegacyMinecraft().set(getProject().provider(() -> getMinecraftProvider().isLegacyVersion()));
provider.getIsLegacyMinecraft().disallowChanges();
provider.getUseSplitOfficialNamespaces().set(getProject().provider(() -> getMinecraftProvider().isLegacySplitOfficialNamespaceVersion()));
provider.getUseSplitOfficialNamespaces().disallowChanges();
}
@Override