Class DimensionPoolChangeOnRespawnTest
java.lang.Object
net.thomilist.dimensionalinventories.gametest.DimensionalInventoriesGameTest
net.thomilist.dimensionalinventories.gametest.DimensionPoolChangeOnRespawnTest
-
Field Summary
Fields inherited from class DimensionalInventoriesGameTest
LOGGER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtransitionHandledExactlyOnce(net.minecraft.test.TestContext context) Tests that dimension pool transitions are exactly once, even when respawning across dimensions.Methods inherited from class DimensionalInventoriesGameTest
logTestStart
-
Constructor Details
-
DimensionPoolChangeOnRespawnTest
public DimensionPoolChangeOnRespawnTest()
-
-
Method Details
-
transitionHandledExactlyOnce
public void transitionHandledExactlyOnce(net.minecraft.test.TestContext 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. However, before spawning the player, the Carpet Mod implementation first checks the server's user cache for a matching username. This does not work on a vanillaTestServer, but this is patched with theMinecraftServerMixin.- Parameters:
context- The test context
-