Package net.neoforged.testframework
Interface TestFramework
- All Known Subinterfaces:
MutableTestFramework
- All Known Implementing Classes:
TestFrameworkImpl
@ParametersAreNonnullByDefault
public interface TestFramework
The backend of the testing framework.
- See Also:
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Interface used for accessing a framework's tests. -
Method Summary
Modifier and TypeMethodDescriptionvoid
changeStatus
(Test test, Test.Status newStatus, @Nullable Entity changer) Changes the status of a test.net.neoforged.fml.ModContainer
Returns the mod container bus linked to this framework.Returns a registrar for in-code structure templates.id()
Returns the ID of this framework instance.org.slf4j.Logger
logger()
Returns this framework's logger.net.neoforged.bus.api.IEventBus
Returns the mod event bus linked to this framework.void
setEnabled
(Test test, boolean enabled, @Nullable Entity changer) Enables or disables a test.tests()
Returns the Tests instance of this framework.
-
Method Details
-
id
ResourceLocation id()Returns the ID of this framework instance.- Returns:
- the ID of this framework instance
-
logger
org.slf4j.Logger logger()Returns this framework's logger.- Returns:
- this framework's logger
-
tests
TestFramework.Tests tests()Returns the Tests instance of this framework.- Returns:
- the Tests instance of this framework
-
changeStatus
Changes the status of a test.- Parameters:
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.- Parameters:
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()Returns the mod event bus linked to this framework.- Returns:
- the mod event bus linked to this framework
-
container
net.neoforged.fml.ModContainer container()Returns the mod container bus linked to this framework.- Returns:
- the mod container bus linked to this framework
-
dynamicStructures
DynamicStructureTemplates dynamicStructures()Returns a registrar for in-code structure templates.- Returns:
- a registrar for in-code structure templates
-