接口 TestFramework
- 所有已知子接口:
MutableTestFramework
- 所有已知实现类:
TestFrameworkImpl
@ParametersAreNonnullByDefault
public interface TestFramework
The backend of the testing framework.
- 另请参阅:
-
嵌套类概要
嵌套类 -
方法概要
修饰符和类型方法说明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
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.tests()
返回 the Tests instance of this framework。
-
方法详细资料
-
id
ResourceLocation 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
TestFramework.Tests tests()返回 the Tests instance of this framework。- 返回:
- the Tests instance of this framework
-
changeStatus
Changes the status of a test.- 参数:
test
- the test whose status to changenewStatus
- the status to change tochanger
- the entity that changed the status of the test. Usually the player completing a test
-
setEnabled
Enables or disables a test.- 参数:
test
- the test to enable/disableenabled
-true
if to enable,false
if to disablechanger
- 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
-