接口 TestFramework

所有已知子接口:
MutableTestFramework
所有已知实现类:
TestFrameworkImpl

@ParametersAreNonnullByDefault public interface TestFramework
The backend of the testing framework.
另请参阅:
  • 嵌套类概要

    嵌套类
    修饰符和类型
    接口
    说明
    static interface 
    Interface used for accessing a framework's tests.
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    changeStatus(Test test, Test.Status newStatus, @Nullable Entity changer)
    Changes the status of a test.
    net.neoforged.fml.ModContainer
    返回 the mod container bus linked to this framework。
    返回 a registrar for in-code structure templates。
    id()
    返回 the ID of this framework instance。
    org.slf4j.Logger
    返回 this framework's logger。
    net.neoforged.bus.api.IEventBus
    返回 the mod event bus linked to this framework。
    void
    setEnabled(Test test, boolean enabled, @Nullable Entity changer)
    Enables or disables a test.
    返回 the Tests instance of this framework。
  • 方法详细资料

    • id

      返回 the ID of this framework instance。
      返回:
      the ID of this framework instance
    • logger

      org.slf4j.Logger logger()
      返回 this framework's logger。
      返回:
      this framework's logger
      API Note:
      use this logger for logging inside tests. It is monitored in its own separate file in logs/tests/.
    • tests

      返回 the Tests instance of this framework。
      返回:
      the Tests instance of this framework
    • changeStatus

      void changeStatus(Test test, Test.Status newStatus, @Nullable @Nullable Entity changer)
      Changes the status of a test.
      参数:
      test - the test whose status to change
      newStatus - the status to change to
      changer - the entity that changed the status of the test. Usually the player completing a test
    • setEnabled

      void setEnabled(Test test, boolean enabled, @Nullable @Nullable Entity changer)
      Enables or disables a test.
      参数:
      test - the test to enable/disable
      enabled - true if to enable, false if to disable
      changer - the entity that changed the status of the test. Usually the player which runs the enable command
    • modEventBus

      net.neoforged.bus.api.IEventBus modEventBus()
      返回 the mod event bus linked to this framework。
      返回:
      the mod event bus linked to this framework
      API Note:
      this is set in MutableTestFramework.init(IEventBus, ModContainer)
    • container

      net.neoforged.fml.ModContainer container()
      返回 the mod container bus linked to this framework。
      返回:
      the mod container bus linked to this framework
      API Note:
      this is set in MutableTestFramework.init(IEventBus, ModContainer)
    • dynamicStructures

      DynamicStructureTemplates dynamicStructures()
      返回 a registrar for in-code structure templates。
      返回:
      a registrar for in-code structure templates