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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface used for accessing a framework's tests. -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeStatus(Test test, Test.Status newStatus, @Nullable Entity changer) Changes the status of a test.net.neoforged.fml.ModContainerReturns 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.Loggerlogger()Returns this framework's logger.net.neoforged.bus.api.IEventBusReturns the mod event bus linked to this framework.voidsetEnabled(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-trueif to enable,falseif 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
-