Package net.neoforged.testframework.impl
Class TestFrameworkImpl
java.lang.Object
net.neoforged.testframework.impl.TestFrameworkImpl
- All Implemented Interfaces:
- MutableTestFramework,- TestFramework
@Internal
@ParametersAreNonnullByDefault
public class TestFrameworkImpl
extends Object
implements MutableTestFramework
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface net.neoforged.testframework.impl.MutableTestFrameworkMutableTestFramework.MutableTestsNested classes/interfaces inherited from interface net.neoforged.testframework.TestFrameworkTestFramework.Tests
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final @Nullable FrameworkClientprivate Stringprivate final FrameworkConfigurationprivate net.neoforged.fml.ModContainer(package private) static final Set<TestFrameworkImpl>private final ResourceLocationprivate static final DateTimeFormatterprivate final org.slf4j.Loggerprivate net.neoforged.bus.api.IEventBusprivate @Nullable MinecraftServerprivate final DynamicStructureTemplatesprivate final SummaryDumperprivate final TestFrameworkImpl.TestsImplFields inherited from interface net.neoforged.testframework.impl.MutableTestFrameworkREFERENCE_CODEC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringcapitaliseWords(String string, String splitOn) voidchangeStatus(Test test, Test.Status newStatus, @Nullable Entity changer) Changes the status of a test.collectTests(net.neoforged.fml.ModContainer container) 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.voidinit(net.neoforged.bus.api.IEventBus modBus, net.neoforged.fml.ModContainer container) org.slf4j.Loggerlogger()Returns this framework's logger.net.neoforged.bus.api.IEventBusReturns the mod event bus linked to this framework.voidregisterCommands(com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> node) private voidsendPacketIfOn(@Nullable Runnable onServer, @Nullable Runnable remoteClient, @Nullable Runnable singlePlayer) voidsetEnabled(Test test, boolean enabled, @Nullable Entity changer) Enables or disables a test.private static voidsetupClient(TestFrameworkImpl impl, net.neoforged.bus.api.IEventBus modBus, net.neoforged.fml.ModContainer container) tests()Returns the Tests instance of this framework.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.testframework.impl.MutableTestFrameworkbuildCommand, disableCommand, enableCommand, setStatusCommand
- 
Field Details- 
FRAMEWORKS
- 
LOG_FORMAT
- 
configuration
- 
client
- 
loggerprivate final org.slf4j.Logger logger
- 
id
- 
tests
- 
server
- 
structures
- 
summaryDumper
- 
commandName
- 
modBusprivate net.neoforged.bus.api.IEventBus modBus
- 
containerprivate net.neoforged.fml.ModContainer container
 
- 
- 
Constructor Details- 
TestFrameworkImpl
 
- 
- 
Method Details- 
registerCommandspublic void registerCommands(com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSourceStack> node) - Specified by:
- registerCommandsin interface- MutableTestFramework
 
- 
playerTestStore- Specified by:
- playerTestStorein interface- MutableTestFramework
 
- 
dynamicStructuresDescription copied from interface:TestFrameworkReturns a registrar for in-code structure templates.- Specified by:
- dynamicStructuresin interface- TestFramework
- Returns:
- a registrar for in-code structure templates
 
- 
commandName- Specified by:
- commandNamein interface- MutableTestFramework
 
- 
configuration- Specified by:
- configurationin interface- MutableTestFramework
 
- 
initpublic void init(net.neoforged.bus.api.IEventBus modBus, net.neoforged.fml.ModContainer container) - Specified by:
- initin interface- MutableTestFramework
 
- 
setupClientprivate static void setupClient(TestFrameworkImpl impl, net.neoforged.bus.api.IEventBus modBus, net.neoforged.fml.ModContainer container) 
- 
collectTests- Specified by:
- collectTestsin interface- MutableTestFramework
 
- 
modEventBuspublic net.neoforged.bus.api.IEventBus modEventBus()Description copied from interface:TestFrameworkReturns the mod event bus linked to this framework.- Specified by:
- modEventBusin interface- TestFramework
- Returns:
- the mod event bus linked to this framework
 
- 
containerpublic net.neoforged.fml.ModContainer container()Description copied from interface:TestFrameworkReturns the mod container bus linked to this framework.- Specified by:
- containerin interface- TestFramework
- Returns:
- the mod container bus linked to this framework
 
- 
idDescription copied from interface:TestFrameworkReturns the ID of this framework instance.- Specified by:
- idin interface- TestFramework
- Returns:
- the ID of this framework instance
 
- 
loggerpublic org.slf4j.Logger logger()Description copied from interface:TestFrameworkReturns this framework's logger.- Specified by:
- loggerin interface- TestFramework
- Returns:
- this framework's logger
 
- 
testsDescription copied from interface:TestFrameworkReturns the Tests instance of this framework.- Specified by:
- testsin interface- MutableTestFramework
- Specified by:
- testsin interface- TestFramework
- Returns:
- the Tests instance of this framework
 
- 
changeStatusDescription copied from interface:TestFrameworkChanges the status of a test.- Specified by:
- changeStatusin interface- TestFramework
- Parameters:
- 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
 
- 
setEnabledDescription copied from interface:TestFrameworkEnables or disables a test.- Specified by:
- setEnabledin interface- TestFramework
- Parameters:
- test- the test to enable/disable
- enabled-- trueif to enable,- falseif to disable
- changer- the entity that changed the status of the test. Usually the player which runs the enable command
 
- 
sendPacketIfOn
- 
capitaliseWords
 
-