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

public class DimensionPoolChangeOnRespawnTest extends DimensionalInventoriesGameTest
  • Constructor Details

    • DimensionPoolChangeOnRespawnTest

      public DimensionPoolChangeOnRespawnTest()
  • Method Details

    • transitionHandledExactlyOnce

      @GameTest(maxTicks=200, requiredSuccesses=5) 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.

      Parameters:
      context - The test context