java.lang.Object
com.binaris.wizardry.core.gametest.GST

public class GST extends Object
Why this is called GST...?

General GameTest utility methods.

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    assertEmpty(net.minecraft.gametest.framework.GameTestHelper helper, String message, net.minecraft.world.item.ItemStack stack)
    Asserts that the given ItemStack is empty, failing the test with the given message if it is not.
    static <T> void
    assertEquals(net.minecraft.gametest.framework.GameTestHelper helper, String message, T expected, T actual)
    Asserts that the expected and actual values are equal, failing the test with the given message if they are not.
    static void
    assertFalse(net.minecraft.gametest.framework.GameTestHelper helper, String message, boolean condition)
    Asserts that the given condition is false, failing the test with the given message if it is true.
    static void
    assertIndexEquals(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.item.ItemStack wand, int expected, String action)
    Asserts that the currently selected spell index in the given wand is equal to the expected index, failing the test with a message that includes the given action description if they are not.
    static void
    assertNotEmpty(net.minecraft.gametest.framework.GameTestHelper helper, String message, net.minecraft.world.item.ItemStack stack)
    Asserts that the given ItemStack is not empty, failing the test with the given message if it is.
    static void
    assertNotNull(net.minecraft.gametest.framework.GameTestHelper helper, String message, Object object)
    Asserts that the given object is not null, failing the test with the given message if it is.
    static void
    assertNull(net.minecraft.gametest.framework.GameTestHelper helper, String message, Object object)
    Asserts that the given object is null, failing the test with the given message if it is not.
    static void
    assertSpellEquals(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.item.ItemStack wand, Spell expected, String action)
    Asserts that the currently selected spell in the given wand is equal to the expected spell, failing the test with a message that includes the given action description if they are not.
    static void
    assertTrue(net.minecraft.gametest.framework.GameTestHelper helper, String message, boolean condition)
    Asserts that the given condition is true, failing the test with the given message if it is false.
    static net.minecraft.world.damagesource.DamageSource
    createDamageSource(net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> key)
    Creates a DamageSource with the given player as the source and the given damage type.
    static net.minecraft.world.entity.Entity
    mockEntity(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 playerPos, net.minecraft.world.entity.EntityType<?> type)
    Spawns an entity of the given type at the given position in the GameTest world.
    static net.minecraft.world.entity.player.Player
    mockPlayer(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 position)
     
    static net.minecraft.world.entity.player.Player
    mockPlayerWithArmor(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 position, Element element, WizardArmorType type)
     
    static void
    placeBlock(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 blockPos, net.minecraft.world.level.block.Block block)
    Places a block at the given position in the GameTest world.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • mockPlayer

      public static net.minecraft.world.entity.player.Player mockPlayer(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 position)
    • mockPlayerWithArmor

      public static net.minecraft.world.entity.player.Player mockPlayerWithArmor(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 position, Element element, WizardArmorType type)
    • assertTrue

      public static void assertTrue(net.minecraft.gametest.framework.GameTestHelper helper, String message, boolean condition)
      Asserts that the given condition is true, failing the test with the given message if it is false.
    • assertFalse

      public static void assertFalse(net.minecraft.gametest.framework.GameTestHelper helper, String message, boolean condition)
      Asserts that the given condition is false, failing the test with the given message if it is true.
    • assertNotNull

      public static void assertNotNull(net.minecraft.gametest.framework.GameTestHelper helper, String message, Object object)
      Asserts that the given object is not null, failing the test with the given message if it is.
    • assertNull

      public static void assertNull(net.minecraft.gametest.framework.GameTestHelper helper, String message, Object object)
      Asserts that the given object is null, failing the test with the given message if it is not.
    • assertEquals

      public static <T> void assertEquals(net.minecraft.gametest.framework.GameTestHelper helper, String message, T expected, T actual)
      Asserts that the expected and actual values are equal, failing the test with the given message if they are not.
    • assertEmpty

      public static void assertEmpty(net.minecraft.gametest.framework.GameTestHelper helper, String message, net.minecraft.world.item.ItemStack stack)
      Asserts that the given ItemStack is empty, failing the test with the given message if it is not.
    • assertNotEmpty

      public static void assertNotEmpty(net.minecraft.gametest.framework.GameTestHelper helper, String message, net.minecraft.world.item.ItemStack stack)
      Asserts that the given ItemStack is not empty, failing the test with the given message if it is.
    • placeBlock

      public static void placeBlock(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 blockPos, net.minecraft.world.level.block.Block block)
      Places a block at the given position in the GameTest world.
    • mockEntity

      public static net.minecraft.world.entity.Entity mockEntity(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.phys.Vec3 playerPos, net.minecraft.world.entity.EntityType<?> type)
      Spawns an entity of the given type at the given position in the GameTest world.
    • createDamageSource

      public static net.minecraft.world.damagesource.DamageSource createDamageSource(net.minecraft.world.entity.player.Player player, net.minecraft.resources.ResourceKey<net.minecraft.world.damagesource.DamageType> key)
      Creates a DamageSource with the given player as the source and the given damage type.
    • assertSpellEquals

      public static void assertSpellEquals(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.item.ItemStack wand, Spell expected, String action)
      Asserts that the currently selected spell in the given wand is equal to the expected spell, failing the test with a message that includes the given action description if they are not.
    • assertIndexEquals

      public static void assertIndexEquals(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.item.ItemStack wand, int expected, String action)
      Asserts that the currently selected spell index in the given wand is equal to the expected index, failing the test with a message that includes the given action description if they are not.