public boolean loadRegion(RegionManager regionManager, int x, int z, int zoomLevel, int dimension) {
//MwUtil.log("mapTexture.loadRegion %d %d %d %d", x, z, zoomLevel, dimension);
boolean loaded = false;
int index = this.getRegionIndex(x, z, zoomLevel);
Region currentRegion = this.regionArray[index];
if ((currentRegion == null) || (!currentRegion.equals(x, z, zoomLevel, dimension))) {
Region newRegion = regionManager.getRegion(x, z, zoomLevel, dimension);
this.regionArray[index] = newRegion;
this.updateTextureFromRegion(
newRegion, newRegion.x, newRegion.z, newRegion.size, newRegion.size
);
//regionManager.logInfo("regionArray[%d] = %s", index, newRegion);