Interface MinecraftMappingsContainer

All Known Subinterfaces:
ClosureOwner.MinecraftDependency, ClosureOwner.MinecraftDependencyWithAccessTransformers, MinecraftDependency, MinecraftDependencyWithAccessTransformers, MinecraftExtension, MinecraftExtensionForProject<T>, MinecraftExtensionForProjectWithAccessTransformers

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 Type
    Method
    Description
    Gets the mappings for this container.
    void
    mappings(String channel, String version)
    Sets the mappings to use for the Minecraft dependency.
    void
    mappings(Map<?,?> namedArgs)
    Sets 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, an IllegalStateException
      See Also:
    • mappings

      void mappings(String channel, String version)
      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.5'
       }
       
      Parameters:
      channel - The mappings channel
      version - The mappings version
      Throws:
      IllegalArgumentException - If any parameter is null
      See Also:
      API Note:
      Mappings should only be declared once. A warning will be reported on re-declaration.
    • mappings

      void mappings(Map<?,?> namedArgs)

      Sets the mappings to use for the Minecraft dependency.

      This method is generated by Groovy in the implementing class, but has been included here for convenience and IDE support.

      Parameters:
      namedArgs - The named arguments
      Throws:
      IllegalArgumentException - If any parameter is null
      See Also:
      API Note:
      Mappings should only be declared once. A warning will be reported on re-declaration.