public int[] render(int xOffset, int yOffset, int w, int h)
	{
		if(isBlankTiles)
		{
			return null;
		}
		if(!APIMain.getAPI().renderMapOnce || pix == null || update)
		{
			pix = new int[w * h];
			MapManager mm = MapManager.instance;
			Tile tilevoid = mm.getTileFromID(0);
			Tile currentTile = tilevoid;
			int[] currentPixels = currentTile.getPixels();
			for(int x = xOffset; x < w + xOffset; x++)
			{
				for(int y = yOffset; y < h + yOffset; y++)
				{
					int xx = (x - xOffset);
					int yy = (y - yOffset);
					if(currentTile != mm.getTileFromID(map[(width/Tile.SIZE) * (int)(yy / Tile.SIZE) + (int)(xx / Tile.SIZE)]))
					{
						currentTile = mm.getTileFromID(map[(width/Tile.SIZE) * (int)(yy / Tile.SIZE) + (int)(xx / Tile.SIZE)]);
						currentPixels = currentTile.getPixels();
					}
					if(xx > width || yy > height)
					{
						pix[w * yy  + xx] = tilevoid.getPixelAt(Tile.SIZE, (int)(yy / Tile.SIZE), (int)(xx / Tile.SIZE));
					}
					else
					{
						pix[w * yy + xx] = currentPixels[Tile.SIZE * (yy % Tile.SIZE) + (int)(xx % Tile.SIZE)];
					}
				}
			}
			update = false;
		}
		return pix.clone();
	}