Class DimensionPoolChangeOnRespawnTest

java.lang.Object
net.thomilist.dimensionalinventories.gametest.DimensionalInventoriesGameTest
net.thomilist.dimensionalinventories.gametest.DimensionPoolChangeOnRespawnTest

public class DimensionPoolChangeOnRespawnTest extends DimensionalInventoriesGameTest
  • 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, EntityPlayerMPFake from 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 vanilla TestServer, but this is patched with the MinecraftServerMixin.

      Parameters:
      context - The test context