Interface VirtualBiomeResolver

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@NullMarked @AsOf("2.2.0") @Internal @FunctionalInterface public interface VirtualBiomeResolver
Bridges the API module and the NMS module across the chunk-rewrite boundary.

The packet listener decides (cheaply, with no decoding) whether any phony biome could apply to a chunk and, if so, produces a resolver. The NMS handler then decodes the chunk exactly once, builds a SnapshotChunkData, and calls

invalid reference
#resolve(SnapshotChunkData)
. The resolver runs the biome-aware conditionals against the decoded data and returns the VirtualBiome to apply, or null to leave the packet untouched (in which case the NMS side skips serialization entirely).
Since:
2.2.0
  • Method Details

    • resolve

      @AsOf("3.3.0") @Nullable VirtualBiome resolve(SnapshotChunkData chunkData, int localQuartX, int localQuartY, int localQuartZ)
      Parameters:
      chunkData - the decoded chunk view, exposing the real biome/block data
      localQuartX - the chunk-relative quart X, from 0 through 3
      localQuartY - the column-relative quart Y
      localQuartZ - the chunk-relative quart Z, from 0 through 3
      Returns:
      the custom biome to apply, or null to preserve the original biome cell
      Since:
      3.3.0