Class DimensionPoolChangeOnRespawnTest
java.lang.Object
net.thomilist.dimensionalinventories.gametest.DimensionalInventoriesGameTest
net.thomilist.dimensionalinventories.gametest.DimensionPoolChangeOnRespawnTest
- All Implemented Interfaces:
net.fabricmc.fabric.api.gametest.v1.CustomTestMethodInvoker
-
Field Summary
Fields inherited from class DimensionalInventoriesGameTest
LOGGER, MAX_TICKS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtransitionHandledExactlyOnce(net.minecraft.gametest.framework.GameTestHelper context) Tests that dimension pool transitions are exactly once, even when respawning across dimensions.Methods inherited from class DimensionalInventoriesGameTest
initializeSampleData, invokeTestMethodModifier and TypeMethodDescriptionprotected static voidinitializeSampleData(net.minecraft.gametest.framework.GameTestHelper context, String resourcePath, String worldDestinationPath) voidinvokeTestMethod(net.minecraft.gametest.framework.GameTestHelper context, Method method)
-
Constructor Details
-
DimensionPoolChangeOnRespawnTest
public DimensionPoolChangeOnRespawnTest()
-
-
Method Details
-
transitionHandledExactlyOnce
@GameTest(maxTicks=200, requiredSuccesses=5) public void transitionHandledExactlyOnce(net.minecraft.gametest.framework.GameTestHelper context) Tests that dimension pool transitions are exactly once, even when respawning across dimensions.Double handling can cause data loss or duplication bugs like dimensional-inventories#25.
This test requires that a player is actually spawned into the world rather than simply operating on an arbitrary player instance in memory. To do so,
EntityPlayerMPFakefrom Carpet Mod is used.- Parameters:
context- The test context
-