Class GameTestsWrenchConfig
java.lang.Object
org.cyclops.integrateddynamics.gametest.GameTestsWrenchConfig
Tests for copying and pasting part configurations with the Wrench.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static PartConfigApplyResultapplyConfig(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, PartConfigSnapshot snapshot, net.minecraft.world.entity.player.Player player) protected static PartConfigApplyResultapplyConfigSections(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, PartConfigSnapshot snapshot, net.minecraft.world.entity.player.Player player, Set<PartConfigSection> sections) protected static voidclickPart(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.protected static voidconfigurePart(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.protected static intcountBlankVariables(net.minecraft.world.entity.player.Player player) protected static intcountOffsetEnhancements(net.minecraft.world.entity.player.Player player) protected static net.minecraft.world.item.ItemStackcreateWrench(ItemWrench.Mode mode) protected static PartConfigEntryfindEntry(List<PartConfigEntry> entries, String id) protected static net.minecraft.world.item.ItemStackgetActiveVariable(PartPos partPos) protected static net.minecraft.world.item.ItemStackgetAspectVariable(PartPos partPos, IAspect<?, ?> aspect, int slot) protected static net.minecraft.world.item.ItemStackgetOffsetVariable(PartPos partPos, int slot) protected static intgetVariableId(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.item.ItemStack itemStack) protected static voidgiveBlankVariables(net.minecraft.world.entity.player.Player player, int count) protected static voidgiveOffsetEnhancements(net.minecraft.world.entity.player.Player player, int count, int value) protected static booleanhasVariableWithId(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.entity.player.Player player, int id) protected static IPartState<?> protected static IPartType<?, ?> protected static PartPosplacePart(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.core.BlockPos pos, IPartType<?, ?> partType) protected static voidsetOffsetVariable(PartPos partPos, int slot, net.minecraft.world.item.ItemStack variable) protected static PartConfigSnapshotsnapshotConfig(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos) voidtestWrenchConfigAspectModeCopiesTheActiveVariable(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigAspectModeOnlyCopiesAspects(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigAspectModeSkipsMaxOffset(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigAspectModeSkipsOffsetVariables(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigCopiesOnlyTheActiveAspect(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigCopyOnlyStoresNonDefaultValues(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigCopyPasteSamePartType(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigDisabledAspectPropertyIsNotPasted(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigDisabledSettingIsNotPasted(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigDisabledVariableCardIsNotPasted(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigEntriesAreGroupedUnderTheirAspect(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigEntriesCarryValuesAndIcons(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigEntriesListEverything(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigKeepsVariablesThatAreAlreadyThere(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigMaxOffsetShowsItsEnhancements(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPartTypeExtraData(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPartTypeExtraDataSkipsOtherSections(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteAspectVariableGetsNewIdAndEjectsExisting(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteCardsGetNewIdAndEjectExisting(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteCreativeWithoutBlanks(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteKeepsUntouchedSettings(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteMaxOffsetConsumesEnhancements(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteMaxOffsetCreativeWithoutEnhancements(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteMaxOffsetKeepsHigherOne(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteMaxOffsetWithoutEnhancements(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteOffsetOutOfRange(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteOffsetVariableGetsNewIdAndEjectsExisting(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteOtherPartType(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteWithoutBlanks(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigPasteWithoutCopy(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigSettingsModeCopiesOffsetVariables(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigSettingsModeOnlyCopiesPartSettings(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigSneakDoesNotRemovePart(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigSubsetModeAcrossPartTypes(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigSurvivesModeCycling(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigVariableCardEntriesNameTheirAspect(net.minecraft.gametest.framework.GameTestHelper helper) voidtestWrenchConfigWithEverythingSwitchedOffPastesNothing(net.minecraft.gametest.framework.GameTestHelper helper) 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.protected static ItemWrench
-
Field Details
-
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
- See Also:
-
EXTRA_APPLIED
- See Also:
-
-
Constructor Details
-
GameTestsWrenchConfig
public GameTestsWrenchConfig()
-
-
Method Details
-
placePart
-
wrenchItem
-
createWrench
-
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
-
partState
-
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
-
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
-
setOffsetVariable
protected static void setOffsetVariable(PartPos partPos, int slot, net.minecraft.world.item.ItemStack variable) -
getOffsetVariable
-
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
-
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)
-