public interface RegionProvider

Loads and persists Regions by id for a GameWorld, so a world larger than memory can page whole areas in and out as the player roams. Implementations may read from bundled resources, Storage, or the network.

Methods

public abstract Region loadRegion(String id)Loads the region with the given id, or null if it does not exist.
public abstract void saveRegion(Region region)Persists a region (e.g. before it is unloaded).

Method details

loadRegion

public abstract Region loadRegion(String id)
Loads the region with the given id, or null if it does not exist.

saveRegion

public abstract void saveRegion(Region region)
Persists a region (e.g. before it is unloaded). No-op for read-only sources.