Class ExtendedGameTestHelper

java.lang.Object
net.minecraft.gametest.framework.GameTestHelper
net.neoforged.testframework.gametest.ExtendedGameTestHelper

public class ExtendedGameTestHelper extends GameTestHelper
  • Constructor Details

    • ExtendedGameTestHelper

      public ExtendedGameTestHelper(GameTestInfo info)
  • Method Details

    • startSequence

      public ExtendedSequence startSequence()
      Overrides:
      startSequence in class GameTestHelper
    • useOn

      public void useOn(BlockPos pos, ItemStack item, Player player, Direction direction)
    • useBlock

      public void useBlock(BlockPos pos, Player player, ItemStack item)
    • useBlock

      public void useBlock(BlockPos pos, Player player, ItemStack item, Direction direction)
    • assertEntityProperty

      public <T, E extends Entity> void assertEntityProperty(E entity, Function<E,T> function, String valueName, T expected, BiPredicate<T,T> tester)
    • makeTickingMockServerPlayerInCorner

      public GameTestPlayer makeTickingMockServerPlayerInCorner(GameType gameType)
    • makeTickingMockServerPlayerInLevel

      public GameTestPlayer makeTickingMockServerPlayerInLevel(GameType gameType)
    • makeOpMockPlayer

      public Player makeOpMockPlayer(int commandLevel)
    • blocksBetween

      public Stream<BlockPos> blocksBetween(int x, int y, int z, int length, int height, int width)
    • getBlockEntity

      @Nullable public <T extends BlockEntity> T getBlockEntity(BlockPos pos, Class<T> type)
    • getBlockEntity

      @Nullable public <T extends BlockEntity> T getBlockEntity(int x, int y, int z, Class<T> type)
    • requireBlockEntity

      public <T extends BlockEntity> T requireBlockEntity(BlockPos pos, Class<T> type)
    • requireBlockEntity

      public <T extends BlockEntity> T requireBlockEntity(int x, int y, int z, Class<T> type)
    • startSequence

      public <T> ParametrizedGameTestSequence<T> startSequence(Supplier<T> value)
    • killAllEntitiesOfClass

      public void killAllEntitiesOfClass(Class<?>... types)
    • assertItemEntityCountIsAtLeast

      public void assertItemEntityCountIsAtLeast(Item item, BlockPos pos, double range, int lowerLimit)
    • boneMeal

      public void boneMeal(BlockPos pos, Player player)
    • boneMeal

      public void boneMeal(int x, int y, int z, Player player)
    • boneMealUntilGrown

      public void boneMealUntilGrown(int x, int y, int z, Player player)
    • assertContainerEmpty

      public void assertContainerEmpty(int x, int y, int z)
    • assertContainerContains

      public void assertContainerContains(int x, int y, int z, Item item)
    • pulseRedstone

      public void pulseRedstone(int x, int y, int z, long delay)
    • assertPlayerHasItem

      public void assertPlayerHasItem(Player player, Item item)
    • requireDifficulty

      public void requireDifficulty(Difficulty difficulty)
    • addEndListener

      public void addEndListener(Consumer<Boolean> listener)
    • catchException

      public <T> T catchException(ExtendedGameTestHelper.ThrowingSupplier<T> supplier)
    • catchException

      public void catchException(ExtendedGameTestHelper.ThrowingRunnable run)
    • requireEntityAt

      public <T extends Entity> T requireEntityAt(EntityType<T> type, int x, int y, int z)
    • requireEntityAt

      public <T extends Entity> T requireEntityAt(EntityType<T> type, BlockPos pos)
    • knockbackResistant

      @CanIgnoreReturnValue public <T extends Entity> T knockbackResistant(T entity)
    • addTemporaryListener

      public <T extends net.neoforged.bus.api.Event> void addTemporaryListener(Consumer<T> event)
    • assertMobEffectPresent

      public <E extends LivingEntity> void assertMobEffectPresent(E entity, MobEffect effect, String testName)
    • assertMobEffectAbsent

      public <E extends LivingEntity> void assertMobEffectAbsent(E entity, MobEffect effect, String testName)