Class GameTestsWrenchConfig

java.lang.Object
org.cyclops.integrateddynamics.gametest.GameTestsWrenchConfig

public class GameTestsWrenchConfig extends Object
Tests for copying and pasting part configurations with the Wrench.
  • Field Details

    • TEMPLATE_EMPTY

      public static final String TEMPLATE_EMPTY
      See Also:
    • POS_SOURCE

      public static final net.minecraft.core.BlockPos POS_SOURCE
    • POS_TARGET

      public static final net.minecraft.core.BlockPos POS_TARGET
    • EXTRA_KEY

      public static final String EXTRA_KEY
      See Also:
    • EXTRA_APPLIED

      public static final String EXTRA_APPLIED
      See Also:
  • Constructor Details

    • GameTestsWrenchConfig

      public GameTestsWrenchConfig()
  • Method Details

    • placePart

      protected static PartPos placePart(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.core.BlockPos pos, IPartType<?,?> partType)
    • wrenchItem

      protected static ItemWrench wrenchItem()
    • createWrench

      protected static net.minecraft.world.item.ItemStack createWrench(ItemWrench.Mode mode)
    • clickPart

      protected static void clickPart(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack itemStack, PartPos partPos, boolean sneaking)
      Click on the given part with the given item, in the same way as a player would.
    • partType

      protected static IPartType<?,?> partType(PartPos partPos)
    • partState

      protected static IPartState<?> partState(PartPos partPos)
    • configurePart

      protected static void configurePart(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, net.minecraft.core.Vec3i offset)
      Give the given part a non-default configuration, so that copying it is observable.
    • applyConfig

      protected static PartConfigApplyResult applyConfig(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, PartConfigSnapshot snapshot, net.minecraft.world.entity.player.Player player)
    • applyConfigSections

      protected static PartConfigApplyResult applyConfigSections(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, PartConfigSnapshot snapshot, net.minecraft.world.entity.player.Player player, Set<PartConfigSection> sections)
    • snapshotConfig

      protected static PartConfigSnapshot snapshotConfig(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos)
    • getActiveVariable

      @Nullable protected static net.minecraft.world.item.ItemStack getActiveVariable(PartPos partPos)
    • getVariableId

      protected static int getVariableId(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.item.ItemStack itemStack)
    • countBlankVariables

      protected static int countBlankVariables(net.minecraft.world.entity.player.Player player)
    • getAspectVariable

      protected static net.minecraft.world.item.ItemStack getAspectVariable(PartPos partPos, IAspect<?,?> aspect, int slot)
    • setOffsetVariable

      protected static void setOffsetVariable(PartPos partPos, int slot, net.minecraft.world.item.ItemStack variable)
    • getOffsetVariable

      protected static net.minecraft.world.item.ItemStack getOffsetVariable(PartPos partPos, int slot)
    • giveBlankVariables

      protected static void giveBlankVariables(net.minecraft.world.entity.player.Player player, int count)
    • giveOffsetEnhancements

      protected static void giveOffsetEnhancements(net.minecraft.world.entity.player.Player player, int count, int value)
    • countOffsetEnhancements

      protected static int countOffsetEnhancements(net.minecraft.world.entity.player.Player player)
    • testWrenchConfigCopyPasteSamePartType

      public void testWrenchConfigCopyPasteSamePartType(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteOtherPartType

      public void testWrenchConfigPasteOtherPartType(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteCardsGetNewIdAndEjectExisting

      public void testWrenchConfigPasteCardsGetNewIdAndEjectExisting(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigKeepsVariablesThatAreAlreadyThere

      public void testWrenchConfigKeepsVariablesThatAreAlreadyThere(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteAspectVariableGetsNewIdAndEjectsExisting

      public void testWrenchConfigPasteAspectVariableGetsNewIdAndEjectsExisting(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteOffsetVariableGetsNewIdAndEjectsExisting

      public void testWrenchConfigPasteOffsetVariableGetsNewIdAndEjectsExisting(net.minecraft.gametest.framework.GameTestHelper helper)
    • hasVariableWithId

      protected static boolean hasVariableWithId(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.entity.player.Player player, int id)
    • testWrenchConfigPasteWithoutBlanks

      public void testWrenchConfigPasteWithoutBlanks(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteCreativeWithoutBlanks

      public void testWrenchConfigPasteCreativeWithoutBlanks(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteOffsetOutOfRange

      public void testWrenchConfigPasteOffsetOutOfRange(net.minecraft.gametest.framework.GameTestHelper helper)
    • withExtraConfig

      protected static IPartType<?,?> withExtraConfig(IPartType<?,?> delegate, String key, int value, AtomicInteger applied)
      A part type that behaves like the given one, but that stores and reads back an extra value, the way an addon would override these methods on its own part types.
      Parameters:
      delegate - The part type to behave like.
      key - The key to store the extra value under.
      value - The extra value to store when copying.
      applied - Where the extra value that is read back when pasting is put.
      Returns:
      The part type.
    • testWrenchConfigPasteMaxOffsetConsumesEnhancements

      public void testWrenchConfigPasteMaxOffsetConsumesEnhancements(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteMaxOffsetWithoutEnhancements

      public void testWrenchConfigPasteMaxOffsetWithoutEnhancements(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteMaxOffsetCreativeWithoutEnhancements

      public void testWrenchConfigPasteMaxOffsetCreativeWithoutEnhancements(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteMaxOffsetKeepsHigherOne

      public void testWrenchConfigPasteMaxOffsetKeepsHigherOne(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigAspectModeSkipsMaxOffset

      public void testWrenchConfigAspectModeSkipsMaxOffset(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigEntriesListEverything

      public void testWrenchConfigEntriesListEverything(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigEntriesCarryValuesAndIcons

      public void testWrenchConfigEntriesCarryValuesAndIcons(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigCopiesOnlyTheActiveAspect

      public void testWrenchConfigCopiesOnlyTheActiveAspect(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigVariableCardEntriesNameTheirAspect

      public void testWrenchConfigVariableCardEntriesNameTheirAspect(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigEntriesAreGroupedUnderTheirAspect

      public void testWrenchConfigEntriesAreGroupedUnderTheirAspect(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigMaxOffsetShowsItsEnhancements

      public void testWrenchConfigMaxOffsetShowsItsEnhancements(net.minecraft.gametest.framework.GameTestHelper helper)
    • findEntry

      @Nullable protected static PartConfigEntry findEntry(List<PartConfigEntry> entries, String id)
    • testWrenchConfigDisabledSettingIsNotPasted

      public void testWrenchConfigDisabledSettingIsNotPasted(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigDisabledAspectPropertyIsNotPasted

      public void testWrenchConfigDisabledAspectPropertyIsNotPasted(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigDisabledVariableCardIsNotPasted

      public void testWrenchConfigDisabledVariableCardIsNotPasted(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigWithEverythingSwitchedOffPastesNothing

      public void testWrenchConfigWithEverythingSwitchedOffPastesNothing(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPartTypeExtraData

      public void testWrenchConfigPartTypeExtraData(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPartTypeExtraDataSkipsOtherSections

      public void testWrenchConfigPartTypeExtraDataSkipsOtherSections(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigSettingsModeOnlyCopiesPartSettings

      public void testWrenchConfigSettingsModeOnlyCopiesPartSettings(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigAspectModeOnlyCopiesAspects

      public void testWrenchConfigAspectModeOnlyCopiesAspects(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigAspectModeCopiesTheActiveVariable

      public void testWrenchConfigAspectModeCopiesTheActiveVariable(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigSettingsModeCopiesOffsetVariables

      public void testWrenchConfigSettingsModeCopiesOffsetVariables(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigAspectModeSkipsOffsetVariables

      public void testWrenchConfigAspectModeSkipsOffsetVariables(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigSubsetModeAcrossPartTypes

      public void testWrenchConfigSubsetModeAcrossPartTypes(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigSneakDoesNotRemovePart

      public void testWrenchConfigSneakDoesNotRemovePart(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigCopyOnlyStoresNonDefaultValues

      public void testWrenchConfigCopyOnlyStoresNonDefaultValues(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteKeepsUntouchedSettings

      public void testWrenchConfigPasteKeepsUntouchedSettings(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigSurvivesModeCycling

      public void testWrenchConfigSurvivesModeCycling(net.minecraft.gametest.framework.GameTestHelper helper)
    • testWrenchConfigPasteWithoutCopy

      public void testWrenchConfigPasteWithoutCopy(net.minecraft.gametest.framework.GameTestHelper helper)