Class CreateTestFunction

java.lang.Object
com.simibubi.create.infrastructure.gametest.CreateTestFunction

public class CreateTestFunction extends Object
An extension to game tests implementing functionality for CreateGameTestHelper and GameTestGroup. To use, create a GameTestGenerator that provides tests using getTestsFrom(Class[]).
  • Field Details

    • NAMES_TO_FUNCTIONS

      public static final Map<String,CreateTestFunction> NAMES_TO_FUNCTIONS
    • fullName

      public final String fullName
    • simpleName

      public final String simpleName
    • testFunction

      public final net.minecraft.gametest.framework.TestFunction testFunction
  • Constructor Details

    • CreateTestFunction

      protected CreateTestFunction(String fullName, String simpleName, String pBatchName, String pStructureName, net.minecraft.world.level.block.Rotation pRotation, int pMaxTicks, long pSetupTicks, boolean pRequired, int pMaxAttempts, int pRequiredSuccesses, Consumer<net.minecraft.gametest.framework.GameTestHelper> pFunction)
  • Method Details

    • getTestsFrom

      public static Collection<net.minecraft.gametest.framework.TestFunction> getTestsFrom(Class<?>... classes)
      Get all Create test functions from the given classes. This enables functionality of CreateGameTestHelper and GameTestGroup.
    • of

      @Nullable public static net.minecraft.gametest.framework.TestFunction of(Method method)
    • run

      public static Consumer<net.minecraft.gametest.framework.GameTestHelper> run(String fullName, @NotNull @NotNull Consumer<net.minecraft.gametest.framework.GameTestHelper> helper)