Record Class EnvironmentSpec.MappingDefinition

java.lang.Object
java.lang.Record
net.fabricmc.loom.spec.EnvironmentSpec.MappingDefinition
Record Components:
baseCoordinates - 基础映射的坐标(用户声明,例如 net.fabricmc:yarn:1.20.1+build.10:v2)
targetNamespace - 产物要落在哪个命名空间(named / intermediary / srg …)
migrateForPlatform - 是否需要在基础映射之上做平台特有的迁移 (Forge 需要:迁移依赖补丁后的中间产物,属于 L3 的独立节点)
All Implemented Interfaces:
Serializable
Enclosing class:
EnvironmentSpec

public static record EnvironmentSpec.MappingDefinition(@Nullable String baseCoordinates, String targetNamespace, boolean migrateForPlatform) extends Record implements Serializable
映射配方:**怎么算**,而不是**算出来的东西**.
See Also:
  • Constructor Details

    • MappingDefinition

      public MappingDefinition(@Nullable String baseCoordinates, String targetNamespace, boolean migrateForPlatform)
      Creates an instance of a MappingDefinition record class.
      Parameters:
      baseCoordinates - the value for the baseCoordinates record component
      targetNamespace - the value for the targetNamespace record component
      migrateForPlatform - the value for the migrateForPlatform record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • baseCoordinates

      public @Nullable String baseCoordinates()
      Returns the value of the baseCoordinates record component.
      Returns:
      the value of the baseCoordinates record component
    • targetNamespace

      public String targetNamespace()
      Returns the value of the targetNamespace record component.
      Returns:
      the value of the targetNamespace record component
    • migrateForPlatform

      public boolean migrateForPlatform()
      Returns the value of the migrateForPlatform record component.
      Returns:
      the value of the migrateForPlatform record component