Interface SpecContext

All Known Implementing Classes:
DeobfSpecContext, RemappedSpecContext

public interface SpecContext
  • Method Details

    • modDependencies

      List<FabricModJson> modDependencies()
      Returns a list of all the external mods that this project depends on regardless of configuration.
    • localMods

      List<FabricModJson> localMods()
    • modDependenciesCompileRuntime

      List<FabricModJson> modDependenciesCompileRuntime()
      Return a set of mods that should be used for transforms, that target EITHER the common or client.
    • modDependenciesCompileRuntimeClient

      List<FabricModJson> modDependenciesCompileRuntimeClient()
      Return a set of mods that should be used for transforms, that target ONLY the client.
    • productionNamespace

      MappingsNamespace productionNamespace()
    • allMods

      default List<FabricModJson> allMods()
    • getDependentProjects

      @Deprecated static Stream<org.gradle.api.Project> getDependentProjects(ProjectView projectView)
      Deprecated.
      已无生产实现,改用 getDependentProjectData(ProjectView)
      返回 SpecContext 依赖的其它项目的 Project,现恒为空.

      该方法与 ProjectView.getLoomProjectDependencies(String) 一样,是隔离模式之前 直接访问跨项目模型的旧 SPI:现在没有任何实现会返回非空值,第三方 processor 调用它只会 静默拿到空集合。需要依赖项目的信息请改用 getDependentProjectData(ProjectView)。

      Parameters:
      projectView - 当前项目的视图
      Returns:
      恒为空流
    • getDependentProjectData

      static Stream<LoomProjectData> getDependentProjectData(ProjectView projectView)
      返回 runtime/compile classpath 上去重后的依赖项目数据.

      去重依赖 LoomProjectData.equals(Object) 按项目路径判等:同一项目经内存共享表与 导出文件两条路径可能得到两个实例,只有路径判等才能把它们视作同一个项目。

      Parameters:
      projectView - 当前项目的视图
      Returns:
      依赖项目的数据流
    • distinctSorted

      static List<FabricModJson> distinctSorted(List<FabricModJson> mods)