Class GameTestHelpersIntegratedDynamics

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

public class GameTestHelpersIntegratedDynamics extends Object
  • Constructor Details

    • GameTestHelpersIntegratedDynamics

      public GameTestHelpersIntegratedDynamics()
  • Method Details

    • assertValueEqual

      public static void assertValueEqual(net.minecraft.gametest.framework.GameTestHelper helper, IValue value1, IValue value2)
    • assertValueEqual

      public static void assertValueEqual(net.minecraft.gametest.framework.GameTestHelper helper, @Nullable IVariable value1, IValue value2)
    • 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

      public static net.minecraft.world.item.ItemStack createVariableFromReader(net.minecraft.world.level.Level level, PartPos partPos, IAspect aspect)
    • 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)