Class GameTestHelpersIntegratedDynamics
java.lang.Object
org.cyclops.integrateddynamics.gametest.GameTestHelpersIntegratedDynamics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertValueEqual(net.minecraft.gametest.framework.GameTestHelper helper, IValue value1, IValue value2) static voidassertValueEqual(net.minecraft.gametest.framework.GameTestHelper helper, IVariable value1, IValue value2) static net.minecraft.world.item.ItemStackcreateVariableForOperator(net.minecraft.world.level.Level level, IOperator operator, int[] variableIds) static net.minecraft.world.item.ItemStackcreateVariableForValue(net.minecraft.world.level.Level level, IValueType valueType, IValue value) static net.minecraft.world.item.ItemStackcreateVariableFromReader(net.minecraft.world.level.Level level, IAspect aspect, IPartState partState) static net.minecraft.world.item.ItemStackcreateVariableFromReader(net.minecraft.world.level.Level level, PartPos partPos, IAspect aspect) static net.minecraft.network.chat.ComponentgetAspectPropertyVariableError(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<?, ?> property) static <T extends IValueType<V>, V extends IValue>
VgetEffectiveAspectProperty(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<T, V> property) static IVariableFacadegetVariableFacade(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack itemStack) static org.apache.commons.lang3.tuple.Pair<PartTypePanelDisplay, PartTypePanelDisplay.State> placeVariableInDisplayPanel(net.minecraft.world.level.Level level, PartPos partPos, net.minecraft.world.item.ItemStack variableAspect) static voidplaceVariableInWriter(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.level.Level level, PartPos partPos, IAspectWrite<?, ?> aspect, net.minecraft.world.item.ItemStack variableAspect) static voidplaceVariableInWriter(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.level.Level level, PartPos partPos, IAspectWrite<?, ?> aspect, net.minecraft.world.item.ItemStack variableAspect, net.minecraft.world.entity.player.Player player) static <T extends IValueType<V>, V extends IValue>
voidsetAspectProperty(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<T, V> property, V value) static voidsetAspectPropertyVariable(PartPos partPos, IAspect aspect, int propertyIndex, net.minecraft.world.item.ItemStack variable) Place a variable in the aspect setting slot at the given property index.static voidsetAspectPropertyVariable(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<?, ?> property, net.minecraft.world.item.ItemStack variable) Place a variable in the aspect setting slot of the given aspect property.static <V extends IValue>
voidtestReadAspect(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, V expectedValue) static <V extends IValue>
voidtestReadAspectOperator(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, List<IValue> operatorInputs, IValue expectedOperatorOutput) static <V extends IValue>
voidtestReadAspectOperatorPredicate(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, List<IValue> operatorInputs, Predicate<IValue> asserter) static <V extends IValue>
voidtestReadAspectPredicate(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, Predicate<V> asserter) static Supplier<IAspectVariable> testReadAspectSetup(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<?, ?> aspectRead) static <V extends IValue>
voidtestReadAspectThrows(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead) static <V extends IValue>
voidtestWriteAspectSetup(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeWriter<?, ?> partType, IAspectWrite<V, ?> aspectWrite, net.minecraft.world.item.ItemStack variableAspect) static <V extends IValue>
voidtestWriteAspectSetup(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeWriter<?, ?> partType, IAspectWrite<V, ?> aspectWrite, V value)
-
Constructor Details
-
GameTestHelpersIntegratedDynamics
public GameTestHelpersIntegratedDynamics()
-
-
Method Details
-
assertValueEqual
-
assertValueEqual
-
createVariableForValue
public static net.minecraft.world.item.ItemStack createVariableForValue(net.minecraft.world.level.Level level, IValueType valueType, IValue value) -
createVariableForOperator
public static net.minecraft.world.item.ItemStack createVariableForOperator(net.minecraft.world.level.Level level, IOperator operator, int[] variableIds) -
getVariableFacade
public static IVariableFacade getVariableFacade(net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack itemStack) -
createVariableFromReader
-
createVariableFromReader
public static net.minecraft.world.item.ItemStack createVariableFromReader(net.minecraft.world.level.Level level, IAspect aspect, IPartState partState) -
placeVariableInWriter
public static void placeVariableInWriter(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.level.Level level, PartPos partPos, IAspectWrite<?, ?> aspect, net.minecraft.world.item.ItemStack variableAspect) -
placeVariableInWriter
public static void placeVariableInWriter(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.world.level.Level level, PartPos partPos, IAspectWrite<?, ?> aspect, net.minecraft.world.item.ItemStack variableAspect, @Nullable net.minecraft.world.entity.player.Player player) -
placeVariableInDisplayPanel
public static org.apache.commons.lang3.tuple.Pair<PartTypePanelDisplay, PartTypePanelDisplay.State> placeVariableInDisplayPanel(net.minecraft.world.level.Level level, PartPos partPos, net.minecraft.world.item.ItemStack variableAspect) -
testReadAspectSetup
public static Supplier<IAspectVariable> testReadAspectSetup(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<?, ?> aspectRead) -
testReadAspectThrows
public static <V extends IValue> void testReadAspectThrows(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead) -
testReadAspect
public static <V extends IValue> void testReadAspect(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, V expectedValue) -
testReadAspectPredicate
public static <V extends IValue> void testReadAspectPredicate(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, Predicate<V> asserter) -
testReadAspectOperator
public static <V extends IValue> void testReadAspectOperator(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, List<IValue> operatorInputs, IValue expectedOperatorOutput) -
testReadAspectOperatorPredicate
public static <V extends IValue> void testReadAspectOperatorPredicate(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeReader<?, ?> partType, IAspectRead<V, ?> aspectRead, List<IValue> operatorInputs, Predicate<IValue> asserter) -
testWriteAspectSetup
public static <V extends IValue> void testWriteAspectSetup(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeWriter<?, ?> partType, IAspectWrite<V, ?> aspectWrite, net.minecraft.world.item.ItemStack variableAspect) -
testWriteAspectSetup
public static <V extends IValue> void testWriteAspectSetup(net.minecraft.core.BlockPos pos, net.minecraft.gametest.framework.GameTestHelper helper, IPartTypeWriter<?, ?> partType, IAspectWrite<V, ?> aspectWrite, V value) -
setAspectPropertyVariable
public static void setAspectPropertyVariable(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<?, ?> property, net.minecraft.world.item.ItemStack variable) Place a variable in the aspect setting slot of the given aspect property.- Parameters:
partPos- The part position.aspect- The aspect.property- The aspect property.variable- The variable item, or an empty item stack to clear the slot.
-
setAspectPropertyVariable
public static void setAspectPropertyVariable(PartPos partPos, IAspect aspect, int propertyIndex, net.minecraft.world.item.ItemStack variable) Place a variable in the aspect setting slot at the given property index.- Parameters:
partPos- The part position.aspect- The aspect.propertyIndex- The index of the aspect property.variable- The variable item, or an empty item stack to clear the slot.
-
getAspectPropertyVariableError
@Nullable public static net.minecraft.network.chat.Component getAspectPropertyVariableError(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<?, ?> property) - Parameters:
partPos- The part position.aspect- The aspect.property- The aspect property.- Returns:
- The current error in the aspect setting variable slot, or null if there is no error.
-
getEffectiveAspectProperty
public static <T extends IValueType<V>, V extends IValue> V getEffectiveAspectProperty(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<T, V> property) - Parameters:
partPos- The part position.aspect- The aspect.property- The aspect property.- Returns:
- The effective value of the given aspect property, after applying any variable-driven values.
-
setAspectProperty
public static <T extends IValueType<V>, V extends IValue> void setAspectProperty(PartPos partPos, IAspect aspect, IAspectPropertyTypeInstance<T, V> property, V value)
-