Class ExtendedGameTestHelper

java.lang.Object
net.minecraft.gametest.framework.GameTestHelper
net.neoforged.testframework.gametest.ExtendedGameTestHelper
Direct Known Subclasses:
CustomHelperTests.Helper

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)
    • getCapability

      @Nullable public <T, C> T getCapability(BlockCapability<T,C> cap, BlockPos pos, C context)
    • requireCapability

      public <T, C> T requireCapability(BlockCapability<T,C> cap, BlockPos pos, C context)
    • startSequence

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

      public Player makeMockPlayer()
    • killAllEntitiesOfClass

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

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

      public void breakBlock(BlockPos relativePos, ItemStack tool, @Nullable @Nullable Entity breakingEntity)
    • 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, Holder<MobEffect> effect, String testName)
    • assertMobEffectAbsent

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