Package net.fabricmc.loom.build
Class IntermediaryNamespaces
java.lang.Object
net.fabricmc.loom.build.IntermediaryNamespaces
Contains methods for checking the (fallback/platform default) intermediary namespace of a project.
The namespace returned by methods in this class is partially wrong for obfuscated versions of Forge that use
Mojang names at runtime.
SRG names are still used in the toolchain, so the methods in this class are useful for those versions.
The actual production namespace is available from the extension using LoomGradleExtensionAPI.getProductionNamespace().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringintermediary(org.gradle.api.Project project) Returns the intermediary namespace of the project.static MappingsNamespaceintermediaryNamespace(ModPlatform platform) Returns the intermediary namespace of the platform.static MappingsNamespaceintermediaryNamespace(org.gradle.api.Project project) Returns the intermediary namespace of the project.static StringreplaceMixinIntermediaryNamespace(org.gradle.api.Project project, String namespace) Potentially replaces the remapping target namespace for mixin refmaps.
-
Constructor Details
-
IntermediaryNamespaces
public IntermediaryNamespaces()
-
-
Method Details
-
intermediary
Returns the intermediary namespace of the project. -
intermediaryNamespace
Returns the intermediary namespace of the project. -
intermediaryNamespace
Returns the intermediary namespace of the platform. This is the fallback used before the extension property is set. -
replaceMixinIntermediaryNamespace
public static String replaceMixinIntermediaryNamespace(org.gradle.api.Project project, String namespace) Potentially replaces the remapping target namespace for mixin refmaps.srgandmojangproduction namespaces are replaced byintermediarysince fabric-mixin-compile-extensions only supportsintermediaryandofficial. We transform the namespaces in the input mappings, e.g.intermediary->yraidemretniandsrg->intermediary.- Parameters:
project- the projectnamespace- the original namespace- Returns:
- the correct namespace to use
-