Package net.minecraftforge.event
Class RegisterGameTestsEvent
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.RegisterGameTestsEvent
- All Implemented Interfaces:
IModBusEvent
public class RegisterGameTestsEvent
extends net.minecraftforge.eventbus.api.Event
implements IModBusEvent
Game tests are registered on client or server startup.
It is only run once for a given instance of the game if
ForgeGameTestHooks.isGametestEnabled() returns true.
This is the preferred way to register your game tests.
Fired on the Mod bus, see IModBusEvent.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
gameTestMethods
-
-
Constructor Details
-
RegisterGameTestsEvent
-
-
Method Details
-
register
Registers an entire class to the game test registry. All methods annotated withGameTestorGameTestGeneratorwill be registered. If the set of enabled batches is non-empty, a method will only be registered if itsbatchis listed.- Parameters:
testClass- the test class to register to the game test registry
-
register
Registers a single method to the game test registry. The method will only be registered if it is annotated withGameTestorGameTestGenerator. If the set of enabled batches is non-empty, the method will only be registered if itsbatchis listed.- Parameters:
testMethod- the test method to register to the game test registry
-