Class GameTestsAspectVariables
java.lang.Object
org.cyclops.integrateddynamics.gametest.GameTestsAspectVariables
Tests for aspect settings (aspect properties) that are driven by variables.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA minimal value notifier that captures values in-memory, so that the server-to-client value syncing can be verified without a network connection.static classA writer part gui container that records the values that would be synced to the client, instead of sending them over the network. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static ContainerAspectSettingsopenAspectSettings(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IAspect<?, ?> aspect) Construct the aspect settings container for the given part and aspect, in the same way as it is constructed when a player opens the aspect settings gui.protected static ContainerMultipartAspectsopenPartGui(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IPartType<?, ?> partType) Construct the part gui container for the given part, in the same way as it is constructed when a player opens the part gui.protected static ContainerMultipartAspectsopenPartGuiFromNetwork(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IPartType<?, ?> partType) Construct the part gui container in the same way as it is constructed client-side, from the data that the server sends when the gui is opened.protected static GameTestsAspectVariables.RecordingContainerPartWriteropenPartGuiWriter(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos) Construct the writer part gui container in the same way as it is constructed when a player opens the part gui, but with all value syncing recorded in-memory.protected static ContainerMultipartAspectsopenPartGuiWriterFromNetwork(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IPartType<?, ?> partType) Construct the writer part gui container in the same way as it is constructed client-side, from the data that the server sends when the gui is opened.protected static PartPospartPos(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.core.BlockPos pos) protected static net.minecraft.world.level.block.entity.ChestBlockEntityprepareChest(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.core.BlockPos pos) Fill the chest west of the given position with a unique item in the first few slots.protected static StringpropertyTooltipValue(ContainerMultipartAspects container, IAspect aspect, int propertyIndex) protected static List<net.minecraft.network.chat.Component> syncPropertyValues(net.minecraft.gametest.framework.GameTestHelper helper, ContainerMultipartAspects container, IAspect aspect) voidtestAspectVariablesAbsentUsesDefaultProperty(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesAbsentUsesStaticProperty(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesConstant(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesConstantOverridesStaticProperty(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesContainerSlotPaging(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesDisplayedValueFollowsDynamicVariable(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesDisplayedValueFollowsVariable(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesDropOnBreak(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesDynamic(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesEffectiveProperty(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesErrorPersistence(net.minecraft.gametest.framework.GameTestHelper helper) The errors of aspect setting variables are part of the part state, so that the client also knows about them, and can render them in the part gui tooltip.voidtestAspectVariablesFromVariableStore(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesInvalidType(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesInvalidValue(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiBroadcastChanges(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiBroadcastSyncsErroredValue(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiBroadcastSyncsVariableDrivenValue(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValueIdsSymmetric(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValues(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesDefaultValue(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesEmptySyncFallback(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesError(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesSync(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesSyncMultiple(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesSyncVariableDriven(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiPropertyValuesUnsyncedFallback(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiWriterPropertyValueIdsSymmetric(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiWriterPropertyValues(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesPartGuiWriterSyncedToClient(net.minecraft.gametest.framework.GameTestHelper helper) The full server-to-client path: the server determines the values, syncs them under a value id, and the client-side container shows them in its tooltip.voidtestAspectVariablesPartGuiWriterUnsyncedShowsVariableDrivenValue(net.minecraft.gametest.framework.GameTestHelper helper) Even when the server has not synced any values yet, the client must show that a setting is driven by a variable, as the variables themselves are part of the (synced) part state.voidtestAspectVariablesPersistence(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesRemoval(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesUnaffectedAspects(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesViaContainer(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesWriteRedstonePulseEmitValue(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesWriteRedstonePulseLength(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesWriteRedstoneStrongPowerDynamic(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesWriteRedstoneStrongPowerFalse(net.minecraft.gametest.framework.GameTestHelper helper) voidtestAspectVariablesWriteRedstoneStrongPowerTrue(net.minecraft.gametest.framework.GameTestHelper helper)
-
Field Details
-
TEMPLATE_EMPTY
- See Also:
-
POS
public static final net.minecraft.core.BlockPos POS
-
-
Constructor Details
-
GameTestsAspectVariables
public GameTestsAspectVariables()
-
-
Method Details
-
partPos
protected static PartPos partPos(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.core.BlockPos pos) -
openAspectSettings
protected static ContainerAspectSettings openAspectSettings(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IAspect<?, ?> aspect) Construct the aspect settings container for the given part and aspect, in the same way as it is constructed when a player opens the aspect settings gui. -
openPartGui
protected static ContainerMultipartAspects openPartGui(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IPartType<?, ?> partType) Construct the part gui container for the given part, in the same way as it is constructed when a player opens the part gui. -
propertyTooltipValue
protected static String propertyTooltipValue(ContainerMultipartAspects container, IAspect aspect, int propertyIndex) - Returns:
- The value that the part gui shows for the given aspect property in its properties tooltip, which is empty for properties that still have their default value.
-
openPartGuiFromNetwork
protected static ContainerMultipartAspects openPartGuiFromNetwork(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IPartType<?, ?> partType) Construct the part gui container in the same way as it is constructed client-side, from the data that the server sends when the gui is opened. -
openPartGuiWriter
protected static GameTestsAspectVariables.RecordingContainerPartWriter openPartGuiWriter(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos) Construct the writer part gui container in the same way as it is constructed when a player opens the part gui, but with all value syncing recorded in-memory. -
openPartGuiWriterFromNetwork
protected static ContainerMultipartAspects openPartGuiWriterFromNetwork(net.minecraft.gametest.framework.GameTestHelper helper, PartPos partPos, IPartType<?, ?> partType) Construct the writer part gui container in the same way as it is constructed client-side, from the data that the server sends when the gui is opened. -
syncPropertyValues
protected static List<net.minecraft.network.chat.Component> syncPropertyValues(net.minecraft.gametest.framework.GameTestHelper helper, ContainerMultipartAspects container, IAspect aspect) - Returns:
- The aspect property values after passing them through the value notifier serialization, exactly like they are sent from the server to the client.
-
prepareChest
protected static net.minecraft.world.level.block.entity.ChestBlockEntity prepareChest(net.minecraft.gametest.framework.GameTestHelper helper, net.minecraft.core.BlockPos pos) Fill the chest west of the given position with a unique item in the first few slots. -
testAspectVariablesAbsentUsesDefaultProperty
public void testAspectVariablesAbsentUsesDefaultProperty(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesAbsentUsesStaticProperty
public void testAspectVariablesAbsentUsesStaticProperty(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesConstant
public void testAspectVariablesConstant(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesConstantOverridesStaticProperty
public void testAspectVariablesConstantOverridesStaticProperty(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesRemoval
public void testAspectVariablesRemoval(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesDynamic
public void testAspectVariablesDynamic(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesInvalidType
public void testAspectVariablesInvalidType(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesInvalidValue
public void testAspectVariablesInvalidValue(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesDisplayedValueFollowsVariable
public void testAspectVariablesDisplayedValueFollowsVariable(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesDisplayedValueFollowsDynamicVariable
public void testAspectVariablesDisplayedValueFollowsDynamicVariable(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesSync
public void testAspectVariablesPartGuiPropertyValuesSync(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesSyncMultiple
public void testAspectVariablesPartGuiPropertyValuesSyncMultiple(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesSyncVariableDriven
public void testAspectVariablesPartGuiPropertyValuesSyncVariableDriven(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesError
public void testAspectVariablesPartGuiPropertyValuesError(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesUnsyncedFallback
public void testAspectVariablesPartGuiPropertyValuesUnsyncedFallback(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesEmptySyncFallback
public void testAspectVariablesPartGuiPropertyValuesEmptySyncFallback(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiWriterPropertyValues
public void testAspectVariablesPartGuiWriterPropertyValues(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiBroadcastChanges
public void testAspectVariablesPartGuiBroadcastChanges(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiBroadcastSyncsVariableDrivenValue
public void testAspectVariablesPartGuiBroadcastSyncsVariableDrivenValue(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiBroadcastSyncsErroredValue
public void testAspectVariablesPartGuiBroadcastSyncsErroredValue(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValueIdsSymmetric
public void testAspectVariablesPartGuiPropertyValueIdsSymmetric(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiWriterPropertyValueIdsSymmetric
public void testAspectVariablesPartGuiWriterPropertyValueIdsSymmetric(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiWriterSyncedToClient
public void testAspectVariablesPartGuiWriterSyncedToClient(net.minecraft.gametest.framework.GameTestHelper helper) The full server-to-client path: the server determines the values, syncs them under a value id, and the client-side container shows them in its tooltip. -
testAspectVariablesPartGuiWriterUnsyncedShowsVariableDrivenValue
public void testAspectVariablesPartGuiWriterUnsyncedShowsVariableDrivenValue(net.minecraft.gametest.framework.GameTestHelper helper) Even when the server has not synced any values yet, the client must show that a setting is driven by a variable, as the variables themselves are part of the (synced) part state. -
testAspectVariablesPartGuiPropertyValues
public void testAspectVariablesPartGuiPropertyValues(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPartGuiPropertyValuesDefaultValue
public void testAspectVariablesPartGuiPropertyValuesDefaultValue(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesWriteRedstonePulseEmitValue
public void testAspectVariablesWriteRedstonePulseEmitValue(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesWriteRedstoneStrongPowerTrue
public void testAspectVariablesWriteRedstoneStrongPowerTrue(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesWriteRedstoneStrongPowerFalse
public void testAspectVariablesWriteRedstoneStrongPowerFalse(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesWriteRedstoneStrongPowerDynamic
public void testAspectVariablesWriteRedstoneStrongPowerDynamic(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesWriteRedstonePulseLength
public void testAspectVariablesWriteRedstonePulseLength(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesFromVariableStore
public void testAspectVariablesFromVariableStore(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesPersistence
public void testAspectVariablesPersistence(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesErrorPersistence
public void testAspectVariablesErrorPersistence(net.minecraft.gametest.framework.GameTestHelper helper) The errors of aspect setting variables are part of the part state, so that the client also knows about them, and can render them in the part gui tooltip. -
testAspectVariablesDropOnBreak
public void testAspectVariablesDropOnBreak(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesViaContainer
public void testAspectVariablesViaContainer(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesContainerSlotPaging
public void testAspectVariablesContainerSlotPaging(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesUnaffectedAspects
public void testAspectVariablesUnaffectedAspects(net.minecraft.gametest.framework.GameTestHelper helper) -
testAspectVariablesEffectiveProperty
public void testAspectVariablesEffectiveProperty(net.minecraft.gametest.framework.GameTestHelper helper)
-