RebuildWorldEntityZoneProvider

Zone provider acts as a function to provide all the necessary information needed for rebuild worldentity to function, in the order the client expects it in.

Functions

Link copied to clipboard
open fun getMapsquareId(zoneX: Int, zoneZ: Int): Int

Calculates the mapsquare id based on the absolute zone coordinates, not the relative ones to the worldentity.

Link copied to clipboard
abstract fun provide(index: Int, zoneX: Int, zoneZ: Int, level: Int): RebuildRegionZone?

Provides a zone that the client must copy based on the parameters. This 'provide' function will be called with the relative-to-worldentity zone coordinates, so starting with 0,0 and ending before sizeX,sizeZ. The server is responsible for looking up the actual zone that was copied for that world entity. In order to calculate the mapsquare id for xtea keys, use getMapsquareId.