Class ChunkEventLoadNewChunkTest

java.lang.Object
net.neoforged.neoforge.oldtest.world.ChunkEventLoadNewChunkTest

public class ChunkEventLoadNewChunkTest extends Object
Simple test for ChunkEvent.Load.isNewChunk(). Will log a message to console each time the event is fired for a newly generated chunk.

A simple way to check that it's behaving as expected is as follows:

  • Generate a new world (and log in if using dedicated server). You should see many log messages about the spawn chunks being generated.
  • Don't move around in game, to make sure we only generate the spawn chunks, and any chunks loaded by the player chunk loader for the players initial login position. (to make this test as reproducible as possible without lots of complexity)
  • Once a couple seconds pass without any new chunk log messages, close out of the world/stop the server.
  • Load the world/start the server (and log in if using dedicated server) again. For the same reasons as before, don't move around.
  • You shouldn't see any log messages for new chunks this time. (until you start moving around to generate more chunks)
  • Field Details

  • Constructor Details

    • ChunkEventLoadNewChunkTest

      public ChunkEventLoadNewChunkTest()
  • Method Details