Interface MinecraftMappingsContainer
- All Known Subinterfaces:
ClosureOwner.MinecraftDependency, MinecraftDependency, MinecraftExtension, MinecraftExtensionForProject
public interface MinecraftMappingsContainer
A container for Minecraft mappings, primarily used to determine the mappings to be used by the Minecraft
dependency.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGets the mappings for this container.voidSets the mappings to use for the Minecraft dependency.voidSets the mappings to use for the Minecraft dependency.
-
Method Details
-
getMappings
MinecraftMappings getMappings()Gets the mappings for this container.- Returns:
- The mappings to be used
- Throws:
IllegalStateException- If the mappings are not set when they are queried, anIllegalStateException- See Also:
-
mappings
Sets the mappings to use for the Minecraft dependency.This method includes a generated named variant that can make declaration in your buildscript easier.
minecraft { mappings channel: 'official', version: '1.21.11' }- Parameters:
channel- The mappings channelversion- The mappings version- Throws:
IllegalArgumentException- If any parameter isnull- See Also:
- API Note:
- Mappings should only be declared once. A warning will be reported on re-declaration.
-
mappings
Sets the mappings to use for the Minecraft dependency.- Parameters:
namedArgs- The named arguments- Throws:
IllegalArgumentException- If any parameter isnull- See Also:
- API Note:
- Mappings should only be declared once. A warning will be reported on re-declaration.
-